Debian Codegraph @

pypy/doc/release-v7.3.20.rst

raw
1 ==============================================================
2 PyPy v7.3.20: release of python 2.7, 3.11, released 2025-07-04
3 ==============================================================
4
5 ..
6 updated to f956bdbc2bdaf680
7
8 The PyPy team is proud to release version 7.3.20 of PyPy after the previous
9 release on Feb 26, 2025. The release fixes some subtle bugs in ``ctypes`` and
10 ``OrderedDict`` and makes PyPy3.11 compatible with an upcoming release of
11 Cython.
12
13 The release includes two different interpreters:
14
15 - PyPy2.7, which is an interpreter supporting the syntax and the features of
16 Python 2.7 including the stdlib for CPython 2.7.18+ (the ``+`` is for
17 backported security updates)
18
19 - PyPy3.11, which is an interpreter supporting the syntax and the features of
20 Python 3.11, including the stdlib for CPython 3.11.13.
21
22 The interpreters are based on much the same codebase, thus the double
23 release. This is a micro release, all APIs are compatible with the other 7.3
24 releases.
25
26 We recommend updating. You can find links to download the releases here:
27
28 https://pypy.org/download.html
29
30 We would like to thank our donors for the continued support of the PyPy
31 project. If PyPy is not quite good enough for your needs, we are available for
32 `direct consulting`_ work. If PyPy is helping you out, we would love to hear
33 about it and encourage submissions to our blog_ via a pull request
34 to https://github.com/pypy/pypy.org
35
36 We would also like to thank our contributors and encourage new people to join
37 the project. PyPy has many layers and we need help with all of them: bug fixes,
38 `PyPy`_ and `RPython`_ documentation improvements, or general `help`_ with
39 making RPython's JIT even better.
40
41 If you are a python library maintainer and use C-extensions, please consider
42 making a HPy_ / CFFI_ / cppyy_ version of your library that would be performant
43 on PyPy. In any case, `cibuildwheel`_ supports building wheels for PyPy.
44
45 .. _`PyPy`: https://doc.pypy.org/
46 .. _`RPython`: https://rpython.readthedocs.org
47 .. _`help`: https://doc.pypy.org/project-ideas.html
48 .. _CFFI: https://cffi.readthedocs.io
49 .. _cppyy: https://cppyy.readthedocs.io
50 .. _`cibuildwheel`: https://github.com/joerick/cibuildwheel
51 .. _blog: https://pypy.org/blog
52 .. _HPy: https://hpyproject.org/
53 .. _direct consulting: https://www.pypy.org/pypy-sponsors.html
54
55
56 What is PyPy?
57 =============
58
59 PyPy is a Python interpreter, a drop-in replacement for CPython
60 It's fast (`PyPy and CPython`_ performance
61 comparison) due to its integrated tracing JIT compiler.
62
63 We also welcome developers of other `dynamic languages`_ to see what RPython
64 can do for them.
65
66 We provide binary builds for:
67
68 * **x86** machines on most common operating systems
69 (Linux 32/64 bits, Mac OS 64 bits, Windows 64 bits)
70
71 * 64-bit **ARM** machines running Linux (``aarch64``) and macos (``macos_arm64``).
72
73 PyPy supports Windows 32-bit, Linux PPC64 big- and little-endian, Linux ARM
74 32 bit, RISC-V RV64IMAFD Linux, and s390x Linux but does not release binaries.
75 Please reach out to us if you wish to sponsor binary releases for those
76 platforms. Downstream packagers provide binary builds for debian, Fedora,
77 conda, OpenBSD, FreeBSD, Gentoo, and more.
78
79 .. _`PyPy and CPython`: https://speed.pypy.org
80 .. _`dynamic languages`: https://rpython.readthedocs.io/en/latest/examples.html
81
82 Changelog
83 =========
84
85 For all versions
86 ----------------
87 - Allow building with ``--withoutmod-cpyext``
88
89 Bugfixes
90 ~~~~~~~~
91
92 - Fix crash when the JIT copies an empty virtual dict (:issue:`5245`)
93 - Fix ``re.fullmatch`` in the presence of atomic groups (:issue:`5232`) and
94 possessive repeats (:issue:`5049`)
95 - Cleanup duplicate ``errcode`` var in ``pyssl_error()`` and duplicate
96 ``get_socket_or_None()`` call in ``_SSLSocket.shutdown()`` (:issue:`5261`)
97 - Define ``_FILE_OFFSET_BITS`` and ``_LARGEFILE_SOURCE`` when building on
98 32-bit ARM (on older platforms)
99 - Fix bug in ``OrderedDict.move_to_first`` (:issue:`5257`)
100
101 Speedups and enhancements
102 ~~~~~~~~~~~~~~~~~~~~~~~~~
103
104 - Use ``wWinMain`` on Windows to remove the need for hand-written command line
105 argument processing
106 - Optimize ``add(x, x)``
107 - Optimize ``getarrayitem(p, i)`` and ``getarrayitem(p, i)`` sequences again
108 (which got lost in some refactoring)
109 - Add a Z3 memory model for heap accesses to be able to check the correctness
110 of tests, and to find bugs in the optimizer with random traces.
111 - Make alias checking in the optimizer slightly smarter. in particular, two
112 applevel instances of different classes are now known not to alias.
113 - Allow the annotator to const-fold ``len``
114 - Optimize ``list.__eq__`` with a jit driver (:issue:`5300`)
115
116 Python 3.11
117 -----------
118
119 - Update vendored ``libexpat`` to 2.7.1
120 - Update ``stdlib`` and version to 3.11.13 (:issue:`5290`)
121
122 Bugfixes
123 ~~~~~~~~
124
125 - Raise ``SyntaxError`` rather than ``ValueError`` when parsing null bytes in
126 source code (:issue:`5234`)
127 - Fix ``LOAD_GLOBAL`` disassembly (:issue:`5238`)
128 - Fix pure python ``datetime.*.fromisoformat()`` to reject spaces in fraction
129 part. Backported to CPython. (:issue:`5240`), (:issue:`python/cpython#130959`)
130 - Fix ``LDLIBRARY`` in ``sysconfig`` (:issue:`5249`)
131 - Add ``IO_REPARSE_TAG_MOUNT_POINT`` to ``stat`` for windows
132 - Fix ``PyContextVar_Reset`` return type (:issue:`5252`)
133 - Add python3.8+ versions of ``Py_TRASHCAN`` macros (:issue:`3958`)
134 - Fix macos sysconfig ``LD*`` values (:issue:`pypa/distutils#283`)
135 - Add missing ``LIB_ERR_SYS`` handling to ``pyssl_error()``
136 (:issue:`python-trio/trio#3253`)
137 - Return bytes for emptystring in ``re.findall()`` (:issue:`5265`)
138 - Handle single base class in ``PyType_FromModuleAndSpec`` (:issue:`5267`)
139 - Fix keepalive problems with ``ctypes._cast_addr`` (:issue:`5247`)
140 - Remove special-case for weakrefs in ``ctypes`` ``GlobalPyobjContainer``
141 - Allow deepcopying of some ctypes structs and fix pickling (:issue:`3022`)
142 - Fix declaration of ``PyLong_As*`` functions (:issue:`5272`)
143 - Fix ``EINTR`` handling in ``time.sleep()`` on macos
144 - Fix segfault when passing invalid closure to ``exec()``
145 - Fix ``*attr()`` type errors to match CPython
146 - Fix ``TypeError`` handling in ``map()`` and ``zip()`` to match CPython
147 - Add some missing invalid syntax cases for lambdas
148 - Add more ``zlib`` constants (:issue:`5289`)
149 - Fix obscure case when a unicodeescape error handler changes the string
150 - Add ``PyRange_Check`` (needed for newer cython)
151 - Implement ``PyModule_FromDefAndSpec2``, ``PyModule_FromDefAndSpec``
152 - Add PyGILState_GetThisThreadState (:issue:`5302`)
153
154 Speedups and enhancements
155 ~~~~~~~~~~~~~~~~~~~~~~~~~
156
157 - Make ``int + long`` and ``int * long`` use ``rbigint.int_add`` and
158 ``.int_mul``. This always worked on pypy2 but somehow never made it to 3.
159 - Add missing audit event in ``sys._getframe()``
160 - Speed up HPy object allocation by optimizing ``_finish_create_instance``