Skip to content

Conversation

@kumaraditya303
Copy link
Contributor

@kumaraditya303kumaraditya303 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

@ZeroIntensityZeroIntensity 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
ContributorAuthor

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.

@kumaraditya303kumaraditya303 enabled auto-merge (squash) October 24, 2025 13:53
@kumaraditya303kumaraditya303 merged commit ebf9938 into python:mainOct 24, 2025
85 of 87 checks passed
@kumaraditya303kumaraditya303 deleted the pystate branch October 24, 2025 14:32
StanFromIreland pushed a commit to StanFromIreland/cpython that referenced this pull request Dec 6, 2025
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@kumaraditya303@corona10@ZeroIntensity