Hacker News new | ask | show | jobs
by josefx 1043 days ago
PyPy breaks compatibility with CPython in significant ways, as far as I understand the current no-gil proposal only got through because it has an automated fallback for modules that are not no-gil compatible.
1 comments

In what way does PyPy break compatibility?
Many little ways and a few bigger ones.

The biggest one would be not using reference counting, which makes execution of cleanup code in __del__ somewhat non deterministic and tricks that rely on the exact reference count of an object outright impossible (for example reusing "immutable" objects that are only referenced once).

I thought that the C-API still had significant differences but going by its documentation it has a compatibility layer that is almost complete if somewhat slow.

A full list with all the minor differences is here: https://doc.pypy.org/en/latest/cpython_differences.html