On 27/09/2021 16.32, Ronald Oussoren via Python-Dev wrote:


On 26 Sep 2021, at 19:03, Christian Heimes <christ...@python.org <mailto:christ...@python.org>> wrote:

On 26/09/2021 13.07, jack.jan...@cwi.nl <mailto:jack.jan...@cwi.nl> wrote:
The problem with the stable ABI is that very few developers are targeting it. I’m not sure why not, whether it has to do with incompleteness of the ABI, or with issues targeting it easily and your builds and then having pip/PyPI do the right things with wheels and all that. I’ve been on the capi-sig mailing list since its inception in 2007, but the discussions are really going over my head. I don’t understand what the problems are that keep people from targeting the stable ABI (or the various other attempts at standardising extensions over Python versions).

It takes some effort to port old extensions to stable ABI. Several old APIs are not supported in stable ABI extensions. For example developers have to port static type definitions to heap types. It's not complicated, but it takes some effort.

The stable ABI is also not complete, although it should be complete enough for a lot of projects.  A, fairly esoteric, issue I ran into is that it is currently not possible to define a class with a non-default meta class using the type-spec API (AFAIK), see #15870.

And as you write “it takes some effort”, that alone likely reduces the amount of projects that migrate to the stable ABI esp. for projects that already have a CI/CD setup that creates binary wheels for you (for example using cibuildwheel).

Indeed, the stable ABI is not complete. I just figured out that limited API < 3.9 cannot define objects with weakref support or dict offset. The __weaklistoffset__ and __dictoffset__ PyMemberDefs were added in Python 3.9.

Christian
_______________________________________________
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/G7YTJ62XB4QJJY43RDZTUFIYBQ5P5W57/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to