-
-
Notifications
You must be signed in to change notification settings - Fork 32.1k
bpo-40614: Respect feature version for f-string debug expressions #20196
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
Conversation
@pablogsal If this is okay, I guess we should also change the old parser to do this and backport that to 3.8 as well? |
Yeah, but the backport should be done manually to not include the parts for the new parser. |
Misc/NEWS.d/next/Library/2020-05-18-22-41-02.bpo-40614.8j3kmq.rst
Outdated
Show resolved
Hide resolved
RAISE_SYNTAX_ERROR("f-string: self documenting expressions are " | ||
"only supported in Python 3.8 and greater"); |
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.
Feel free to ignore this. (Note that if you don't the message should be changed in the old parser as well)
RAISE_SYNTAX_ERROR("f-string: self documenting expressions are " | |
"only supported in Python 3.8 and greater"); | |
RAISE_SYNTAX_ERROR("Self-documenting expressions in f-strings are " | |
"only supported in Python 3.8 and greater"); |
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.
Thanks! All the other f-string SyntaxErrors start with "f-string: ", so I think it's good to stay consistent.
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.
Oh okay, didn't remember correctly then.
Co-authored-by: Lysandros Nikolaou <lisandrosnik@gmail.com>
Co-authored-by: Lysandros Nikolaou <lisandrosnik@gmail.com>
Happy to open a PR with a manual backport using cherry_picker if this gets merged! |
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.
Thanks!
Should that label be "needs backport to 3.8"? |
Nope, |
Thanks @hauntsaninja for the PR, and @pablogsal for merging it 🌮🎉.. I'm working now to backport this PR to: 3.9. |
Sorry @hauntsaninja and @pablogsal, I had trouble checking out the |
…ns (pythonGH-20196) Co-authored-by: Lysandros Nikolaou <lisandrosnik@gmail.com> Co-authored-by: Pablo Galindo <pablogsal@gmail.com> (cherry picked from commit c116c94) Co-authored-by: Shantanu <hauntsaninja@users.noreply.github.com>
GH-20464 is a backport of this pull request to the 3.9 branch. |
…thonGH-20196) Co-authored-by: Lysandros Nikolaou <lisandrosnik@gmail.com> Co-authored-by: Pablo Galindo <pablogsal@gmail.com> (cherry picked from commit c116c94)
Opened a backport to 3.8 in #20466 |
https://bugs.python.org/issue40614