giampaolo / psutil

Cross-platform lib for process and system monitoring in Python
BSD 3-Clause "New" or "Revised" License
10.08k stars 1.37k forks source link

Don't build with limited API for 3.13 free-threaded build #2401

Closed colesbury closed 1 month ago

colesbury commented 2 months ago

Summary

Description

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.