Debian Codegraph @

pypy/doc/release-v7.3.0.rst

raw
1 =========================================================
2 PyPy v7.3.0: release of 2.7, and 3.6, released 2019-12-24
3 =========================================================
4
5 The PyPy team is proud to release the version 7.3.0 of PyPy, which includes
6 two different interpreters:
7
8 - PyPy2.7, which is an interpreter supporting the syntax and the features of
9 Python 2.7 including the stdlib for CPython 2.7.13
10
11 - PyPy3.6: which is an interpreter supporting the syntax and the features of
12 Python 3.6, including the stdlib for CPython 3.6.9.
13
14 The interpreters are based on much the same codebase, thus the double
15 release.
16
17 We have worked with the python packaging group to support tooling around
18 building third party packages for python, so this release changes the ABI tag
19 for PyPy.
20
21 Based on the great work done in `portable-pypy`_, the linux x86 downloads we
22 provide are now built on top of the `manylinux2010`_ CentOS6 docker image.
23 The tarballs include the needed shared objects to run on any platform that
24 supports manylinux2010 wheels, which should include all supported versions of
25 debian- and RedHat-based distributions (including Ubuntu, CentOS, and Fedora).
26
27 The `CFFI`_ backend has been updated to version 1.13.1. We recommend using CFFI
28 rather than c-extensions to interact with C.
29
30 The built-in ``_cppyy`` module was upgraded to 1.10.6, which
31 provides, among others, better template resolution, stricter ``enum`` handling,
32 anonymous struct/unions, cmake fragments for distribution, optimizations for
33 PODs, and faster wrapper calls. We recommend using cppyy_ for performant
34 wrapping of C++ code for Python.
35
36 The vendored pyrepl package for interaction inside the REPL was updated.
37
38 Support for codepage encoding and decoding was added for Windows.
39
40 As always, this release fixed several issues and bugs raised by the growing
41 community of PyPy users. We strongly recommend updating. Many of the fixes are
42 the direct result of end-user bug reports, so please continue reporting issues
43 as they crop up.
44
45 You can download the v7.3 releases here:
46
47 https://pypy.org/download.html
48
49 We would like to thank our donors for the continued support of the PyPy
50 project. If PyPy is not quite good enough for your needs, we are available for
51 direct consulting work.
52
53 We would also like to thank our contributors and encourage new people to join
54 the project. PyPy has many layers and we need help with all of them: `PyPy`_
55 and `RPython`_ documentation improvements, tweaking popular modules to run
56 on pypy, or general `help`_ with making RPython's JIT even better. Since the
57 previous release, we have accepted contributions from 3 new contributors,
58 thanks for pitching in.
59
60 If you are a python library maintainer and use c-extensions, please consider
61 making a cffi / cppyy version of your library that would be performant on PyPy.
62 If you are stuck with using the C-API, you can use `docker images`_ with PyPy
63 built in or the `multibuild system`_ to build wheels.
64
65 .. _`PyPy`: index.html
66 .. _`RPython`: https://rpython.readthedocs.org
67 .. _`help`: project-ideas.html
68 .. _`CFFI`: https://cffi.readthedocs.io
69 .. _`cppyy`: https://cppyy.readthedocs.io
70 .. _`available as wheels`: https://github.com/antocuni/pypy-wheels
71 .. _`portable-pypy`: https://github.com/squeaky-pl/portable-pypy
72 .. _`docker images`: https://github.com/pypy/manylinux
73 .. _`multibuild system`: https://github.com/matthew-brett/multibuild
74
75 What is PyPy?
76 =============
77
78 PyPy is a very compliant Python interpreter, almost a drop-in replacement for
79 CPython 2.7, 3.6. It's fast (`PyPy and CPython 2.7.x`_ 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 This PyPy release supports:
86
87 * **x86** machines on most common operating systems
88 (Linux 32/64 bits, Mac OS X 64 bits, Windows 32 bits, OpenBSD, FreeBSD)
89
90 * big- and little-endian variants of **PPC64** running Linux,
91
92 * **s390x** running Linux
93
94 * 64-bit **ARM** machines running Linux.
95
96 Unfortunately at the moment of writing our ARM buildbots are out of service,
97 so for now we are **not** releasing any binary for the ARM architecture (32
98 bit), although PyPy does support ARM 32 bit processors.
99
100 .. _`PyPy and CPython 2.7.x`: https://speed.pypy.org
101 .. _`dynamic languages`: https://rpython.readthedocs.io/en/latest/examples.html
102
103
104 Changelog
105 =========
106
107 Changes shared across versions
108 ------------------------------
109
110 * Fix segfault when calling descr-methods with no arguments
111 * Change the SOABI and subsequently change the reported ABI tag.
112 * Update the builtin ``_cppyy`` backend to 1.10.6
113 * Performance improvements in string/unicode handling
114 * Fix compilation error when building `revdb`_ (`issue 3084`_, actually
115 released in PyPy 7.2 but not mentioned in the release notes)
116 * Add JIT options to documentation and an option for JIT help via ``pypy --jit
117 help``
118 * Fix regex escapes in pyrepl (`issue 3097`_)
119 * Allow reloading of subclasses of module (`issue 3099`_)
120 * Work around a gcc bug, which was reported to them and fixed (`issue 3086`_)
121 * Fix (again) faulty logic when decoding invalid UTF-8 (`issue 2389`_)
122 * Fix up LICENSE file
123 * Turn all ``http`` links in the documentation to ``https``
124 * Update the bndled pip and setuptools (used in ``pypy -mensurepip`` to version
125 that support manylinux2010 wheels
126 * Link the ``DEFAULT_SOABI`` to the ``PYPY_VERSION``
127 * Workaround for programs calling ``sys.setrecursionlimit(huge_value)`` (`issue
128 3094`_)
129 * Set minimal ``MACOSX_DEPLOYMENT_TARGET`` to 10.7 on macOS; cpython uses 10.5
130 * Fix a JIT bug causing rare register corruption on aarch64
131 * Add discovery of ``ncursesw`` when building ``_minimal_curses`` and improve
132 handling of old curses versions (`issue 2970`_)
133 * Improve the error message for ``class X(random_object)`` (`issue 3109`_)
134 * Deal with json dicts containing repeated keys in the new map based parser
135 (`issue 3108`_)
136 * Port parts of the `portable pypy`_ repackaging scripts to add an option for
137 ``RPATH`` manipulation on linux
138 * Check for overflow in ctypes array creation
139 * Better support and report MSVC versions used to compile on windows
140 * Allow any kind of buffer in socket.setsockopt(), like CPython (`issue 3114`_)
141 * Fix importing a module with unicode in ``sys.path`` (`issue 3112`_)
142 * Support OpenSSL 1.1 and TLSv1_3
143 * Remove the (deprecated since 5.7) asmgcc rootfinder from the GC
144 * Overflow in RPython when converting ``2<<32`` into a ``Signed`` on 32-bit
145 platforms rather than automatically using a ``SignedLongLong``, require an
146 explicit ``r_int64()`` call instead
147 * Fix multithread contention when creating an object in cffi (PyPy only)
148 * Copy lib/* shared objects in portable builds when creating virtual
149 environments with virtualenv and venv
150 * Potential fix in rare-case JIT optimizer (`issue 3128`_)
151
152 C-API (cpyext) and c-extensions
153 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
154
155 * Add ``_PySet_Next``, ``_PySet_NextEntry``
156 * Correctly swallow exceptions happening inside ``PyDict_GetItem()`` (`issue
157 3098`_)
158 * Respect tp_dict on PyType_Ready
159 * Allow calling ``PyType_Ready`` on a subclass with a partially built
160 ``tp_base`` (issue 3117`_)
161 * Rename ``tuple_new`` to ``_PyPy_tuple_new`` to follow the naming convention of
162 exported symbols in ``libpypy-c.so``
163 * Actually restore the traceback in ``PyErr_Restore`` (`issue 3120`_)
164
165 Python 3.6 only
166 ---------------
167
168 * Don't grow the ``lzma.decompress()`` buffer past ``max_length`` (`issue 3088`_)
169 * Backport fix from CPython for failure of ``lzma`` to decompress a file
170 (`issue 3090`_)
171 * Fix ``asyncgen_hooks`` and refactor ``coroutine execution``
172 * Fix range checking in GB18030 decoder (CPython issue `29990`_)
173 * Fix handling escape characters in HZ codec (CPython issue `30003`_)
174 * Reject null characters in a few more functions (CPython issue `13617`_)
175 * Fix build on macOS without ``clock_gettime`` (before 10.12 and xcode 8,
176 released 2016)
177 * Backport 3.7.5 changes to ``timedelta.__eq__`` and ``time.__eq__`` (CPython
178 issue `37579`_)
179 * Backport more fixes to comparisons in ``datetime.py`` (CPython issue `37985`_)
180 * Use the python tag in ``pyc`` file names, not the abi tag
181 * Handle string formatting with a single ``[`` in the format string (`issue
182 3100`_)
183 * Backport some of the patches in `macports pypy`_
184 * Add missing ``HAVE_FACCESSAT`` to ``posix._have_functions``
185 * Update pyrepl from upstream package (`issue 2971`_)
186 * Fix ``PyFrame._guess_function_name_parens()``
187 * Fix range of allowed years in ``time.mktime`` to match CPython `13312`_
188 * Generators need to store the old current ``exc_info`` in a place that is
189 visible, because in one corner case a call to ``sys.exc_info()`` might need
190 it. (`issue 3096`_)
191 * Remove incorrect clobbering of the ``locals`` after running ``exec()``
192 * Adds encoding, decoding codepages on win32
193 * Remove socket error attributes from ``_ssl`` (`issue 3119`_)
194 * Add missing ``os.getgrouplist`` (part of `issue 2375`_)
195 * Back-port the tentative fix from cpython: "Import deadlock detection causes
196 deadlock" (part of `issue 3111`_)
197 * Fix handling of ``sys.exc_info()`` in generators
198 * Return ``W_IntObject`` when converting from ``float`` to ``int`` when
199 possible, which speeds up many code paths.
200
201 Python 3.6 C-API
202 ~~~~~~~~~~~~~~~~
203
204 * Add ``PyObject_GenericGetDict``, ``PyObject_GenericSetDict``, ``_Py_strhex``,
205 ``_Py_strhex_bytes``, ``PyUnicodeNew``, ``_PyFinalizing``,
206 ``PySlice_Unpack``, ``PySlice_AdjustIndices``, ``PyOS_FSPath``,
207 ``PyModule_AddFunctions``
208 * Implement ``pystrhex.h`` (`issue 2687`_)
209 * Make ``PyUnicodeObject`` slightly more compact
210 * Fix memory leak when releasing a ``PyUnicodeObject``
211
212 .. _`revdb`: fix broken link
213 .. _`portable pypy`: fix broken link
214 .. _`manylinux2010`: fix broken link
215 .. _`macports pypy`: https://github.com/macports/macports-ports/blob/master/lang/pypy/files/darwin.py.diff
216
217 .. _`issue 2375`: https://bitbucket.com/pypy/pypy/issues/2375
218 .. _`issue 2389`: https://bitbucket.com/pypy/pypy/issues/2389
219 .. _`issue 2687`: https://bitbucket.com/pypy/pypy/issues/2687
220 .. _`issue 2970`: https://bitbucket.com/pypy/pypy/issues/2970
221 .. _`issue 2971`: https://bitbucket.com/pypy/pypy/issues/2971
222 .. _`issue 3084`: https://bitbucket.com/pypy/pypy/issues/3084
223 .. _`issue 3086`: https://bitbucket.com/pypy/pypy/issues/3086
224 .. _`issue 3088`: https://bitbucket.com/pypy/pypy/issues/3088
225 .. _`issue 3090`: https://bitbucket.com/pypy/pypy/issues/3090
226 .. _`issue 3094`: https://bitbucket.com/pypy/pypy/issues/3094
227 .. _`issue 3096`: https://bitbucket.com/pypy/pypy/issues/3096
228 .. _`issue 3097`: https://bitbucket.com/pypy/pypy/issues/3097
229 .. _`issue 3098`: https://bitbucket.com/pypy/pypy/issues/3098
230 .. _`issue 3099`: https://bitbucket.com/pypy/pypy/issues/3099
231 .. _`issue 3100`: https://bitbucket.com/pypy/pypy/issues/3100
232 .. _`issue 3108`: https://bitbucket.com/pypy/pypy/issues/3108
233 .. _`issue 3109`: https://bitbucket.com/pypy/pypy/issues/3109
234 .. _`issue 3111`: https://bitbucket.com/pypy/pypy/issues/3111
235 .. _`issue 3112`: https://bitbucket.com/pypy/pypy/issues/3112
236 .. _`issue 3114`: https://bitbucket.com/pypy/pypy/issues/3114
237 .. _`issue 3117`: https://bitbucket.com/pypy/pypy/issues/3117
238 .. _`issue 3119`: https://bitbucket.com/pypy/pypy/issues/3119
239 .. _`issue 3120`: https://bitbucket.com/pypy/pypy/issues/3120
240 .. _`issue 3128`: https://bitbucket.com/pypy/pypy/issues/3120
241
242 .. _13312: https://bugs.python.org/issue13312
243 .. _13617: https://bugs.python.org/issue13617
244 .. _29990: https://bugs.python.org/issue29990
245 .. _30003: https://bugs.python.org/issue30003
246 .. _37579: https://bugs.python.org/issue37579
247 .. _37985: https://bugs.python.org/issue37985
248 .. _37985: https://bugs.python.org/issue37985
249
250