On Fri, Feb 4, 2022 at 12:52 AM Eric V. Smith <e...@trueblade.com> wrote: > > On 2/3/2022 12:15 PM, Victor Stinner wrote: > > > > IMO if PyObject* becomes a handle, the migration to the HPy API should > > be much easier. > > It seems to me that moving PyObject* to be a handle leaves you in a > place very similar to HPy. So why not just focus on making HPy suitable > for developing C extensions, leave the existing C API alone, and > eventually abandon the existing C API?
I tried to explain the reasons why HPy doesn't solve all problems in the PEP 674: https://www.python.org/dev/peps/pep-0674/#the-c-api-is-here-is-stay-for-a-few-more-years One problem is to provide a better C API to users: HPy is great for that! Another problem is the inability to evolve Python because the C API leaks implementation details: HPy doesn't solve this problem because Python must continue supporting the C API for a few more years. My approach is to (slowly) bend the C API towards HPy design/API to ease the migration to HPy *and* (slowly) allow changing more Python internals (without affecting the public C API). Victor -- Night gathers, and now my watch begins. It shall not end until my death. _______________________________________________ Python-Dev mailing list -- python-dev@python.org To unsubscribe send an email to python-dev-le...@python.org https://mail.python.org/mailman3/lists/python-dev.python.org/ Message archived at https://mail.python.org/archives/list/python-dev@python.org/message/BIAGMMRJP45FR3R5DS772TZZU6AQVO2V/ Code of Conduct: http://python.org/psf/codeofconduct/