Import setuptools before distutils setuptools 60 uses its own bundled version of distutils, by default. It injects this into sys.modules, at import time. So we need to make sure that it is imported, before anything else imports distutils, to ensure everything is using the same distutils version. . This change in setuptools is to prepare for Python 3.12, which will drop distutils.
Use Py_ssize_t when calling PyArg_Parse This has been available since Python 2.5, and our old int-based approach stopped working in Python 3.10. From https://bugs.python.org/issue36381: . Raise warning for # use without PY_SSIZE_T_CLEAN. . * 3.8: PendingDeprecationWarning * 3.9: DeprecationWarning * 3.10 (or 4.0): Remove PY_SSIZE_T_CLEAN and use Py_ssize_t always .
diff --git a/src/c/pyeclib_c/pyeclib_c.c b/src/c/pyeclib_c/pyeclib_c.c index 4e2646c..1968b80 100644