gh-127989: C API: Refer to attached thread states instead of the GIL - #127990
Conversation
|
Nobody expects the Spanish Inquisition! @ericsnowcurrently: please review the changes made to this pull request. |
vstinner
left a comment
There was a problem hiding this comment.
LGTM. I'm fine with "attached thread state" and "active thread state".
encukou
left a comment
There was a problem hiding this comment.
LGTM; I'll merge ~tomorrow if there are no objections.
IMO, it's fine to have C API details in the glossary for terms related to the C API -- which these are.
My main worry is that per the SC's pronouncement on PEP 703, all changes related to free-threading should be revertable. Unfortunately, we can't really put #ifs in the docs, so the revert will need to start with a manual search for "free-threading".
But, I expect the term "attached thread state" -- and so, the bulk of the changes here -- to stay even if nogil needs to be abandoned for some reason.
|
Oh, I missed the change request (is it just me or were these more prominent not that long ago?) @ericsnowcurrently, do you want to block this iteration? |
|
No real objections; I defer to you, Victor and Alyssa. |
|
I already approved the PR :-) |

As I said in the issue, this is a big change, but it should help clear things up for users. Any feedback, or pointing out flaws, is definitely appreciated!
📚 Documentation preview 📚: https://cpython-previews--127990.org.readthedocs.build/