- bitarray:
bitarray/_bitarray.cusesPy_SET_SIZE()(pythoncapi_compat.h copy) - datatable (commit)
- guppy3 (commit)
- immutables:
immutables/_map.cusesPy_SET_SIZE()(pythoncapi_compat.h copy) - Mercurial (hg) uses
Py_SET_TYPE()(commit, pythoncapi_compat.h copy) - mypy (mypyc, commit)
- numpy: pythoncapi-compat Git submodule
- pybluez (commit)
- python-snappy (commit)
- python-zstandard
uses
Py_SET_TYPE()andPy_SET_SIZE()(commit): Mercurial extension. - python-zstd (commit)
- hollerith
src/writer.cusesPyObject_CallOneArg() and other Python 3.9 apis(pythoncapi_compat.h copy) - PyTorch (pythoncapi_compat.h copy)
- PyGObject (commit, pythoncapi-compat Meson subproject)
Projects not using pythoncapi_compat.h:
- numpy has its own compatibility layer,
npy_pycompat.handnpy_3kcompat.hheader files. It supports more C compilers than pythoncapi_compat.h: it supports__STRICT_ANSI__(ISO C90) for example. Rejected PR 18713: MAINT: Use pythoncapi_compat.h in npy_3kcompat.h (when it was rejected, numpy still had code for compatibility with Python 2.7). - Cython doesn't use pythoncapi_compat.h:
see Cython issue #3934.
For example, ModuleSetupCode.c
provides functions like
__Pyx_SET_REFCNT().
Project with a strict contributor agreement: