
On Wed, 20 Apr 2022 12:52:53 +0200 Victor Stinner <vstinner@python.org> wrote:
On Wed, Apr 20, 2022 at 10:03 AM Antoine Pitrou <antoine@python.org> wrote:
If the HPy design is the long term goal, why not just recommend that people use HPy? And keep the C API for expert users with specific needs that are not accomodated by HPy.
To me, it seems that trying to change the C API to be "like HPy" is creating a lot of work, churn and pain for little gain.
If you put HPy aside, "Fixing" the C API has multiple advantages for CPython and its (C API) users.
With the caveat that the "fixing" probably requires users to fix their packages as well.
For consumers of the C API (C extensions, Cython, pybind11, etc.), once most implementation details will be hidden, the C API will become way more stable.
The *API* is quite stable already if you don't use the private/internal functions. Perhaps you're thinking about the ABI?
(and, yes, perhaps HPy needs to be funded or supported by the PSF if it doesn't advance fast enough)
What can be done in practice for that? If I understood correctly, Oracle is sponsoring the project since they want to use HPy for GraalPython (of their GraalVM).
Also, Anaconda recently hired Antonio Cuni, hopefully giving him sufficient time to work on HPy. So perhaps nothing needs to be done in practice. Regards Antoine.