GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Docs: Link tokens in the format string grammars by wjandrea · Pull Request #108184 · python/cpython

Conversation

@wjandrea

@wjandrea wjandrea commented Aug 20, 2023 •
edited by AA-Turner
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

Fix links from Format String Syntax grammar and Format Specification Mini-Language grammar to Python grammar.
Also link arg_name token within Format String Syntax grammar.


Please check my work. I'm not very familiar with RST, just read the docs on productionlists and did my best.

Should be backported to all current versions.


📚 Documentation preview 📚: https://cpython-previews--108184.org.readthedocs.build/en/108184/library/string.html#format-string-syntax

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@wjandrea
Fix grammar token links in string.rst
3336886
Fix links from Format String Syntax grammar and Format Specification Mini-Language grammar to Python grammar.
Also link `arg_name` token within Format String Syntax grammar.
@bedevere-bot bedevere-bot added docs Documentation in the Doc dir skip news awaiting review labels Aug 20, 2023
@AlexWaygood AlexWaygood added the skip issue label Aug 20, 2023
@AA-Turner AA-Turner added needs backport to 3.11 only security fixes needs backport to 3.12 only security fixes labels Aug 21, 2023
@wjandrea

wjandrea commented Aug 23, 2023

Copy link
Copy Markdown
Contributor Author

Looks like the links to python-grammar didn't work. I'm not sure if that's cause the test failed or what.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@AA-Turner AA-Turner mentioned this pull request Sep 10, 2023
Increase minimum supported Sphinx to 4.2 #109209
Closed
AA-Turner added 2 commits September 10, 2023 02:40
@AA-Turner
Patch sphinx.domains.std.token_re
3b891e2
@AA-Turner
Merge branch 'main' into wjandrea-patch_grammar-token-links
6451910
@AA-Turner

AA-Turner commented Sep 10, 2023

Copy link
Copy Markdown
Member

See #109209 and #109210.

wjandrea reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@AA-Turner
Remove
d0241c4
@AA-Turner AA-Turner changed the title Docs: Fix grammar token links in string.rst Docs: Link grammar token links in string.rst Sep 10, 2023
@AA-Turner AA-Turner changed the title Docs: Link grammar token links in string.rst Docs: Link tokens in the format string grammars Sep 10, 2023
@AA-Turner
grammar
15087a0
AA-Turner
AA-Turner approved these changes Sep 10, 2023
View reviewed changes
@bedevere-bot bedevere-bot added awaiting core review and removed awaiting review labels Sep 10, 2023
@wjandrea
Merge branch 'main' into wjandrea-patch_grammar-token-links
70fc962
@skirpichev

skirpichev commented Jan 3, 2024

Copy link
Copy Markdown
Member

@wjandrea, could you, please, resolve merge conflicts?

BTW, shouldn't we also bug sphinx-doc (I don't see related issue(s))?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@skirpichev skirpichev mentioned this pull request Jan 3, 2024
Can't reference token from other productionlist's if its group name contains hypens sphinx-doc/sphinx#11854
Closed
@skirpichev

skirpichev commented Jan 3, 2024

Copy link
Copy Markdown
Member

FYI: sphinx-doc/sphinx#11854

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

skirpichev added a commit to skirpichev/cpython that referenced this pull request Jan 7, 2024
@skirpichev
Support hexadecimal floating point literals
7b0efef
This add hexadecimal floating point literals (IEEE 754-2008 §5.12.3) and
support construction of floats from hexadecimal strings.  Note that the
float constructor accepts more permissive syntax (everything that is
currently accepted by the float.fromhex, but with a mandatory base
specifier; it also allows grouping digits with underscores).

Examples:
```pycon
>>> 0x1.1p-1
0.53125
>>> float('0x1.1')
1.0625
>>> 0x1.1
  File "<stdin>", line 1
    0x1.1
        ^
SyntaxError: invalid floating point literal
```

Minor changes:
* Py_ISDIGIT/ISXDIGIT macros were transformed to functions
* cherry-picked sphinx workaround from python#108184
skirpichev added a commit to skirpichev/cpython that referenced this pull request Jan 8, 2024
@skirpichev
Support hexadecimal floating point literals
903543b
This add hexadecimal floating point literals (IEEE 754-2008 §5.12.3) and
support construction of floats from hexadecimal strings.  Note that the
float constructor accepts more permissive syntax (everything that is
currently accepted by the float.fromhex, but with a mandatory base
specifier; it also allows grouping digits with underscores).

Examples:
```pycon
>>> 0x1.1p-1
0.53125
>>> float('0x1.1')
1.0625
>>> 0x1.1
  File "<stdin>", line 1
    0x1.1
        ^
SyntaxError: invalid floating point literal
```

Minor changes:
* Py_ISDIGIT/ISXDIGIT macros were transformed to functions
* cherry-picked sphinx workaround from python#108184
@wjandrea
Merge branch 'main' into wjandrea-patch_grammar-token-links
83e4c7c
@wjandrea

wjandrea commented Jan 9, 2024 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor Author

@skirpichev merge conflicts resolved

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

skirpichev
skirpichev reviewed Jan 9, 2024
View reviewed changes
Comment thread Doc/library/string.rst Resolved

Uh oh!

There was an error while loading. Please reload this page.

skirpichev
skirpichev reviewed Jan 9, 2024
View reviewed changes
Comment thread Doc/tools/extensions/pyspecific.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

skirpichev
skirpichev approved these changes Jan 9, 2024
View reviewed changes
@skirpichev

skirpichev commented Jan 9, 2024

Copy link
Copy Markdown
Member

LGTM, except for two nitpicks

@AA-Turner?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

AA-Turner
AA-Turner reviewed Jan 9, 2024
View reviewed changes
Comment thread Doc/tools/extensions/pyspecific.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

@AA-Turner @skirpichev
Apply suggestions from code review
4fcf84c
Co-authored-by: Sergey B Kirpichev <[email protected]>
@AA-Turner
AA-Turner enabled auto-merge (squash) January 9, 2024 02:41
@AA-Turner
AA-Turner merged commit f3d5d4a into python:main Jan 9, 2024
@miss-islington-app

miss-islington-app Bot commented Jan 9, 2024

Copy link
Copy Markdown

Thanks @wjandrea for the PR, and @AA-Turner for merging it 🌮🎉.. I'm working now to backport this PR to: 3.11, 3.12.
🐍🍒⛏🤖

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bedevere-app bedevere-app Bot removed the awaiting core review label Jan 9, 2024
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Jan 9, 2024
@wjandrea @AA-Turner
@skirpichev @miss-islington
Docs: Link tokens in the format string grammars (pythonGH-108184)
5f7920f
(cherry picked from commit f3d5d4a)

Co-authored-by: William Andrea <[email protected]>
Co-authored-by: Adam Turner <[email protected]>
Co-authored-by: Sergey B Kirpichev <[email protected]>
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Jan 9, 2024
@wjandrea @AA-Turner
@skirpichev @miss-islington
Docs: Link tokens in the format string grammars (pythonGH-108184)
a136287
(cherry picked from commit f3d5d4a)

Co-authored-by: William Andrea <[email protected]>
Co-authored-by: Adam Turner <[email protected]>
Co-authored-by: Sergey B Kirpichev <[email protected]>
@bedevere-app

bedevere-app Bot commented Jan 9, 2024

Copy link
Copy Markdown

GH-113839 is a backport of this pull request to the 3.12 branch.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bedevere-app bedevere-app Bot removed the needs backport to 3.12 only security fixes label Jan 9, 2024
@bedevere-app

bedevere-app Bot commented Jan 9, 2024

Copy link
Copy Markdown

GH-113840 is a backport of this pull request to the 3.11 branch.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bedevere-app bedevere-app Bot removed the needs backport to 3.11 only security fixes label Jan 9, 2024
AA-Turner added a commit that referenced this pull request Jan 9, 2024
@miss-islington @wjandrea
@AA-Turner @skirpichev
[3.11] Docs: Link tokens in the format string grammars (GH-108184) (#…
3958c7d
…113840)

Docs: Link tokens in the format string grammars (GH-108184)
(cherry picked from commit f3d5d4a)

Co-authored-by: William Andrea <[email protected]>
Co-authored-by: Adam Turner <[email protected]>
Co-authored-by: Sergey B Kirpichev <[email protected]>
AA-Turner added a commit that referenced this pull request Jan 9, 2024
@miss-islington @wjandrea
@AA-Turner @skirpichev
[3.12] Docs: Link tokens in the format string grammars (GH-108184) (#…
cd87737
…113839)

Docs: Link tokens in the format string grammars (GH-108184)
(cherry picked from commit f3d5d4a)

Co-authored-by: William Andrea <[email protected]>
Co-authored-by: Adam Turner <[email protected]>
Co-authored-by: Sergey B Kirpichev <[email protected]>
@wjandrea
wjandrea deleted the wjandrea-patch_grammar-token-links branch January 9, 2024 04:01
skirpichev added a commit to skirpichev/cpython that referenced this pull request Jan 9, 2024
@skirpichev
Support hexadecimal floating point literals
869d70f
This add hexadecimal floating point literals (IEEE 754-2008 §5.12.3) and
support construction of floats from hexadecimal strings.  Note that the
float constructor accepts more permissive syntax (everything that is
currently accepted by the float.fromhex, but with a mandatory base
specifier; it also allows grouping digits with underscores).

Examples:
```pycon
>>> 0x1.1p-1
0.53125
>>> float('0x1.1')
1.0625
>>> 0x1.1
  File "<stdin>", line 1
    0x1.1
        ^
SyntaxError: invalid floating point literal
```

Minor changes:
* Py_ISDIGIT/ISXDIGIT macros were transformed to functions
* cherry-picked sphinx workaround from python#108184
skirpichev added a commit to skirpichev/cpython that referenced this pull request Jan 9, 2024
@skirpichev
Support hexadecimal floating point literals
951edcb
This add hexadecimal floating point literals (IEEE 754-2008 §5.12.3) and
support construction of floats from hexadecimal strings.  Note that the
float constructor accepts more permissive syntax (everything that is
currently accepted by the float.fromhex, but with a mandatory base
specifier; it also allows grouping digits with underscores).

Examples:
```pycon
>>> 0x1.1p-1
0.53125
>>> float('0x1.1')
1.0625
>>> 0x1.1
  File "<stdin>", line 1
    0x1.1
        ^
SyntaxError: invalid floating point literal
```

Minor changes:
* Py_ISDIGIT/ISXDIGIT macros were transformed to functions
* cherry-picked sphinx workaround from python#108184
skirpichev added a commit to skirpichev/cpython that referenced this pull request Jan 14, 2024
@skirpichev
Support hexadecimal floating point literals
9a193e0
This add hexadecimal floating point literals (IEEE 754-2008 §5.12.3) and
support construction of floats from hexadecimal strings.  Note that the
float constructor accepts more permissive syntax (everything that is
currently accepted by the float.fromhex, but with a mandatory base
specifier; it also allows grouping digits with underscores).

Examples:
```pycon
>>> 0x1.1p-1
0.53125
>>> float('0x1.1')
1.0625
>>> 0x1.1
  File "<stdin>", line 1
    0x1.1
        ^
SyntaxError: invalid floating point literal
```

Minor changes:
* Py_ISDIGIT/ISXDIGIT macros were transformed to functions
* cherry-picked sphinx workaround from python#108184
kulikjak pushed a commit to kulikjak/cpython that referenced this pull request Jan 22, 2024
@wjandrea @AA-Turner
@skirpichev @kulikjak
Docs: Link tokens in the format string grammars (python#108184)
f816d9b
Co-authored-by: Adam Turner <[email protected]>
Co-authored-by: Sergey B Kirpichev <[email protected]>
aisk pushed a commit to aisk/cpython that referenced this pull request Feb 11, 2024
@wjandrea @AA-Turner
@skirpichev @aisk
Docs: Link tokens in the format string grammars (python#108184)
bf44aa3
Co-authored-by: Adam Turner <[email protected]>
Co-authored-by: Sergey B Kirpichev <[email protected]>
Glyphack pushed a commit to Glyphack/cpython that referenced this pull request Sep 2, 2024
@wjandrea @AA-Turner
@skirpichev @Glyphack
Docs: Link tokens in the format string grammars (python#108184)
f0e19dd
Co-authored-by: Adam Turner <[email protected]>
Co-authored-by: Sergey B Kirpichev <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@AA-Turner AA-Turner AA-Turner approved these changes
@skirpichev skirpichev skirpichev approved these changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

docs Documentation in the Doc dir skip issue skip news

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

5 participants

@wjandrea @AA-Turner @skirpichev @bedevere-bot @AlexWaygood
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.