You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you backport the change, please remove the NEWS entry, since it's not a SyntaxError in 3.7 and 3.8.
Good point. In that case, I'll do a manual backport of the PR just to 3.8 and skip the news entry. As mentioned above, I think most of the value in fixing it when the SyntaxError isn't present is mainly just for providing a good example in the latest stable version of the stdlib, so I don't think there would be much additional value in also backporting it to 3.7.
I believe the file was synchronized across versions as new features have not recently been added. Backporting the fix to my typo should keep it that way. This is an example of why code review even of patches that 'work' is a good thing.
Activity
hroncok commentedon Apr 28, 2020
With Python 3.9.0a6 we get the following syntax error when bytecompiling the standard library in Fedora:
Compiling '/usr/lib64/python3.9/turtledemo/main.py'...
*** File "/usr/lib64/python3.9/turtledemo/main.py", line 275
bg="#d00" if clear == NORMAL else"#fca")
^
SyntaxError: invalid string prefix
I've looked and the bad code is there for all branches, but only with 3.9.0a6 I get the SyntaxError.
I wonder whether this is a know new SyntaxError or not. This "worked" with 3.9.0a5:
Happy to submit a PR for turtledemo.
vstinner commentedon Apr 29, 2020
New changeset 49f70db by Miro Hrončok in branch 'master':
bpo-40431: Fix syntax typo in turtledemo (GH-19777)
49f70db
vstinner commentedon Apr 29, 2020
I don't think that it's worth it to backport the change to 3.7 and 3.8: in Python 3.7 and 3.8, the code is accepted.
I also reported the issue to: https://bugs.python.org/issue40334#msg367580
Miro: are you ok to close the issue (not backport)?
hroncok commentedon Apr 29, 2020
I am OK. I don't see why not to backport it, but I don't care much.
vstinner commentedon Apr 29, 2020
Python 3.7 and 3.8 are not broken, so there is no need to fix them :-) Thanks for the fix.
I reported the issue to:
https://bugs.python.org/issue40246#msg367587
5 remaining items
vstinner commentedon Apr 29, 2020
If you backport the change, please remove the NEWS entry, since it's not a SyntaxError in 3.7 and 3.8.
aeros commentedon Apr 29, 2020
Victor Stinner wrote:
Good point. In that case, I'll do a manual backport of the PR just to 3.8 and skip the news entry. As mentioned above, I think most of the value in fixing it when the SyntaxError isn't present is mainly just for providing a good example in the latest stable version of the stdlib, so I don't think there would be much additional value in also backporting it to 3.7.
aeros commentedon Apr 29, 2020
New changeset cc011b5 by Kyle Stanley in branch '3.8':
[3.8] bpo-40431: Fix syntax typo in turtledemo (GH-19777) (bpo-19784)
cc011b5
miss-islington commentedon Apr 29, 2020
New changeset adb1f85 by Miss Islington (bot) in branch '3.7':
[3.8] bpo-40431: Fix syntax typo in turtledemo (GH-19777) (GH-19784)
adb1f85
vstinner commentedon Apr 29, 2020
Ok, the typo is now fixed in 3.7, 3.8 and master branches ;-) Thanks Miro for the bug reportand Kyle for the backport.
terryjreedy commentedon May 17, 2020
I believe the file was synchronized across versions as new features have not recently been added. Backporting the fix to my typo should keep it that way. This is an example of why code review even of patches that 'work' is a good thing.