[3.13] Docs: C API: Fix the incorrect PyThreadState_Swap
documentation
#133900
+3
−2
Follow Lee on X/Twitter - Father, Husband, Serial builder creating AI, crypto, games & web tools. We are friends :) AI Will Come To Life!
Check out: eBank.nz (Art Generator) |
Netwrck.com (AI Tools) |
Text-Generator.io (AI API) |
BitBank.nz (Crypto AI) |
ReadingTime (Kids Reading) |
RewordGame |
BigMultiplayerChess |
WebFiddle |
How.nz |
Helix AI Assistant
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 📚: