Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork32k
gh-128639: Don't assume one thread in subinterpreter finalization#128640
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-128639: Don't assume one thread in subinterpreter finalization#128640
Uh oh!
There was an error while loading.Please reload this page.
Conversation
Py_NewInterpreter(); | ||
Py_NewInterpreter(); | ||
Py_NewInterpreter(); | ||
PyThreadState *tstate = PyThreadState_Get(); |
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.
I think this test working before was a fluke.Py_NewInterpreter
changes the thread state, and I don't think we support callingPy_Finalize
from a subinterpreter.
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.
It's probably okay but your change helps future-proof the test.
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.
mostly LGTM
There are a few things that might make more sense in a separate PR.
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.
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.
Py_NewInterpreter(); | ||
Py_NewInterpreter(); | ||
Py_NewInterpreter(); | ||
PyThreadState *tstate = PyThreadState_Get(); |
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.
It's probably okay but your change helps future-proof the test.
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.
A Python core developer has requested some changes be made to your pull request before we can consider merging it. If you could please address their requests along with any other requests in other reviews from core developers that would be appreciated. Once you have made the requested changes, please leave a comment on this pull request containing the phrase |
Co-authored-by: Eric Snow <ericsnowcurrently@gmail.com>
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.
LGTM
Thanks for doing this!
9859791
intopython:mainUh oh!
There was an error while loading.Please reload this page.
@hugovk, is this something you'd be okay with us backporting to 3.14? |
Yep, crash bugfixes can be backported :) |
Thanks@ZeroIntensity for the PR, and@ericsnowcurrently for merging it 🌮🎉.. I'm working now to backport this PR to: 3.14. |
…on (pythongh-128640)Incidentally, this also fixed the warning not showing up if a subinterpreter wasn'tcleaned up via _interpreters.destroy. I had to update some of the tests as a result.(cherry picked from commit9859791)Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
GH-134254 is a backport of this pull request to the3.14 branch. |
bedevere-bot commentedMay 19, 2025
|
…nalization (pythongh-128640)"This reverts commit9859791.
Uh oh!
There was an error while loading.Please reload this page.
Incidentally, this also fixed the warning not showing up if a subinterpreter wasn't cleaned up via
_interpreters.destroy
. I had to update some of the tests as a result.