Skip to content

[3.9] bpo-45640: [docs] Tokens are now clickable (GH-29260) #29623

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

Closed
wants to merge 1 commit into from

Conversation

ambv
Copy link
Contributor

@ambv ambv commented Nov 18, 2021

Co-authored-by: Łukasz Langa lukasz@langa.pl.
(cherry picked from commit 3295910)

Co-authored-by: Arthur Milchior arthur@milchior.fr

https://bugs.python.org/issue45640

Co-authored-by: Łukasz Langa <lukasz@langa.pl>.
(cherry picked from commit 3295910)

Co-authored-by: Arthur Milchior <arthur@milchior.fr>
@ambv
Copy link
Contributor Author

ambv commented Nov 18, 2021

I think we'll abort backporting this back to 3.9. It uses an older Sphinx version and the make suspicious script there erroneously finds usage of :token:`~python-grammar:with_item` to be an example of a bad :with directive (not even :with_item). I spent some time to ignore those with a diff like:

diff --git a/Doc/tools/susp-ignored.csv b/Doc/tools/susp-ignored.csv
index ad5f55e803..798c9f23d5 100644
--- a/Doc/tools/susp-ignored.csv
+++ b/Doc/tools/susp-ignored.csv
@@ -263,9 +263,17 @@ license,,`,THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AN
 license,,`,* THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
 license,,`,THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND
 license,,:zooko,mailto:zooko@zooko.com
+reference/compound_stmts,,:with,~python-grammar:with_item
+reference/compound_stmts,,:assignment,~python-grammar:assignment_expression
+reference/expressions,,:expression,~python-grammar:expression
+reference/expressions,,:expression,~python-grammar:expression_list
+reference/expressions,,:identifier,~python-grammar:identifier
+reference/expressions,,:yield,~python-grammar:yield_from
 reference/expressions,,:index,x[index:index]
 reference/lexical_analysis,,`,$       ?       `
 reference/lexical_analysis,,:fileencoding,# vim:fileencoding=<encoding-name>
+reference/lexical_analysis,,:bytesprefix,~python-grammar:bytesprefix
+reference/lexical_analysis,,:stringprefix,~python-grammar:stringprefix
 tutorial/datastructures,,:value,It is also possible to delete a key:value
 tutorial/datastructures,,:value,key:value pairs within the braces adds initial key:value pairs
 tutorial/stdlib2,,:config,"logging.warning('Warning:config file %s not found', 'server.conf')"

Unfortunately once you ignore those, it still fails by saying those directives like :with (instead of :with_item) or :expression (instead of :expression_list) are unused. At this point I'm willing to bet that maintaining this would be a nightmare even if I found a way to make it work. We'll definitely won't be upgrading Sphinx on an old release like 3.9.

@ambv ambv closed this Nov 18, 2021
@ambv ambv deleted the backport-3295910-3.9 branch November 18, 2021 18:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting core review docs Documentation in the Doc dir
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants