The free-threaded (--disable-gil) build of CPython 3.13 doesn't currently support the limited API. Let's adjust setup.py so that Py_LIMITED_API is not defined in Py_GIL_DISABLED builds.
For context, we'd like the free-threaded build to support a version of the limited API, but it probably won't happen in time for 3.13. See also https://github.com/python/cpython/issues/111506.
Summary
Description
The free-threaded (
--disable-gil
) build of CPython 3.13 doesn't currently support the limited API. Let's adjustsetup.py
so thatPy_LIMITED_API
is not defined inPy_GIL_DISABLED
builds.For context, we'd like the free-threaded build to support a version of the limited API, but it probably won't happen in time for 3.13. See also https://github.com/python/cpython/issues/111506.