The pythoncapi-compat project can be used to write a C extension supporting a wide range …
https://github.com/python/pythoncapi-compat
latest