Debian Codegraph @

pypy/doc/release-v7.3.12.rst

raw
1 ==============================================================
2 PyPy v7.3.12: release of python 2.7, 3.9, and 3.10, 2023-06-16
3 ==============================================================
4
5 ..
6 Changelog up to commit ba2e9a6c433e
7
8 The PyPy team is proud to release version 7.3.12 of PyPy.
9 This release includes a new string-to-int algorithm (also appearing in CPython
10 3.12) that is faster than the older one; support for symlinks in Windows; and
11 our first Python3.10 version.
12
13 The release includes three 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.9, which is an interpreter supporting the syntax and the features of
20 Python 3.9, including the stdlib for CPython 3.9.17.
21
22 - PyPy3.10, which is an interpreter supporting the syntax and the features of
23 Python 3.10, including the stdlib for CPython 3.10.12. This is our first
24 release of 3.10, but based on past experience we are quite confident in
25 its compatibility with upstream. Of course, we recommend testing your code
26 with this new version before putting it into production. Note it does
27 require at least cython 0.29.35 or cython 3.0.0b3
28
29 The interpreters are based on much the same codebase, thus the multiple
30 release. This is a micro release, all APIs are compatible with the other 7.3
31 releases. It follows after 7.3.11 release on Dec 29, 2022
32
33 We recommend updating. You can find links to download the v7.3.12 releases here:
34
35 https://pypy.org/download.html
36
37 We would like to thank our donors for the continued support of the PyPy
38 project. If PyPy is not quite good enough for your needs, we are available for
39 `direct consulting`_ work. If PyPy is helping you out, we would love to hear about
40 it and encourage submissions to our blog_ via a pull request
41 to https://github.com/pypy/pypy.org
42
43 We would also like to thank our contributors and encourage new people to join
44 the project. PyPy has many layers and we need help with all of them: bug fixes,
45 `PyPy`_ and `RPython`_ documentation improvements, or general `help`_ with making
46 RPython's JIT even better. Since the previous release, we have accepted
47 contributions from one new contributor, thanks for pitching in, and welcome
48 to the project!
49
50 If you are a python library maintainer and use C-extensions, please consider
51 making a HPy_ / CFFI_ / cppyy_ version of your library that would be performant
52 on PyPy. In any case, both `cibuildwheel`_ and the `multibuild system`_ support
53 building wheels for PyPy.
54
55 .. _`PyPy`: index.html
56 .. _`RPython`: https://rpython.readthedocs.org
57 .. _`help`: project-ideas.html
58 .. _CFFI: https://cffi.readthedocs.io
59 .. _cppyy: https://cppyy.readthedocs.io
60 .. _`multibuild system`: https://github.com/matthew-brett/multibuild
61 .. _`cibuildwheel`: https://github.com/joerick/cibuildwheel
62 .. _blog: https://pypy.org/blog
63 .. _HPy: https://hpyproject.org/
64 .. _was sponsored: https://www.pypy.org/posts/2022/07/m1-support-for-pypy.html
65 .. _direct consulting: https://www.pypy.org/pypy-sponsors.html
66 .. _has built: https://www.pypy.org/posts/2022/11/pypy-and-conda-forge.html
67
68 What is PyPy?
69 =============
70
71 PyPy is a Python interpreter, a drop-in replacement for CPython
72 It's fast (`PyPy and CPython 3.7.4`_ performance
73 comparison) due to its integrated tracing JIT compiler.
74
75 We also welcome developers of other `dynamic languages`_ to see what RPython
76 can do for them.
77
78 We provide binary builds for:
79
80 * **x86** machines on most common operating systems
81 (Linux 32/64 bits, Mac OS 64 bits, Windows 64 bits)
82
83 * 64-bit **ARM** machines running Linux (``aarch64``).
84
85 * Apple **M1 arm64** machines (``macos_arm64``).
86
87 * **s390x** running Linux
88
89 PyPy support Windows 32-bit, Linux PPC64 big- and little-endian, and Linux ARM
90 32 bit, but does not release binaries. Please reach out to us if you wish to
91 sponsor binary releases for those platforms. Downstream packagers provide
92 binary builds for debian, Fedora, conda, OpenBSD, FreeBSD, Gentoo, and more.
93
94 .. _`PyPy and CPython 3.7.4`: https://speed.pypy.org
95 .. _`dynamic languages`: https://rpython.readthedocs.io/en/latest/examples.html
96
97 Changelog
98 =========
99
100 For all versions
101 ----------------
102 - Update vendored version of pycparser
103 - Update to ssl 1.1.1u, 3.0.9; lzma 5.2.10; and gdbm 1.23 when embedding
104 libraries for a portable build
105
106 Bugfixes
107 ~~~~~~~~
108 - Allow creating ``ctypes.py_object()`` on a ``weakref`` (issue 3883_)
109 - Add memory pressure for malloc allocations in ``_ssl``, fix OpenSSL context use
110 - Pair OpenSSL allocation calls better with free calls in ``_ssl`` (issue 3887_)
111 - Only define ``SO`` in ``sysconfig`` if ``imp.get_suffixes()`` has
112 ``imp.C_EXTENSION``
113 - Fix wrong assert in ``intutils``, it should be an ``InvalidLoop`` instead
114 (issue 3892:_)
115 - export ``PyDescr_NewGetSet`` and define ``PyDescr_TYPE``, ``PyDescr_NAME``
116 - ``space.index(W_Bool)`` should return an ``int``, not a ``bool`` (issue 3906_)
117 - Skip cpython pickling of ``range``
118 - Support loading c-extension modules with both ``powerpc64le-linux-gnu`` and
119 ``ppc_64-linux-gnu`` platform tags (issue 3834_)
120 - Fix various cases where a mutating ``__index__`` method could crash the
121 interpreter (issue 3917_)
122 - Use C99 ``NAN`` for ``Py_NAN``
123
124
125 Speedups and enhancements
126 ~~~~~~~~~~~~~~~~~~~~~~~~~
127 - Do less string copies in the bytecode compiler
128 - Add missing CJK range in unicodedata version 13
129 - Implement the base 10 ``string-to-int`` conversion using a divide an conquer
130 algorithm with complexity ``O(n**1.58)``. The algorithm is due to Bjorn
131 Martinsson and is part of CPython 3.12.
132 - Small refactoring in the JIT History class. It can now use the proper
133 opencoder encoding of a trace immediately, not only after the inputargs are
134 known
135 - Inline ``get_field_updater`` in JITted code to allow ``FieldUpdater`` to be
136 alloc-removed everywhere
137 - Improve warmup a little bit:
138 - directly put the two most common opcodes into the loop
139 - add a special case for the int_add variant with a constant argument
140
141 - Use the ``rbigint.add_int`` (etc) shortcuts for the ``int+int`` overflowing
142 operations
143 - Optimize the ``goto_if_not_*`` code:
144 - don't call replace_box for fresh boxes that can't be stored anywhere yet
145 - make the "same box" shortcut faster
146
147
148 Python 3.9+
149 -----------
150
151 Bugfixes
152 ~~~~~~~~
153 - Fix corner case when computing ``__main__.__file__`` (issue 3881_)
154 - Fix misnamed function (issue 3874_)
155 - Disallow pickle of ``staticmethod``, ``classmethod``, and ``DirEntry``
156 - Make sure that the max stackdepth is observed in method calls
157 - Fix ``utf-16`` and ``utf-32`` errorhandler replacement logic: if the
158 replacement is bytes. those are just copied to the output
159 - Fix the problems of https://bugs.python.org/issue36819
160 - Fix ``str_decode_raw_unicode_escape`` for the case of ``\\``, which was
161 incorrectly special-cased.
162 - Forbid null bytes in ``pwd.getpwnam``
163 - Use ``r_longlong`` math in nanosecond time for ``perf_counter`` on windows
164 (issue 3890_)
165 - Fix for ``tuple.contains(obj)`` using ``item == obj`` (bpo-37648_)
166 - Allow indexing with a class with a ``__index__`` method
167 - Implement ``__copy__`` and ``__deepcopy__`` for ``zlib`` (de)compressors
168 - Fix weirdness about combining annotations and a global declaration of a
169 name in some random function (issue 3925_)
170 - Fix wrong implementation of ``_copy_base`` for slices of n-dimensional
171 buffers (issue 3520_)
172 - Trim the scope ID from IPV6 addresses (issue 3938_, reversing the decision in
173 issue 3628_)
174 - Add ``_hashlib.scrypt`` (issue 3921_)
175 - Properly create a C-level wrapper that calls ``tp_finalize`` when ``__del__``
176 is called, which allows us to use ``CYTHON_USE_TP_FINALIZE`` in cython
177 - Move ``hpy.dist-info`` to ``hpy-0.0.4.dist-info`` (issue 3579_)
178 - Fix edged cases in ``__rpow__`` and ``pow()`` (issues 3912_ and 3944_)
179 - Remove ``PyInt_FromLong`` which was leftover from Python2
180
181 Speedups and enhancements
182 ~~~~~~~~~~~~~~~~~~~~~~~~~
183 - Speed up ``nametuple _replace`` by code generation (issue 3884_)
184 - Correct exception on positional arguments, while supporting empty namedtuple
185 (?) at the same time
186 - Implement ``os.symlink`` and ``os.readlink`` on windows
187 - Fix ``os.mkdir`` for unicode handling via teaching rposix about utf-8 paths,
188 which could lead to removing the last vestiges of unicode from rpython.
189 - Refactor ``os.remove``/``os.unlink`` to take symlink into account on windows
190 - Increment ``macosx-version-min`` to 10.9
191 - ``space.newlong`` returns a ``W_LongObject`` on pypy3, where there is no
192 observable applevel difference between ``W_IntObject`` and ``W_LongObject``
193 - Provide ``_PyEval_GetAsyncGenFirstiter`` and ``_PyEval_GetAsyncGenFinalizer``
194 for use by cython, towards fixing issue 3280_
195 - Squeeze a little more accuracy out of windows ``time.time()``, to make a
196 cython test pass
197 - Use posonly args for ``list.__init__`` and ``set.__init__``, simplifying code
198 - Use ``rbigint.*_int`` fast paths for comparisons between ints
199
200 .. _bpo-37648: https://bugs.python.org/issue37648
201 .. _GH-100242: https://github.com/python/cpython/issues/100242
202 .. _3280: https://foss.heptapod.net/pypy/pypy/-/issues/3280
203 .. _3520: https://foss.heptapod.net/pypy/pypy/-/issues/3520
204 .. _3579: https://foss.heptapod.net/pypy/pypy/-/issues/3579
205 .. _3628: https://foss.heptapod.net/pypy/pypy/-/issues/3628
206 .. _3834: https://foss.heptapod.net/pypy/pypy/-/issues/3834
207 .. _3874: https://foss.heptapod.net/pypy/pypy/-/issues/3874
208 .. _3881: https://foss.heptapod.net/pypy/pypy/-/issues/3881
209 .. _3883: https://foss.heptapod.net/pypy/pypy/-/issues/3883
210 .. _3884: https://foss.heptapod.net/pypy/pypy/-/issues/3884
211 .. _3887: https://foss.heptapod.net/pypy/pypy/-/issues/3887
212 .. _3890: https://foss.heptapod.net/pypy/pypy/-/issues/3890
213 .. _3892: https://foss.heptapod.net/pypy/pypy/-/issues/3892
214 .. _3906: https://foss.heptapod.net/pypy/pypy/-/issues/3906
215 .. _3912: https://foss.heptapod.net/pypy/pypy/-/issues/3912
216 .. _3917: https://foss.heptapod.net/pypy/pypy/-/issues/3917
217 .. _3921: https://foss.heptapod.net/pypy/pypy/-/issues/3921
218 .. _3925: https://foss.heptapod.net/pypy/pypy/-/issues/3925
219 .. _3938: https://foss.heptapod.net/pypy/pypy/-/issues/3938
220 .. _3944: https://foss.heptapod.net/pypy/pypy/-/issues/3944