You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, enablng py_limited_api=True on Python 3.13 freethreaded results in hard failure.
Describe the solution you'd like
I think setuptools should fall back to building a regular (i.e. non-limited API) extension when Python 3.13 freethreading is used, just like it does for PyPy3 (that does not support the stable ABI). This also means removing Py_LIMITED_API macro from define_macros, which is a bit yucky.
Alternative Solutions
Right now, the main alternative is to special-case freethreading in every package separately, and do not enable the limited API if it's used. However, besides a lot of repetition, this means that every project would explicitly need to track the stable ABI support in freethreading builds, and update the special cases when it's implemented.
Alternatively, instead of removing py_limited_api and Py_LIMITED_API macros, we could change CPython to ignore it and use the regular API (just like PyPy does). However, this would mean that old versions of setuptools would still be producing abi3 wheels for that.
What's the problem this feature will solve?
Currently, enablng
py_limited_api=True
on Python 3.13 freethreaded results in hard failure.Describe the solution you'd like
I think setuptools should fall back to building a regular (i.e. non-limited API) extension when Python 3.13 freethreading is used, just like it does for PyPy3 (that does not support the stable ABI). This also means removing
Py_LIMITED_API
macro fromdefine_macros
, which is a bit yucky.Alternative Solutions
Right now, the main alternative is to special-case freethreading in every package separately, and do not enable the limited API if it's used. However, besides a lot of repetition, this means that every project would explicitly need to track the stable ABI support in freethreading builds, and update the special cases when it's implemented.
Alternatively, instead of removing
py_limited_api
andPy_LIMITED_API
macros, we could change CPython to ignore it and use the regular API (just like PyPy does). However, this would mean that old versions of setuptools would still be producingabi3
wheels for that.Additional context
Related to #4420, and python/cpython#111506 for the wider issue.
Code of Conduct
The text was updated successfully, but these errors were encountered: