I have to again reply on few things since unfortunately it would be useful to have more precise answers, in particular about the possibility that in some time CPython provides a new modern C API independent from the historical C API (that has to evolve slowly and relatively weakly). This new C API does not have to be HPy so your answers about the “positions that the core devs can take towards HPy” does not really help.
Your point of view about this possibility would be useful in particular to answer to @rgommers (see C API Working Group and plan to get a Python C API compatible with alternative Python implementations? - #24 by paugier), which is important to think about what should be done for Numpy.
I ask about this potential new Python C API because we see signs that it could be useful and that there might be some projects about this:
I should also mention GitHub - markshannon/New-C-API-for-Python: Design and discussion for the new C-API for Python and this idea from the Faster CPython project ideas/3.14 at main · faster-cpython/ideas · GitHub.
This potential new Python C API could also be somehow inspired by HPy, so it would be very interesting to have your point of view about “Future of HPy, Take 2” in C API Working Group and plan to get a Python C API compatible with alternative Python implementations? - #19 by steve-s
It is interesting to note that the Python code devs who replied in this page seem to consider HPy only as a consumer of the CPython C API (like pybind11 or Cython). This is indeed one of its nature (an implementation detail used only for CPython) but HPy is also something else. As clearly explained by @steve-s, it is also an attempt to design and implement a new modern C API for interactions between “the Python VM and 3rd party native extensions for Python”.
This second nature of HPy explains that one might think that the C API WG could be deeply interesting about HPy, because, especially after PEP 733, one could have thinked that the C API WG would also design and propose a new modern C API, i.e. that there would be two parallel and simultaneous efforts:
- slow and gradual evolution of the historical CPython C API (what is currently done) and
- work on a new modern Python C API,
and that the two APIs could live together for a very long time.
This is clearly this second nature of HPy (a new modern Python C API) which brings a particular difficulty that other projects like pybind11 or Cython do not have. HPy is in direct competition with a potential project that does not even exist: a new modern Python API designed and implemented by CPython core devs and the “official” C API WG. This project has not even been announced but the only fact that it could be started stops projects from investing on HPy. I think this is highly related to what @rgommers wrote in his email:
if CPython core devs don’t want to adopt it but do their own “make the C API more opaque” strategy, then more effort on HPy isn’t going to help.
Hence, I think that the C API WG should officially say something more about these problems, which seem to be in the scope of this WG.
I also like to react on something that @steve.dower mentions few time, for example here
This is of course partly true but paying people to work on something is also quite common, also in the Python area. For example, it seems to me that Microsoft and Meta are founding the Faster CPython project and free-threading, respectively. Knowing the current state of HPy, it seems to me that with a bit of money and few people paid on a new modern Python C API (HPy or something else, Numpy port, Cython backend, Meson build, etc.) during 2 years, we could have a Python ecosystem in a much better state than nowadays in a relatively short time (not ten years). And then motivation would come with the first nice results. In contrast to what you say, I think a clear direction indicated from above (in particular the C API WG) would help.