-
-
Notifications
You must be signed in to change notification settings - Fork 32.4k
gh-132661: Disallow Template
/str
concatenation after PEP 750 spec update
#135996
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
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.
Thank you!
Happy to help out / review this PR if you wanna take a stab at it. Feel free to reach out if you have any specific questions. |
Today was, alas, not that day.
@lysnikolaou Think this is ready. The only question for me is whether we want to go further with |
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.
Thank you! Several small nitpicks :)
Misc/NEWS.d/next/Core_and_Builtins/2025-07-08-23-22-08.gh-issue-132661.34ftJl.rst
Outdated
Show resolved
Hide resolved
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 @davepeck for working on this! Looks great in general. Left a few unimportant comments and one more significant one about how to implement this in the parser. Also, we'll need to change ast_unparse.c
around https://github.com/python/cpython/blob/main/Python/ast_unparse.c#L715.
…e-132661.34ftJl.rst Co-authored-by: Lysandros Nikolaou <lisandrosnik@gmail.com>
Co-authored-by: Lysandros Nikolaou <lisandrosnik@gmail.com>
…nto pep750-concat-update
👍 Thanks, @lysnikolaou for all your patience and help here -- think I took care of the rest. |
LGTM |
Looks great and aaalmost there. I have one last thing I missed during my previous reviews. If I remember correctly, https://github.com/python/cpython/blob/main/Python/codegen.c#L4084-L4093 can be removed as well, because it's only there to handle After that, it's gonna be good to go, promise! |
@lysnikolaou Ah, yes -- thank you. Removed now; tests continue to pass. (If we prefer, I can replace |
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.
Looks good to me! Thanks @davepeck! Great work.
Thanks @davepeck for the PR, and @lysnikolaou for merging it 🌮🎉.. I'm working now to backport this PR to: 3.14. |
Sorry, @davepeck and @lysnikolaou, I could not cleanly backport this to
|
I can handle tha backport. |
…0 spec update (python#135996) Co-authored-by: sobolevn <mail@sobolevn.me> Co-authored-by: Lysandros Nikolaou <lisandrosnik@gmail.com> (cherry picked from commit c5e77af)
Following the steering council decision and corresponding update to PEP750, we are removing support for both implicit and explicit
Template
/str
concatenation.