I've updated PEP 803 (“abi3t”: Stable ABI for Free-Threaded Builds) based on discussion that started in the previous issue.
Proposed API changes:
-
Users set Py_TARGET_ABI3T to build against abi3t, which is like abi3 but for free-threaded builds.
Implementation-wise, setting Py_TARGET_ABI3T will set:
Py_LIMITED_API (to the same version, or minimum if the user defined both) and
_Py_OPAQUE_PYOBJECT, which hides some API.
If both Py_LIMITED_API and Py_GIL_DISABLED are set, CPython headers set Py_TARGET_ABI3T automatically.
-
Py_mod_abi becomes mandatory if the new PyModExport_* hook is used
PyMutex/PyCriticalSection is left for a separate discussion. (Without locks, abi3t modules can work correctly but need Py_MOD_GIL_USED in practice.)
Should we recommend this to the SC?
I've updated PEP 803 (“abi3t”: Stable ABI for Free-Threaded Builds) based on discussion that started in the previous issue.
Proposed API changes:
Users set
Py_TARGET_ABI3Tto build againstabi3t, which is likeabi3but for free-threaded builds.Implementation-wise, setting
Py_TARGET_ABI3Twill set:Py_LIMITED_API(to the same version, or minimum if the user defined both) and_Py_OPAQUE_PYOBJECT, which hides some API.If both
Py_LIMITED_APIandPy_GIL_DISABLEDare set, CPython headers setPy_TARGET_ABI3Tautomatically.Py_mod_abibecomes mandatory if the newPyModExport_*hook is usedPyMutex/PyCriticalSectionis left for a separate discussion. (Without locks,abi3tmodules can work correctly but needPy_MOD_GIL_USEDin practice.)Should we recommend this to the SC?