Does HPy have any clear guidance or assistance for their users to keep it up to date? I'm concerned that if we simply substitute "support the C API for everyone" with "support the C API for every version of HPy" we're no better off. I think it can be done with clear communication from the HPy project (and us when we endorse it) that they will *never* break compatibility and it's *always* safe (and indeed, essential) for their users to use the latest version. But that's a big commitment that I can't sign them up for. Cython seems to manage it okay. I can't remember the last compat issue I had there that wasn't on our (C-API) side. Thoughts? Cheers, Steve On 1/28/2022 4:50 PM, Victor Stinner wrote:
Wait, where is the HPy project in that plan? :-) The HPy project (brand new C API) is a good solution for the long term!
My concerns about HPy right now is that, in short, CPython has to continue supporting the C API for a few more years, and we cannot evolve CPython before it will become reasonable to consider removing the "legacy" C API.
I explained that in details in the PEP 674 (Disallow using Py_TYPE() and Py_SIZE() macros as l-values): https://www.python.org/dev/peps/pep-0674/#relationship-with-the-hpy-project
In parallel, we should continue promoting the usage of Cython, cffi, pybind11 and HPy, rather than using directly the C API.
Victor