PyPy v7.3.21: release of python 2.7, 3.11, released 2026-03-13¶
The PyPy team is proud to release version 7.3.21 of PyPy after the previous release on July 4, 2025. This is a bug-fix release that also updates to Python 3.11.15.
The release includes two 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.11, which is an interpreter supporting the syntax and the features of Python 3.11, including the stdlib for CPython 3.11.15.
The interpreters are based on much the same codebase, thus the double release. This is a micro release, all APIs are compatible with the other 7.3 releases.
We recommend updating. You can find links to download the 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, cibuildwheel supports building wheels for PyPy.
What is PyPy?¶
PyPy is a Python interpreter, a drop-in replacement for CPython It’s fast (PyPy and CPython 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) and macos (macos_arm64).
PyPy supports Windows 32-bit, Linux PPC64 big- and little-endian, Linux ARM 32 bit, RISC-V RV64IMAFD Linux, and s390x Linux 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 pycparser v2.23
Bundle
libzandlibbz2into portable builds, for systems without them.
Bugfixes¶
Fix a bug in instance dictionaries that could lead to segmentation faults of the interpreter. This could happen for instances that stored unboxed integer values in their attributes and used with different code paths in the
__init__-method that added the attributes in different orders or that deleted some attributes (#5377).
Speedups and enhancements¶
Speed up
int.bit_length(#5314)Refactor the register allocator in the Jit backends to store longevity without using a dict. This make the JIT backend quite a bit faster (roughly 50%) by using a lot fewer dictionary lookups.
Const-fold
x == xandx != xin RPython’sbackendoptRemove impossible code in
_bitcount64Use one less instruction for regex character set membership testing
Make
mapon pypy2 fasterAdd
or/xorconstant reassociation andand/orcombination jit peephole rewrite rulesstoresinkandjtransformneed to deal with invalidcast_pointeron constants, which happens when optimizing unreachable code.
Python 3.11¶
Update vendored
libexpatto 2.7.4Update
stdliband version to 3.11.15Update to pycparser v3.0.0, which does not support python2
Bugfixes including missing compatibility with CPython 3.11¶
Percolate unicode locale numeric separators int formatting (#5311)
Add newline to end of generated headers (#5312)
Allow
'%lli'formatting code inPyUnicode_FromFormat*(#5313)Set
__new__to disallow instantiation whenPy_TPFLAGS_DISALLOW_INSTANTIATIONis setFix
ht_qualnameonTypeFromSpec(#5319)Add macros needed for compilation of
pytime.cinmodule/timeon macOSAllow str subclasses as argument of
bytes/bytearray.fromhex(#5327)Fix for
def func(): if a: f() or g()which crashed the bytecode compiler (#5328)Change
self.write_bufferto accept bytes in_overlapped(#5335)Add license header to
_lzma.pyand_lzma_build.py(#5337)Require
vsnprintfinpyerrors.h(#5343) following (python/cpython#20899)Add
Py_RETURN_RICHCOMPAREmacro (#5350)Make
strmethodssplit,rsplituse the current unicode db version (#5370)Add
_varname_from_opargmethod to code objectsSet
save_err=rffi.RFFI_SAVE_ERRNOforc_memfd_create().
Speedups and enhancements¶
Restore the JIT inlining
TextIOWrapper.write, disabled by mistake in a refactor (#5375)