-
-
Notifications
You must be signed in to change notification settings - Fork 31.8k
gh-108654: restore comprehension locals before handling exception #108659
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
Co-authored-by: Dong-hee Na <donghee.na92@gmail.com>
🤖 New build scheduled with the buildbot fleet by @JelleZijlstra for commit 8e8b41f 🤖 If you want to schedule another build, you need to add the 🔨 test-with-buildbots label again. |
In offline conversation, @markshannon and @gvanrossum suggested that we should just always do this cleanup (regardless of whether there is an outer handler or not), for consistency of what appears in the frame under traceback inspection. The cost is only in code size (no perf cost unless an exception is raised), but overall code size is still likely smaller than the non-inlined version with a separate code object, so that's not a big concern. I will make that update. I'll also look into the buildbot failures here and see if any of them are legit related to this PR. |
* main: pythongh-108520: Fix bad fork detection in nested multiprocessing use case (python#108568) pythongh-108590: Revert pythongh-108657 (commit 400a1ce) (python#108686) pythongh-108494: Argument Clinic: Document how to generate code that uses the limited C API (python#108584) Document Python build requirements (python#108646) pythongh-101100: Fix Sphinx warnings in the Logging Cookbook (python#108678) Fix typo in multiprocessing docs (python#108666) pythongh-108669: unittest: Fix documentation for TestResult.collectedDurations (python#108670) pythongh-108590: Fix sqlite3.iterdump for invalid Unicode in TEXT columns (python#108657) Revert "pythongh-103224: Use the realpath of the Python executable in `test_venv` (pythonGH-103243)" (pythonGH-108667) pythongh-106320: Remove private _Py_ForgetReference() (python#108664) Mention Ellipsis pickling in the docs (python#103660) Revert "Use non alternate name for Kyiv (pythonGH-108533)" (pythonGH-108649) pythongh-108278: Deprecate passing the first param of sqlite3.Connection callback APIs by keyword (python#108632) pythongh-108455: peg_generator: install two stubs packages before running mypy (python#108637) pythongh-107801: Improve the accuracy of io.IOBase.seek docs (python#108268)
The refleak buildbots are all failing due to a refleak in |
This buildbot has been failing with the same crash for a while now: These Clang buildbots have all been seeing the same PPC64 Fedora PR has been seeing the same timeout in AMD64 RHEL8 FIPS Only Blake2 Builtin Hash PR has been failing aarch64 Fedora Stable LTO + PGO PR and aarch64 Fedora Stable LTO PR have both been failing in |
That leaves only the |
Rebuild was successful, so I believe this PR is buildbot-clean, relative to main branch. |
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 for fixing this and thanks for chasing down all the buildbots.
Thanks @carljm for the PR 🌮🎉.. I'm working now to backport this PR to: 3.12. |
GH-108700 is a backport of this pull request to the 3.12 branch. |
…on (pythonGH-108659) (cherry picked from commit d52c448) Co-authored-by: Carl Meyer <carl@oddbird.net> Co-authored-by: Dong-hee Na <donghee.na92@gmail.com>
|
If an inlined comprehension raises an exception, insert a cleanup handler to restore any locals' values that were overwritten within the comprehension, in case an outer exception handler uses those locals.