C API Working Group and plan to get a Python C API compatible with alternative Python implementations?

Maybe the C API documentation should have a header, on each page, to mention recommended high-level projects such as Cython, nanobind, HPy, etc. Honestly, I would prefer that only these high-level projects would consume our C API, and that all others “C extensions” would only use these abstractions. It would reduce the number of impacted projects when the C API evolves. And it evolves at each Python (x.y) release: some functions are removed, some functions are added.

I don’t think that we need to have a preference between Cython and HPy. Users should make their own choices depending on their needs and use cases.

Cython and a few others are already mentions in two places:

In short, the C API should not be used directly :slight_smile:

7 Likes