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 libz and libbz2 into 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 == x and x != x in RPython’s backendopt

  • Remove impossible code in _bitcount64

  • Use one less instruction for regex character set membership testing

  • Make map on pypy2 faster

  • Add or/xor constant reassociation and and/or combination jit peephole rewrite rules

  • storesink and jtransform need to deal with invalid cast_pointer on constants, which happens when optimizing unreachable code.

Python 3.11

  • Update vendored libexpat to 2.7.4

  • Update stdlib and version to 3.11.15

  • Update 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 in PyUnicode_FromFormat* (#5313)

  • Set __new__ to disallow instantiation when Py_TPFLAGS_DISALLOW_INSTANTIATION is set

  • Fix ht_qualname on TypeFromSpec (#5319)

  • Add macros needed for compilation of pytime.c in module/time on macOS

  • Allow 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_buffer to accept bytes in _overlapped (#5335)

  • Add license header to _lzma.py and _lzma_build.py (#5337)

  • Require vsnprintf in pyerrors.h (#5343) following (python/cpython#20899)

  • Add Py_RETURN_RICHCOMPARE macro (#5350)

  • Make str methods split, rsplit use the current unicode db version (#5370)

  • Add _varname_from_oparg method to code objects

  • Set save_err=rffi.RFFI_SAVE_ERRNO for c_memfd_create().

Speedups and enhancements

  • Restore the JIT inlining TextIOWrapper.write, disabled by mistake in a refactor (#5375)