FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

gh-140544: cleanup `HAVE_THREAD_LOCAL` checks in pystate.c by kumaraditya303 · Pull Request #140547 · python/cpython · GitHub

/ cpython Public

gh-140544: cleanup HAVE_THREAD_LOCAL checks in pystate.c - #140547

Merged
kumaraditya303 merged 1 commit into
python:mainfrom
kumaraditya303:pystate
Oct 24, 2025
Merged

gh-140544: cleanup HAVE_THREAD_LOCAL checks in pystate.c#140547
kumaraditya303 merged 1 commit into
python:mainfrom
kumaraditya303:pystate

Conversation

kumaraditya303 commented Oct 24, 2025
edited by bedevere-app Bot
Loading

Copy link
Copy Markdown
Contributor

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.

ZeroIntensity left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

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

Copy link
Copy Markdown
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.

Copy link
Copy Markdown
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 enabled auto-merge (squash) October 24, 2025 13:53
kumaraditya303 merged commit ebf9938 into python:main Oct 24, 2025
85 of 87 checks passed
kumaraditya303 deleted the pystate branch October 24, 2025 14:32
StanFromIreland pushed a commit to StanFromIreland/cpython that referenced this pull request Dec 6, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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


Back | FazBrowse Home | New Git URL