Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork33.4k
gh-130080: implement PEP 765#130087
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
gh-130080: implement PEP 765#130087
Uh oh!
There was an error while loading.Please reload this page.
Conversation
markshannon left a comment• edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
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, but I'm not sure I entirely trust the overwrite/save/overwrite logic.
Saving, overwriting and then overwriting again seems an error prone way to maintain a stack of the current context.ControlFlowInFinallyState can fit in a single byte and the depth of try-finally is limited to 20 (CO_MAXBLOCKS) so a stack will only take 20 bytes or so.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
When you're done making the requested changes, leave the comment: |
iritkatriel commentedMar 5, 2025
I have made the requested changes; please review again. |
Co-authored-by: Tomas R. <tomas.roun8@gmail.com>
iritkatriel commentedMar 15, 2025
I have made the requested changes; please review again. |
Thanks for making the requested changes! @markshannon: please review the changes made to this pull request. |
markshannon left a comment
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.
There are two unused fields in_PyASTOptimizeState that need removing, otherwise looks good.
Python/ast_opt.c Outdated
| intff_features; | ||
| intsyntax_check_only; | ||
| intrecursion_depth;/* current recursion depth */ |
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.
This doesn't appear to be used anywhere (same forrecursion_limit)
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. I think they were removed in the const folding PRs after I created this one.
picnixz left a comment
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.
Just some docs comments.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
| *:ref:`PEP 741: Python Configuration C API<whatsnew314-pep741>` | ||
| *:ref:`PEP 761: Discontinuation of PGP signatures<whatsnew314-pep761>` | ||
| *:ref:`A new type of interpreter<whatsnew314-tail-call>` | ||
| *:ref:`PEP 765: Disallow return/break/continue that exit a finally block<whatsnew314-pep765>` |
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.
For the reader, I think it may be better to have the PEP bullet points grouped.
Uh oh!
There was an error while loading.Please reload this page.
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
ffc2f1d intopython:mainUh oh!
There was an error while loading.Please reload this page.
…pythonGH-137318)This is required so we would never have empty node bodies.RefspythonGH-130087(cherry picked from commitb74f3be)Co-authored-by: sobolevn <mail@sobolevn.me>
…python#137318)This is required so we would never have empty node bodies.Refspython#130087
Uh oh!
There was an error while loading.Please reload this page.