Uh oh!
There was an error while loading. Please reload this page.
gh-140544: Always assume that thread locals are available - #140690
Conversation
HAVE_THREAD_LOCAL macro is defined.Hmm, I'm still getting the same error I mentioned earlier. Somehow the |
cdce8p
commented
Oct 27, 2025
Do I need to pass |
Hm, you're defining |
cdce8p
commented
Oct 27, 2025
That hasn't been an issue so far. The check here works fine / if I remove cpython/Include/internal/pycore_mimalloc.h Lines 4 to 6 in f5394c2 |
This fixes extensions that define Py_BUILD_CORE after including Python.h, but before including pycore_pystate.h, such as mypyc.
ZeroIntensity
commented
Oct 27, 2025
I just pushed a new commit, where |
cdce8p
commented
Oct 27, 2025
This works now. --
I missed that mypyc is defining |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
kumaraditya303
commented
Oct 28, 2025
@cdce8p Would you please check that mypyc still works after the new changes? |
cdce8p
commented
Oct 28, 2025
Just ran the whole test suite again. Looks good. |
Uh oh!
There was an error while loading. Please reload this page.
…onGH-140690) Python has required thread local support since 3.12 (see pythonGH-103324). By assuming that thread locals are always supported, we can improve the performance of third-party extensions by allowing them to access the attached thread and interpreter states directly.
Python has required thread local support since 3.12. By assuming that thread locals are always supported, we can improve the performance of third-party extensions by allowing them to access the attached thread and interpreter states directly.
cc @cdce8p