Debian Codegraph @

pypy/doc/release-v7.3.22.rst

raw
1 ==============================================================
2 PyPy v7.3.22: release of python 2.7, 3.11, released 2026-04-26
3 ==============================================================
4
5
6 ..
7 updated to 5004b7cdb0e8f5df956db691cc92157337cf30a0
8
9 The PyPy team is proud to release version 7.3.22 of PyPy after the previous
10 release on March 13, 2026. This is a bug-fix release that fixes several issues
11 in the JIT. Among them, a long-standing JIT bug that started appearing when
12 some instance optimizations exposed it. We also cleaned
13 up many of the remaining stdlib test suite failures, which improves CPython
14 compatibility around line numbers in dis.dis, signatures and objclass
15 attributes for builtins, and other quality of life features.
16
17 There is now an RPython ``_pickle`` module that mirrors
18 the CPython one, greatly speeding up pickling operations. Where before PyPy was
19 5.7x slower than CPython on the pickle benchmark from the pyperformance
20 benchmark suite, now it is only 1.6x slower [0]_. We also added pypy
21 pickler extensions to dump and load lists using list strategies, and enabled
22 them in the ``ForkingPickler`` used by multiprocessing, speeding up cases where
23 such objects are passed between PyPy multiprocessing instances.
24
25 We also added an RPython json encoder, speeding up json_bench from being 2.6x
26 slower than CPython to being 0.7x (meaning faster).
27
28 The release includes two different interpreters:
29
30 - PyPy2.7, which is an interpreter supporting the syntax and the features of
31 Python 2.7 including the stdlib for CPython 2.7.18+ (the ``+`` is for
32 backported security updates)
33
34 - PyPy3.11, which is an interpreter supporting the syntax and the features of
35 Python 3.11, including the stdlib for CPython 3.11.15.
36
37 The interpreters are based on much the same codebase, thus the double
38 release. This is a micro release, all APIs are compatible with the other 7.3
39 releases.
40
41 We recommend updating. You can find links to download the releases here:
42
43 https://pypy.org/download.html
44
45 We would like to thank our donors for the continued support of the PyPy
46 project. If PyPy is not quite good enough for your needs, we are available for
47 `direct consulting`_ work. If PyPy is helping you out, we would love to hear
48 about it and encourage submissions to our blog_ via a pull request
49 to https://github.com/pypy/pypy.org
50
51 We would also like to thank our contributors and encourage new people to join
52 the project. PyPy has many layers and we need help with all of them: bug fixes,
53 `PyPy`_ and `RPython`_ documentation improvements, or general `help`_ with
54 making RPython's JIT even better.
55
56 If you are a python library maintainer and use C-extensions, please consider
57 making a HPy_ / CFFI_ / cppyy_ version of your library that would be performant
58 on PyPy. In any case, `cibuildwheel`_ supports building wheels for PyPy.
59
60 .. rubric:: Footnotes
61
62 .. [0] Once `a PR to pyperformance`_ to use the _pickle module on PyPy is accepted
63
64 .. _`PyPy`: https://doc.pypy.org/
65 .. _`RPython`: https://rpython.readthedocs.org
66 .. _`help`: https://doc.pypy.org/project-ideas.html
67 .. _CFFI: https://cffi.readthedocs.io
68 .. _cppyy: https://cppyy.readthedocs.io
69 .. _`cibuildwheel`: https://github.com/joerick/cibuildwheel
70 .. _blog: https://pypy.org/blog
71 .. _HPy: https://hpyproject.org/
72 .. _direct consulting: https://www.pypy.org/pypy-sponsors.html
73 .. _`a PR to pyperformance`: https://github.com/python/pyperformance/pull/461
74
75 What is PyPy?
76 =============
77
78 PyPy is a Python interpreter, a drop-in replacement for CPython.
79 It's fast (`PyPy and CPython`_ performance
80 comparison) due to its integrated tracing JIT compiler.
81
82 We also welcome developers of other `dynamic languages`_ to see what RPython
83 can do for them.
84
85 We provide binary builds for:
86
87 * **x86** machines on most common operating systems
88 (Linux 32/64 bits, Mac OS 64 bits, Windows 64 bits)
89
90 * 64-bit **ARM** machines running Linux (``aarch64``) and macos (``macos_arm64``).
91
92 PyPy supports Windows 32-bit, Linux PPC64 big- and little-endian, Linux ARM
93 32 bit, RISC-V RV64IMAFD Linux, and s390x Linux but does not release binaries.
94 Please reach out to us if you wish to sponsor binary releases for those
95 platforms. Downstream packagers provide binary builds for debian, Fedora,
96 conda, OpenBSD, FreeBSD, Gentoo, and more.
97
98 .. _`PyPy and CPython`: https://speed.pypy.org
99 .. _`dynamic languages`: https://rpython.readthedocs.io/en/latest/examples.html
100
101 Changelog
102 =========
103
104 For all versions
105 ----------------
106
107
108 Bugfixes
109 ~~~~~~~~
110
111 - Fix instance dictionary field reordering logic, which could lead to a
112 failing internal assertion error under some circumstances (:issue:`5377`).
113 - Fix JIT invalidation logic of array items at a variable index, which could
114 lead to incorrect results for list accesses when also calling methods on
115 list objects (:issue:`5389`)
116 - Fix segfaults in the JIT where the JIT optimizer would confuse RPython
117 instances and arrays, leading to segfaults during JIT compilation
118 (:issue:`5400`).
119 - Fix duplicate 'const' in C code generation for nested const pointer types
120
121 Speedups and enhancements
122 ~~~~~~~~~~~~~~~~~~~~~~~~~
123
124 - Improve the performance of left-shifts of large integers, ie those backed by
125 RPython's ``rbigints`` (:issue:`5404`).
126 - Fix ~10ms GIL wakeup latency on Windows (:issue:`5391`)
127 - Improve performance of ``complex`` powers with small integers as exponents
128 - `Document the fact`__ that in PyPy instance dictionaries are not always
129 ordered by insertion (:issue:`5436`).
130
131 .. __: cpython_differences#order-of-dictionary-keys-in-instance-dicts
132
133 Python 2.7
134 ----------
135
136 - Remove unsafe pickle file handling from bundled ply in pycparser v2. PyPy3
137 uses pycparser v3
138
139 Python 3.11
140 -----------
141
142 - Cherry-pick upstream ``_pydecimal`` fix from CPython (:issue:`5256`).
143 - Add ``sys._stdlib_dir``
144 - Disallow whitespace after sign character in ``int``/``float`` string parsing
145 (:issue:`3927`)
146
147 Bugfixes including missing compatibility with CPython 3.11
148 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
149
150 - Make ``itertools.pairwise`` reentrant (:issue:`python/cpython#109788`)
151 - Fix possessive repeat in ``rsre`` search and match, fixing possessive regex bugs
152 - Fix crash in the bytecode compiler related to the line numbers of return
153 statements (:issue:`5419`).
154 - Fixed line number output for function definitions with multiple decorators,
155 f-strings, and related edge cases in ``dis`` output
156 - Fixed pyrepl and ``pdb`` compatibility
157 - cpyext: fix exposing ``__self__`` attribute on cpyext methods (:issue:`5368`)
158 - cpyext: fix ``getsetdescr_attach`` to avoid redundantly rebuilding
159 descriptors (:issue:`5402`)
160 - cpyext: when checking for ``tp_new``, ignore ``object.__new__``
161 (:issue:`5418`)
162 - cpyext: fix flag propagation via inheritance and add flags to type objects
163 - cpyext: fix ``tp_basicsize`` computation for mixed python/c-extension MRO
164 types (:issue:`5402`)
165 - cpyext: fix type layouts for types with ``tp_dictoffset`` or
166 ``tp_weaklistoffset`` (:issue:`5402`)
167 - cpyext: fix ``PyGC_Collect`` to better mimic a full collection cycle
168 - Fix ``TextIOWrapper.readline(None)`` (:issue:`5379`)
169 - Fix ``PREP_RERAISE_STAR`` dropping the current traceback (:issue:`5338`)
170 - Fix missing case in ``astcompiler`` for multiple trinary expressions (:issue:`5419`)
171 - Fix ``function.__get__(None)`` to raise ``TypeError`` like CPython
172 - Fix multiple decorators raising exceptions in reverse order (:issue:`5213`)
173 - Fix ``normalize_exception`` when called inside generators
174 - Fix edge cases in generator and coroutine execution
175 - Fix ``raise`` ignoring user modifications to ``__traceback__``
176 - Fix segfault in ``Parser.diagnose()`` called after a successful parse
177 - Fix error message for empty f-strings
178 - Fix error messages for ``range()`` argument parsing
179 - Fix edge cases in ``__future__`` handling and ``eval``
180 - Fix unparse edge cases: lambda positional-only args, ``await`` in annotations
181 - Fix multiline UTF-8 error messages
182 - Fix encoding failures in ``_tkinter``
183 - Fix various ``ctypes`` edge cases
184 - Fix hpy debug mode failures
185 - signal: handle failed wakeup-fd so it can be polled
186 - Add more ``check_valid()`` calls to ``mmap``
187 - Raise `SyntaxError` for unterminated single-quoted strings ending in newline in the REPL
188 - Fix missing ``__reduce__`` on cpyext methods, exposed by ``_pickle`` (:issue:`5445`)
189 - Fix signatures of some math functions (:issue:`5368`)
190 - Add ``__doc__`` and ``__text_signature__`` to more cpyext types (:issue:`5368`)
191
192 Speedups and enhancements
193 ~~~~~~~~~~~~~~~~~~~~~~~~~
194
195 - pyrepl: implement ``set_completion_display_matches_hook``, ``parse_and_bind``,
196 and ``set_pre_input_hook``
197 - Generate default docstring from ``__text_signature__`` at ``interp2app``
198 - Emit ``($self ...)`` for method signatures, used by ``inspect``
199 - Make the first build of lib_pypy cffi modules quieter (:issue:`5428`)
200 - Implement shared tuples in app-level ``marshal``
201 - Speed up the cffi implementation of the fast path for ``hashlib.new(name, data).hexdigest()``
202 - Speed up the ``sqlitesynth`` benchmark in ``_cffi_sqlite3``