| 1 |
============================================================== |
| 2 |
PyPy v7.3.21: release of python 2.7, 3.11, released 2026-03-13 |
| 3 |
============================================================== |
| 4 |
|
| 5 |
|
| 6 |
.. |
| 7 |
updated to 996ebee08886ee13f |
| 8 |
|
| 9 |
.. warning:: |
| 10 |
|
| 11 |
This release has some known crashes. We recommend you use a different version |
| 12 |
|
| 13 |
The PyPy team is proud to release version 7.3.21 of PyPy after the previous |
| 14 |
release on July 4, 2025. This is a bug-fix release that also updates to Python |
| 15 |
3.11.15. |
| 16 |
|
| 17 |
The release includes two different interpreters: |
| 18 |
|
| 19 |
- PyPy2.7, which is an interpreter supporting the syntax and the features of |
| 20 |
Python 2.7 including the stdlib for CPython 2.7.18+ (the ``+`` is for |
| 21 |
backported security updates) |
| 22 |
|
| 23 |
- PyPy3.11, which is an interpreter supporting the syntax and the features of |
| 24 |
Python 3.11, including the stdlib for CPython 3.11.15. |
| 25 |
|
| 26 |
The interpreters are based on much the same codebase, thus the double |
| 27 |
release. This is a micro release, all APIs are compatible with the other 7.3 |
| 28 |
releases. |
| 29 |
|
| 30 |
We recommend updating. You can find links to download the releases here: |
| 31 |
|
| 32 |
https://pypy.org/download.html |
| 33 |
|
| 34 |
We would like to thank our donors for the continued support of the PyPy |
| 35 |
project. If PyPy is not quite good enough for your needs, we are available for |
| 36 |
`direct consulting`_ work. If PyPy is helping you out, we would love to hear |
| 37 |
about it and encourage submissions to our blog_ via a pull request |
| 38 |
to https://github.com/pypy/pypy.org |
| 39 |
|
| 40 |
We would also like to thank our contributors and encourage new people to join |
| 41 |
the project. PyPy has many layers and we need help with all of them: bug fixes, |
| 42 |
`PyPy`_ and `RPython`_ documentation improvements, or general `help`_ with |
| 43 |
making RPython's JIT even better. |
| 44 |
|
| 45 |
If you are a python library maintainer and use C-extensions, please consider |
| 46 |
making a HPy_ / CFFI_ / cppyy_ version of your library that would be performant |
| 47 |
on PyPy. In any case, `cibuildwheel`_ supports building wheels for PyPy. |
| 48 |
|
| 49 |
.. _`PyPy`: https://doc.pypy.org/ |
| 50 |
.. _`RPython`: https://rpython.readthedocs.org |
| 51 |
.. _`help`: https://doc.pypy.org/project-ideas.html |
| 52 |
.. _CFFI: https://cffi.readthedocs.io |
| 53 |
.. _cppyy: https://cppyy.readthedocs.io |
| 54 |
.. _`cibuildwheel`: https://github.com/joerick/cibuildwheel |
| 55 |
.. _blog: https://pypy.org/blog |
| 56 |
.. _HPy: https://hpyproject.org/ |
| 57 |
.. _direct consulting: https://www.pypy.org/pypy-sponsors.html |
| 58 |
|
| 59 |
|
| 60 |
What is PyPy? |
| 61 |
============= |
| 62 |
|
| 63 |
PyPy is a Python interpreter, a drop-in replacement for CPython |
| 64 |
It's fast (`PyPy and CPython`_ performance |
| 65 |
comparison) due to its integrated tracing JIT compiler. |
| 66 |
|
| 67 |
We also welcome developers of other `dynamic languages`_ to see what RPython |
| 68 |
can do for them. |
| 69 |
|
| 70 |
We provide binary builds for: |
| 71 |
|
| 72 |
* **x86** machines on most common operating systems |
| 73 |
(Linux 32/64 bits, Mac OS 64 bits, Windows 64 bits) |
| 74 |
|
| 75 |
* 64-bit **ARM** machines running Linux (``aarch64``) and macos (``macos_arm64``). |
| 76 |
|
| 77 |
PyPy supports Windows 32-bit, Linux PPC64 big- and little-endian, Linux ARM |
| 78 |
32 bit, RISC-V RV64IMAFD Linux, and s390x Linux but does not release binaries. |
| 79 |
Please reach out to us if you wish to sponsor binary releases for those |
| 80 |
platforms. Downstream packagers provide binary builds for debian, Fedora, |
| 81 |
conda, OpenBSD, FreeBSD, Gentoo, and more. |
| 82 |
|
| 83 |
.. _`PyPy and CPython`: https://speed.pypy.org |
| 84 |
.. _`dynamic languages`: https://rpython.readthedocs.io/en/latest/examples.html |
| 85 |
|
| 86 |
Changelog |
| 87 |
========= |
| 88 |
|
| 89 |
For all versions |
| 90 |
---------------- |
| 91 |
|
| 92 |
- Update to pycparser v2.23 |
| 93 |
- Bundle ``libz`` and ``libbz2`` into portable builds, for systems without them. |
| 94 |
|
| 95 |
Bugfixes |
| 96 |
~~~~~~~~ |
| 97 |
|
| 98 |
- Fix a bug in instance dictionaries that could lead to segmentation faults of |
| 99 |
the interpreter. This could happen for instances that stored unboxed integer |
| 100 |
values in their attributes and used with different code paths in the |
| 101 |
``__init__``-method that added the attributes in different orders or that |
| 102 |
deleted some attributes (:issue:`5377`). |
| 103 |
|
| 104 |
Speedups and enhancements |
| 105 |
~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 106 |
- Speed up ``int.bit_length`` (:issue:`5314`) |
| 107 |
- Refactor the register allocator in the Jit backends to store longevity |
| 108 |
without using a dict. This make the JIT backend quite a bit faster (roughly |
| 109 |
50%) by using a lot fewer dictionary lookups. |
| 110 |
- Const-fold ``x == x`` and ``x != x`` in RPython's ``backendopt`` |
| 111 |
- Remove impossible code in ``_bitcount64`` |
| 112 |
- Use one less instruction for regex character set membership testing |
| 113 |
- Make ``map`` on pypy2 faster |
| 114 |
- Add ``or``/``xor`` constant reassociation and ``and/or`` combination jit |
| 115 |
peephole rewrite rules |
| 116 |
- ``storesink`` and ``jtransform`` need to deal with invalid ``cast_pointer`` on |
| 117 |
constants, which happens when optimizing unreachable code. |
| 118 |
|
| 119 |
Python 3.11 |
| 120 |
----------- |
| 121 |
|
| 122 |
- Update vendored ``libexpat`` to 2.7.4 |
| 123 |
- Update ``stdlib`` and version to 3.11.15 |
| 124 |
- Update to pycparser v3.0.0, which does not support python2 |
| 125 |
|
| 126 |
Bugfixes including missing compatibility with CPython 3.11 |
| 127 |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 128 |
|
| 129 |
- Percolate unicode locale numeric separators int formatting (:issue:`5311`) |
| 130 |
- Add newline to end of generated headers (:issue:`5312`) |
| 131 |
- Allow ``'%lli'`` formatting code in ``PyUnicode_FromFormat*`` (:issue:`5313`) |
| 132 |
- Set ``__new__`` to disallow instantiation when |
| 133 |
``Py_TPFLAGS_DISALLOW_INSTANTIATION`` is set |
| 134 |
- Fix ``ht_qualname`` on ``TypeFromSpec`` (:issue:`5319`) |
| 135 |
- Add macros needed for compilation of ``pytime.c`` in ``module/time`` on macOS |
| 136 |
- Allow str subclasses as argument of ``bytes/bytearray.fromhex`` (:issue:`5327`) |
| 137 |
- Fix for ``def func(): if a: f() or g()`` which crashed the bytecode compiler (:issue:`5328`) |
| 138 |
- Change ``self.write_buffer`` to accept bytes in ``_overlapped`` (:issue:`5335`) |
| 139 |
- Add license header to ``_lzma.py`` and ``_lzma_build.py`` (:issue:`5337`) |
| 140 |
- Require ``vsnprintf`` in ``pyerrors.h`` (:issue:`5343`) following |
| 141 |
(:issue:`python/cpython#20899`) |
| 142 |
- Add ``Py_RETURN_RICHCOMPARE`` macro (:issue:`5350`) |
| 143 |
- Make ``str`` methods ``split``, ``rsplit`` use the current unicode db version |
| 144 |
(:issue:`5370`) |
| 145 |
- Add ``_varname_from_oparg`` method to code objects |
| 146 |
- Set ``save_err=rffi.RFFI_SAVE_ERRNO`` for ``c_memfd_create()``. |
| 147 |
|
| 148 |
Speedups and enhancements |
| 149 |
~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 150 |
|
| 151 |
- Restore the JIT inlining ``TextIOWrapper.write``, disabled by mistake in a |
| 152 |
refactor (:issue:`5375`) |