-
-
Notifications
You must be signed in to change notification settings - Fork 31.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bpo-41762: Fix usage of productionlist markup in the doc #22281
Conversation
I checked manually the rendered HTML documentation: reference/expressions.html still contains clickable links between the different grammar items. For example, I can click on "expression" from lambda_expr and I'm pointed to expression definition of the "6.13. Conditional expressions" section. I also checked library/string.html: links are kept. cc @JulienPalard @deronnax @isidentical @pablogsal @lysnikolaou |
@@ -85,7 +85,7 @@ Interactive input | |||
|
|||
Input in interactive mode is parsed using the following grammar: | |||
|
|||
.. productionlist:: | |||
.. productionlist:: interactive-input-component | |||
interactive_input: [`stmt_list`] NEWLINE | `compound_stmt` NEWLINE |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change breaks the link to stmt_list.
Should we use the same identifier here, in expressions, simple statements and compound statements?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, I think that is a good idea (to preserve those links). Is there any other missing links between sections?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Or maybe use the least amount of namespaces possible?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didn't check all modified pages.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can check my PR works well after this PR is merged :)
#22198
Use an unique identifier for the different grammars documented using the Sphinx productionlist markup. productionlist markups of the same grammar, like "expressions" or "compound statements", use the same identifier.
compound_stmts, expressions, simple_stmts and toplevel_components now use the "python-grammar" identifier for their "productionlist" markups.
Examples:
|
Ok, I pushed a 3rd commit. I checked links between reference/ documents and they all have been repaired by my 3rd commit. I'm going to merge this PR once the CI pass. |
Thanks @vstinner for the PR 🌮🎉.. I'm working now to backport this PR to: 3.8, 3.9. |
Sorry @vstinner, I had trouble checking out the |
) Use an unique identifier for the different grammars documented using the Sphinx productionlist markup. productionlist markups of the same grammar, like "expressions" or "compound statements", use the same identifier "python-grammar". (cherry picked from commit 8af239e) Co-authored-by: Victor Stinner <vstinner@python.org>
GH-22300 is a backport of this pull request to the 3.8 branch. |
Thanks @vstinner for the PR 🌮🎉.. I'm working now to backport this PR to: 3.9. |
) Use an unique identifier for the different grammars documented using the Sphinx productionlist markup. productionlist markups of the same grammar, like "expressions" or "compound statements", use the same identifier "python-grammar". (cherry picked from commit 8af239e) Co-authored-by: Victor Stinner <vstinner@python.org>
GH-22301 is a backport of this pull request to the 3.9 branch. |
Use an unique identifier for the different grammars documented using the Sphinx productionlist markup. productionlist markups of the same grammar, like "expressions" or "compound statements", use the same identifier "python-grammar". (cherry picked from commit 8af239e) Co-authored-by: Victor Stinner <vstinner@python.org>
…H-22300) Use an unique identifier for the different grammars documented using the Sphinx productionlist markup. productionlist markups of the same grammar, like "expressions" or "compound statements", use the same identifier "python-grammar". (cherry picked from commit 8af239e) Co-authored-by: Victor Stinner <vstinner@python.org>
) Use an unique identifier for the different grammars documented using the Sphinx productionlist markup. productionlist markups of the same grammar, like "expressions" or "compound statements", use the same identifier "python-grammar". (cherry picked from commit 8af239e) Co-authored-by: Victor Stinner <vstinner@python.org>
Use an unique identifier for the different grammars documented using
the Sphinx productionlist markup.
productionlist markups of the same grammar, like "expressions" or
"compound statements", use the same identifier.
https://bugs.python.org/issue41762