What’s new in PyPy2.7 5.9

In previous versions of PyPy, instance.method would return always the same bound method object, when gotten out of the same instance (as far as is and id() can tell). CPython doesn’t do that. Now PyPy, like CPython, returns a different bound method object every time. For type.method, PyPy2 still returns always the same unbound method object; CPython does it for built-in types but not for user-defined types.

The two cffi-* branches are part of the upgrade to cffi 1.11.

Indexing into char* behaves differently than CPython

Improve and fix issues with vmprof

CPyext PyListObject.pop must return the value

If tp_hash is PyObject_HashNotImplemented, set obj.__dict__['__hash__'] to None

Renaming of cppyy to _cppyy. The former is now an external package installable with pip install cppyy.

At the end of translation, run attr -q -s pax.flags -V m on PAX-enabled systems on the produced binary. This seems necessary because PyPy uses a JIT.

Improve bytearray performance (backported from py3.5)

Fix the bounds in the GC when allocating a lot of objects with finalizers, fixes issue #2590

Small improvement to optimize list accesses with constant indexes better by throwing away information about them less eagerly.

More information is retained into a bridge: knowledge about the content of arrays (at fixed indices) is stored in guards (and thus available at the beginning of bridges). Also, some better feeding of information about known fields of constant objects into bridges.

Add support for leakfinder in cpyext tests (disabled for now, due to too many failures).

Added _swappedbytes_ support for ctypes.Structure

Convert many Py*_Check cpyext functions into macros, like CPython.

Explicitly use Py_ssize_t as the Signed type in pypy c-api

Differentiate the code to call METH_NOARGS, METH_O and METH_VARARGS in cpyext: this allows to write specialized code which is much faster than previous completely generic version. Moreover, let the JIT to look inside the cpyext module: the net result is that cpyext calls are up to 7x faster. However, this is true only for very simple situations: in all real life code, we are still much slower than CPython (more optimizations to come)