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
turtle.write doc missing tuple parens for font default in 3.10+ #89560
Comments
In the version 3.10 and 3.11 python turtle doc, the turtle.write line shows font without it's tuple parenthesis. Something change in 3.10 that makes it look like font='Arial' and 8 and 'normal' are 3 separate parameters, when it should be one tuple parameter font=(x,y,z). Ex. of wrong entry (URL=https://docs.python.org/3.11/library/turtle.html#turtle.write) Ex. of correct entry (https://docs.python.org/3.9/library/turtle.html#turtle.write) |
This looks like some Sphinx bug. In Python 3.8, using Sphinx: >>> from sphinx.pycode import ast
>>> ast.unparse(ast.parse("('Arial', 8, 'normal')", 'eval').body)
"'Arial', 8, 'normal'" For comparison, using builtin ast module in Python 3.9: >>> import ast
>>> ast.unparse(ast.parse("('Arial', 8, 'normal')", 'eval').body)
"('Arial', 8, 'normal')" |
Seems it was fixed in Sphinx a year ago: sphinx-doc/sphinx#8265. Maybe we need to update the Sphinx version (but it can introduce new incompatibilities). |
I forgot to mention I'm on Windows 10 PC and see the same thing under Edge and FireFox. John G. Gammon -. .. .... .. .-.. .- -.. -- .. .-. .- .-. .. |
jg, please remove the copy of other message when answer. It makes painfully difficult reading the discussion for visually impaired people. |
I tested with Sphinx 1.5.4, and this issue is gone. It introduces a regression with some smart quotes (see sphinx-doc/sphinx#9713), but it is less severe than incorrect rendering of tuples as parameter defaults. |
Closed bpo-45872 as duplicate. Éric, any idea for a local fix? I verified with Sphinx 3.2.1. I tried both escaping with '\' and doubling parens, without success. |
I verified that in 3.9 and 3.11, turtle.py, line 1098, is now rendered correctly. In 3.10, same line If there is no obvious fix, I think that this should be closed. But... @JulienPalard Are we using a different version of Sphinx in 3.10 than in 3.9 and 3.11, or is some configuration setting different? |
Yes, see docsbuild-scripts' README (but it sometimes lag behind a few days), here's an up-to-date version:
(It can also be checked by looking at the footers.) |
Closing this as I see it fixed in /3.8/ to /dev/. |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: