Uh oh!
There was an error while loading. Please reload this page.
Docs: C API: Improve documentation around non-Python threads with subinterpreters - #131087
Conversation
sharktide
commented
Mar 17, 2025
I can make backport if review passes |
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.
ZeroIntensity
commented
Mar 20, 2025
I'll deal with resolving conflicts later today. |
Uh oh!
There was an error while loading. Please reload this page.
ZeroIntensity
commented
Mar 24, 2025
I've opted to not backport this because we're using thread state terms now. |
sharktide
commented
Mar 24, 2025
via email
ok :) …On Mon, Mar 24, 2025 at 10:44 AM Peter Bierma ***@***.***> wrote:
I've opted to not backport this because we're using thread state terms now.
—
Reply to this email directly, view it on GitHub
<#131087 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/BNITW56N5GH66FQNT6MXOHT2WAK6FAVCNFSM6AAAAABYY2QLM2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDONBYGM3TQNZSGE>
.
You are receiving this because you commented.Message ID:
***@***.***>
[image: ZeroIntensity]*ZeroIntensity* left a comment
(python/cpython#131087)
<#131087 (comment)>
I've opted to not backport this because we're using thread state terms now.
—
Reply to this email directly, view it on GitHub
<#131087 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/BNITW56N5GH66FQNT6MXOHT2WAK6FAVCNFSM6AAAAABYY2QLM2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDONBYGM3TQNZSGE>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
ZeroIntensity
commented
May 5, 2025
@encukou I forgot about this one. Would you mind finishing up your review when you have some time? |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Co-authored-by: Victor Stinner <vstinner@python.org>
Thanks @ZeroIntensity for the PR, and @encukou for merging it 🌮🎉.. I'm working now to backport this PR to: 3.14. |
…interpreters (pythonGH-131087) (cherry picked from commit af6b3b8) Co-authored-by: Peter Bierma <zintensitydev@gmail.com> Co-authored-by: Victor Stinner <vstinner@python.org>
encukou
commented
May 17, 2025
Just did. Sorry for the delay! |
GH-134130 is a backport of this pull request to the 3.14 branch. |
…interpreters (pythonGH-131087) Co-authored-by: Victor Stinner <vstinner@python.org>
…interpreters (pythonGH-131087) Co-authored-by: Victor Stinner <vstinner@python.org>
@da-woods's comment inspired me to improve some of the documentation here. This should play pretty nicely with the incoming
PyThreadState_EnsureAPI, and with GH-127990 whenever that gets merged.PyThreadState *to support subinterpreters in a non-Python thread.PyGILState_Ensure's note to a warning, and mention that it can actually crash the interpreter. (See Debug build assertion failure with native threads attempting to acquire GIL on termination #131012 and PyGILStateEnsure() (Probably) Crashes If Called After Finalization #124619.)PyGILState_Checkalways returns 1 if subinterpreters are enabled.PyGILState_GetThisThreadStatedoesn't account for non-GILStatethread states.PyThreadState_Swapwill also hang the thread during finalization (but unlikeGILState, it shouldn't crash).📚 Documentation preview 📚: https://cpython-previews--131087.org.readthedocs.build/en/131087/c-api/init.html#supporting-subinterpreters-in-non-python-threads