Skip to content

Conversation

@kumaraditya303
Copy link
Contributor

@kumaraditya303 kumaraditya303 commented Oct 24, 2025

In preparation for storing interpreter state as thread-local variable.

The GIL state functions such as gilstate_get already access _Py_tss_gilstate unconditionally so rather than adding this check everywhere, it is added in the beginning of the file now.

Copy link
Member

@ZeroIntensity ZeroIntensity left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm a little worried about the rationale expressed in the issue, but I think we should do this anyway.

@corona10
Copy link
Member

I'm a little worried about the rationale expressed in the issue, but I think we should do this anyway.

Yeah, I feel the same way.

@kumaraditya303
Copy link
Contributor Author

I'm a little worried about the rationale expressed in the issue, but I think we should do this anyway.

Yeah, this cleanup is orthogonal to the issue but still seems good to clean this up a bit.

@kumaraditya303 kumaraditya303 enabled auto-merge (squash) October 24, 2025 13:53
@kumaraditya303 kumaraditya303 merged commit ebf9938 into python:main Oct 24, 2025
85 of 87 checks passed
@kumaraditya303 kumaraditya303 deleted the pystate branch October 24, 2025 14:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants