An alternative to the C API is to rewrite a C extension using cffi.
XXX write a better rationale why migrating to cffi!
- Is it easy to distribute binaries generated by cffi to avoid to require C headers and a C compiler? (Windows, macOS, Linux?)
- How many popular Python modules use the C API? See Consumers of the Python C API.
- How long would it take to rewrite a C extension with
- What is the long-term transition plan to reach the “no C API” goal? At least, CPython will continue to use its own C API internally.
- How to deal with backward compatibility?
Small practical issue:
cffi is not part of the Python 3.7 standard library
yet. Previous attempt to add it, in 2013: [Python-Dev] cffi in stdlib.