gh-155561: Use multi-phase init for Modules/_testlimitedcapi.c - #156052
gh-155561: Use multi-phase init for Modules/_testlimitedcapi.c#156052encukou wants to merge 9 commits into
Conversation
|
According to CIs, building _testlimitedcapi fails on Free Threading: |
| // Use the oldest limited C API version | ||
| # define Py_LIMITED_API 0x03020000 | ||
| #endif | ||
| // Need limited C API version 3.15 for PySlot |
There was a problem hiding this comment.
PySlot is not used. I suppose that this comment is outdated.
|
🤖 New build scheduled with the buildbot fleet by @encukou for commit 009ce74 🤖 Results will be shown at: https://buildbot.python.org/all/#/grid?branch=refs%2Fpull%2F156052%2Fmerge If you want to schedule another build, you need to add the 🔨 test-with-buildbots label again. |
|
The Alpine Linux buildbot failure looks like a legit bug, but it's unrelated to this change: |
Ah, in fact the AMD64 Alpine Linux NoGIL 3.x buildbot already fails on the main branch: I wrote PR gh-156893 to fix the issue. |
|
The "buildbot/AMD64 CentOS9 NoGIL PR" failure is the same as the Alpine Linux issue: test_cppext fails, so PR #156893 will fix it. |
vstinner
left a comment
There was a problem hiding this comment.
LGTM.
This change doesn't build Modules/_testlimitedcapi.c with the limited C API on Free Threading yet, but it converts the module to multi-phase init which is already a good step forwards!
This is a continuation of #155693
We can't use PyModExport for modules that might be in inittab, but we can move to multi-phase init.