[Python-Dev] Let's change to C API!

Victor Stinner vstinner at redhat.com
Sun Jul 29 15:47:51 EDT 2018


Hi,

I just sent an email to the capi-sig mailing list. Since this mailing
list was idle for months, I copy my email here to get a wider
audience. But if possible, I would prefer that you join me on capi-sig
to reply ;-)

--

Hi,

Last year, I gave a talk at the Language Summit (during Pycon) to
explain that CPython should become 2x faster to remain competitive.
IMHO all attempts to optimize Python (CPython forks) have failed
because they have been blocked by the C API which implies strict
constraints.

I started to write a proposal to change the C API to hide
implementation details, to prepare CPython for future changes. It
allows to experimental optimization ideas without loosing support for
C extensions.

C extensions are a large part of the Python success. They are also the
reason why PyPy didn't replace CPython yet. PyPy cpyext remains slower
than CPython because PyPy has to mimick CPython which adds a
significant overhead (even if PyPy developers are working *hard* to
optimize it).

I created a new to discuss how to introduce backward incompatible
changes in the C API without breaking all C extensions:

   http://pythoncapi.readthedocs.io/

The source can be found at:

   https://github.com/vstinner/pythoncapi/

I would like to create a team of people who want to work on this
project: CPython, PyPy, Cython and anyone who depends on the C API.
Contact me in private if you want to be added to the GitHub project.

I propose to discuss on the capi-sig mailing list since I would like
to involve people from various projects, and I don't want to bother
you with the high traffic of python-dev.

Victor

PS: I added some people as BCC ;-)


More information about the Python-Dev mailing list