PyPy v7.3.13: release of python 2.7, 3.9, and 3.10¶
The PyPy team is proud to release version 7.3.13 of PyPy.
This is primarily a security/bug-fix release. CPython released security
patches, and this release also improves the ability to use type
specifications via PyType_FromSpec
and friends. There are also some
small speed-ups.
The release includes three different interpreters:
- PyPy2.7, which is an interpreter supporting the syntax and the features of Python 2.7 including the stdlib for CPython 2.7.18+ (the
+
is for backported security updates)- PyPy3.9, which is an interpreter supporting the syntax and the features of Python 3.9, including the stdlib for CPython 3.9.18.
- PyPy3.10, which is an interpreter supporting the syntax and the features of Python 3.10, including the stdlib for CPython 3.10.13. Note it requires at least cython 0.29.35 or cython 3.0.0b3.
The interpreters are based on much the same codebase, thus the multiple release. This is a micro release, all APIs are compatible with the other 7.3 releases. It follows after 7.3.12 release on June 16, 2023.
We recommend updating. You can find links to download the v7.3.13 releases here:
We would like to thank our donors for the continued support of the PyPy project. If PyPy is not quite good enough for your needs, we are available for direct consulting work. If PyPy is helping you out, we would love to hear about it and encourage submissions to our blog via a pull request to https://github.com/pypy/pypy.org
We would also like to thank our contributors and encourage new people to join the project. PyPy has many layers and we need help with all of them: bug fixes, PyPy and RPython documentation improvements, or general help with making RPython’s JIT even better.
If you are a python library maintainer and use C-extensions, please consider making a HPy / CFFI / cppyy version of your library that would be performant on PyPy. In any case, both cibuildwheel and the multibuild system support building wheels for PyPy.
What is PyPy?¶
PyPy is a Python interpreter, a drop-in replacement for CPython It’s fast (PyPy and CPython 3.7.4 performance comparison) due to its integrated tracing JIT compiler.
We also welcome developers of other dynamic languages to see what RPython can do for them.
We provide binary builds for:
- x86 machines on most common operating systems (Linux 32/64 bits, Mac OS 64 bits, Windows 64 bits)
- 64-bit ARM machines running Linux (
aarch64
).- Apple M1 arm64 machines (
macos_arm64
).- s390x running Linux
PyPy support Windows 32-bit, Linux PPC64 big- and little-endian, and Linux ARM 32 bit, but does not release binaries. Please reach out to us if you wish to sponsor binary releases for those platforms. Downstream packagers provide binary builds for debian, Fedora, conda, OpenBSD, FreeBSD, Gentoo, and more.
Changelog¶
For all versions¶
- Update to ssl 1.1.1w, or 3.0.10 when embedding libraries for a portable build
Speedups and enhancements¶
- Shrink the size of the PyPy binaries by about ~700KiB by auto-generating fewer versions of the RPython dict and list types.
- Speed up tracing and code generation in the JIT slightly by reducing the size
in memory of one of its central data structures, the
MIFrame
. This is done by not allocating three lists of length 256 for the registers in the MIFrames and the blackhole frames. Almost all jitcodes have much smaller frame sizes. - Improve
str.strip()
to make it better optimizable by the JIT. - Make access to
sys.flags
faster by making sure the JIT can constant-fold the access most of the time. (especially important on py3.x, where everybytes.decode
call checkssys.flags.utf8_mode
) - Speed up the flowspace a lot for huge functions. This makes building the PyPy binary a little bit faster.
- Make
UnicodeIO
store its data in a list ofr_int32
, as opposed to using the rpython (Python2.7) unicode type. we want to get rid of the unicode type and also it requires an extra copy all the time. - Make every Python integer that doesn’t fit into a machine word use one word less memory by storing the sign differently.
Python 3.9+¶
- Create c-extension modules used in tests as part of the build (in package.py), not as part of testing.
Bugfixes¶
- More selectively clear
StopIteration
exceptions ontp_iternext
(issue 3956). Diagnosed and fixed by a new contributor. - Copy less when creating a venv by using a
PYPY_PORTABLE_DEPS.txt
file to state which dlls to copy in a portable build (issue 3611) - On macos
sendfile
can return an error while sending part of the file (issue 3964) - Fixes on both app-level and C level for
Py_TPFLAGS_BASETYPE=0
(issue 2742). Also setPyType_Type.tp_itemsize
tosizeof(PyMemberDef)
like on CPython - Fix
PyType_FromSpecWithBases
to correctly usePy_tp_doc
,Py_tp_members
in spec, fix__module__
assignment, better handle__name__
andtp_name
- Hide
functools
wrappers from the stack when reporting warnings (issue 3988) - Fix edge case of datetime isoformat parsing (issue 3989)
- Accept NULL
tp_doc
(bpo-41832) - Align
nb_int
withPyNumber_Long
(to get consistent error messages) - Handle
pathlib.Path
objects in_ssl
(issue 4002) - Implement
_PyLong_AsInt
which is not part of the stable API but used in testing