Skip to content

[3.13] Docs: C API: Fix the incorrect PyThreadState_Swap documentation #133900

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 19, 2025

Conversation

ZeroIntensity
Copy link
Member

@ZeroIntensity ZeroIntensity commented May 11, 2025

I've already fixed this for main and 3.14 in gh-127990, but that wasn't backported to 3.13. I'm not planning on fixing any other 3.13 docs, but PyThreadState_Swap is especially bad, because the documentation says you need to hold the GIL to call it, which is wrong and would defeat the whole point of the function if it were true. I've seen people get confused by that on several different occasions.


📚 Documentation preview 📚: https://cpython-previews--133900.org.readthedocs.build/en/133900/c-api/init.html#c.PyThreadState_Swap

@kumaraditya303 kumaraditya303 merged commit 8d92823 into python:3.13 May 19, 2025
32 checks passed
@github-project-automation github-project-automation bot moved this from Todo to Done in Docs PRs May 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants