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 — gh-127833: Fix grammar snippet formatting for help() output by encukou · Pull Request #129692 · python/cpython

Conversation

@encukou

@encukou encukou commented Feb 5, 2025 •
edited by github-actions Bot
Loading

Uh oh!

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

Copy link
Copy Markdown
Member

Change pydoc_data to show the "input" of grammar snippet
directives, which is formatted the way we want.

See also this Sphinx issue: sphinx-doc/sphinx#13302
And: sphinx-doc/sphinx#4454

A known issue is cross-grammar links, like those in
the string format specification mini-language, which render
as reST source:

element_index:     `~python-grammar:digit`+ | `index_string`

I don't see a good way to fix this before Sphinx is refactored.

  • Issue: Align the grammar documentation with Python's actual grammar #127833

📚 Documentation preview 📚: https://cpython-previews--129692.org.readthedocs.build/

Sorry, something went wrong.

Uh oh!

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

All reactions
encukou added 2 commits February 5, 2025 17:56
@encukou
Fix grammar snippet formatting for help() output
af3ce4f
Change pydoc_data to show the "input" of grammar snippet
directives, which is formatted the way we want.

See also this Sphinx issue: sphinx-doc/sphinx#13302
And: sphinx-doc/sphinx#4454

A known issue is cross-grammar links, like those in
the string format specification mini-language, which render
as reST source:

    element_index:     `~python-grammar:digit`+ | `index_string`

I don't see a good way to fix this before Sphinx is refactored.
@encukou
Commit the generated pydoc_data changes
1af8b90
This is usually done at release time.
@bedevere-app bedevere-app Bot added the awaiting core review label Feb 5, 2025
@encukou
encukou requested review from AA-Turner and hugovk as code owners February 5, 2025 17:02
@bedevere-app bedevere-app Bot mentioned this pull request Feb 5, 2025
Align the grammar documentation with Python's actual grammar #127833
Open
@encukou encukou added the skip news label Feb 5, 2025
hugovk
hugovk reviewed Feb 6, 2025
View reviewed changes
Comment thread Lib/pydoc_data/topics.py Resolved

Uh oh!

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

Comment thread Doc/tools/extensions/pydoc_topics.py Resolved

Uh oh!

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

Comment thread Doc/tools/extensions/pydoc_topics.py Resolved

Uh oh!

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

Comment thread Doc/tools/extensions/pydoc_topics.py Resolved

Uh oh!

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

@hugovk

hugovk commented Feb 6, 2025 •
edited
Loading

Uh oh!

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

Copy link
Copy Markdown
Member

(re: https://github.com/python/cpython/actions/runs/13162643246/job/36735040454?pr=129692, I've updated the branch from main to pull in the new change detection (#129627))

encukou reacted with heart emoji
All reactions
  • ❤️ 1 reaction

Sorry, something went wrong.

Uh oh!

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

hugovk and others added 4 commits February 6, 2025 15:11
@hugovk
Merge branch 'main' into doc-grammar-snippets
c495762
@encukou
Fix annotation and run ruff check Doc/tools/ --fix
1969945
@encukou
Merge in the main branch
69482f2
@encukou
Remove space from autogenerated file
f04e70a
@encukou

encukou commented Feb 17, 2025

Copy link
Copy Markdown
Member Author

Thank you!
Does the change look good now?

All reactions

Sorry, something went wrong.

Uh oh!

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

@encukou encukou mentioned this pull request Feb 17, 2025
[3.13] gh-127833: Docs: Add a grammar-snippet directive & replace productionlist (GH-127835) #129689
Closed
@encukou

encukou commented Mar 20, 2025

Copy link
Copy Markdown
Member Author

This PR was made obsolete by new Sphinx and #130376. Thank you Adam!

All reactions

Sorry, something went wrong.

Uh oh!

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

@encukou encukou closed this Mar 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@hugovk hugovk hugovk left review comments
@AA-Turner AA-Turner Awaiting requested review from AA-Turner AA-Turner is a code owner

Uh oh!

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

Assignees

No one assigned

Labels

awaiting core review 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.

2 participants

@encukou @hugovk
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.