[pypy-dev] PyPy3: is bytecode really incompatible between releases?

Armin Rigo armin.rigo at gmail.com
Sun Oct 20 16:21:39 EDT 2019


Hi Matti,

On Sun, 20 Oct 2019 at 09:47, Matti Picus <matti.picus at gmail.com> wrote:

> I would like to confirm that in fact there is an issue: that the
> c-extension shared objects are incompatible. I am not completely
> convinced this is the case, at least my experimentation with NumPy
> proved it indeed is *not* the case for PyPy2. I am open to hearing
> opinions from others. Is there a concensus around whether we do need to
> change the ABI designation? I think this would also require
> recompilation of any CFFI shared objects on PyPy2.

In PyPy2 there are two different numbers: the version in the
".pypy-XY.so" extension, and the internal version in the ".pyc" files.
In PyPy3 the ".pyc" files have grown to ".pypy-XY.pyc".  (This is
confusing because if you translate PyPy3.6 and the in-progress PyPy3.7
then they'll try to use the same ".pypy-XY.pyc" extension, even though
the internal bytecode version in that file is different.)  If we want
a
single number that changes mostly every release, then we're doing the
right thing.  If instead we prefer to keep several more precise
numbers, we should use different numbers for (a) the C extensions; (b)
the .pyc files; and even (c) the cffi modules.  As far as I
understand, the problem with doing that is that people used to (and
code used on) CPython are not really ready to handle this situation.

As for the precise question you're asking, "do we need to change the
ABI designation in PyPy2", the answer is yes, imho: we should change
it as soon as we break the ABI, even if only in a corner case that
doesn't concern most C extensions...


A bientôt,

Armin.


More information about the pypy-dev mailing list