| 1 |
======================================================================= |
| 2 |
PyPy v7.3.13: release of python 2.7, 3.9, and 3.10, released 2023-09-29 |
| 3 |
======================================================================= |
| 4 |
|
| 5 |
The PyPy team is proud to release version 7.3.13 of PyPy. |
| 6 |
This is primarily a security/bug-fix release. CPython released security |
| 7 |
patches, and this release also improves the ability to use type |
| 8 |
specifications via ``PyType_FromSpec`` and friends. There are also some |
| 9 |
small speed-ups. |
| 10 |
|
| 11 |
The release includes three different interpreters: |
| 12 |
|
| 13 |
- PyPy2.7, which is an interpreter supporting the syntax and the features of |
| 14 |
Python 2.7 including the stdlib for CPython 2.7.18+ (the ``+`` is for |
| 15 |
backported security updates) |
| 16 |
|
| 17 |
- PyPy3.9, which is an interpreter supporting the syntax and the features of |
| 18 |
Python 3.9, including the stdlib for CPython 3.9.18. |
| 19 |
|
| 20 |
- PyPy3.10, which is an interpreter supporting the syntax and the features of |
| 21 |
Python 3.10, including the stdlib for CPython 3.10.13. Note it requires at |
| 22 |
least cython 0.29.35 or cython 3.0.0b3. |
| 23 |
|
| 24 |
The interpreters are based on much the same codebase, thus the multiple |
| 25 |
release. This is a micro release, all APIs are compatible with the other 7.3 |
| 26 |
releases. It follows after 7.3.12 release on June 16, 2023. |
| 27 |
|
| 28 |
We recommend updating. You can find links to download the v7.3.13 releases here: |
| 29 |
|
| 30 |
https://pypy.org/download.html |
| 31 |
|
| 32 |
We would like to thank our donors for the continued support of the PyPy |
| 33 |
project. If PyPy is not quite good enough for your needs, we are available for |
| 34 |
`direct consulting`_ work. If PyPy is helping you out, we would love to hear about |
| 35 |
it and encourage submissions to our blog_ via a pull request |
| 36 |
to https://github.com/pypy/pypy.org |
| 37 |
|
| 38 |
We would also like to thank our contributors and encourage new people to join |
| 39 |
the project. PyPy has many layers and we need help with all of them: bug fixes, |
| 40 |
`PyPy`_ and `RPython`_ documentation improvements, or general `help`_ with making |
| 41 |
RPython's JIT even better. |
| 42 |
|
| 43 |
If you are a python library maintainer and use C-extensions, please consider |
| 44 |
making a HPy_ / CFFI_ / cppyy_ version of your library that would be performant |
| 45 |
on PyPy. In any case, both `cibuildwheel`_ and the `multibuild system`_ support |
| 46 |
building wheels for PyPy. |
| 47 |
|
| 48 |
.. _`PyPy`: index.html |
| 49 |
.. _`RPython`: https://rpython.readthedocs.org |
| 50 |
.. _`help`: project-ideas.html |
| 51 |
.. _CFFI: https://cffi.readthedocs.io |
| 52 |
.. _cppyy: https://cppyy.readthedocs.io |
| 53 |
.. _`multibuild system`: https://github.com/matthew-brett/multibuild |
| 54 |
.. _`cibuildwheel`: https://github.com/joerick/cibuildwheel |
| 55 |
.. _blog: https://pypy.org/blog |
| 56 |
.. _HPy: https://hpyproject.org/ |
| 57 |
.. _was sponsored: https://www.pypy.org/posts/2022/07/m1-support-for-pypy.html |
| 58 |
.. _direct consulting: https://www.pypy.org/pypy-sponsors.html |
| 59 |
.. _has built: https://www.pypy.org/posts/2022/11/pypy-and-conda-forge.html |
| 60 |
|
| 61 |
What is PyPy? |
| 62 |
============= |
| 63 |
|
| 64 |
PyPy is a Python interpreter, a drop-in replacement for CPython |
| 65 |
It's fast (`PyPy and CPython 3.7.4`_ performance |
| 66 |
comparison) due to its integrated tracing JIT compiler. |
| 67 |
|
| 68 |
We also welcome developers of other `dynamic languages`_ to see what RPython |
| 69 |
can do for them. |
| 70 |
|
| 71 |
We provide binary builds for: |
| 72 |
|
| 73 |
* **x86** machines on most common operating systems |
| 74 |
(Linux 32/64 bits, Mac OS 64 bits, Windows 64 bits) |
| 75 |
|
| 76 |
* 64-bit **ARM** machines running Linux (``aarch64``). |
| 77 |
|
| 78 |
* Apple **M1 arm64** machines (``macos_arm64``). |
| 79 |
|
| 80 |
* **s390x** running Linux |
| 81 |
|
| 82 |
PyPy support Windows 32-bit, Linux PPC64 big- and little-endian, and Linux ARM |
| 83 |
32 bit, but does not release binaries. Please reach out to us if you wish to |
| 84 |
sponsor binary releases for those platforms. Downstream packagers provide |
| 85 |
binary builds for debian, Fedora, conda, OpenBSD, FreeBSD, Gentoo, and more. |
| 86 |
|
| 87 |
.. _`PyPy and CPython 3.7.4`: https://speed.pypy.org |
| 88 |
.. _`dynamic languages`: https://rpython.readthedocs.io/en/latest/examples.html |
| 89 |
|
| 90 |
Changelog |
| 91 |
========= |
| 92 |
|
| 93 |
For all versions |
| 94 |
---------------- |
| 95 |
- Update to ssl 1.1.1w, or 3.0.10 when embedding libraries for a portable build |
| 96 |
|
| 97 |
Bugfixes |
| 98 |
~~~~~~~~ |
| 99 |
- Report exceptions that are created when forcing an oefmt as unraisable (issue |
| 100 |
3978_) |
| 101 |
|
| 102 |
Speedups and enhancements |
| 103 |
~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 104 |
|
| 105 |
- Shrink the size of the PyPy binaries by about ~700KiB by auto-generating |
| 106 |
fewer versions of the RPython dict and list types. |
| 107 |
- Speed up tracing and code generation in the JIT slightly by reducing the size |
| 108 |
in memory of one of its central data structures, the ``MIFrame``. This is |
| 109 |
done by not allocating three lists of length 256 for the registers in the |
| 110 |
MIFrames and the blackhole frames. Almost all jitcodes have much smaller |
| 111 |
frame sizes. |
| 112 |
- Improve ``str.strip()`` to make it better optimizable by the JIT. |
| 113 |
- Make access to ``sys.flags`` faster by making sure the JIT can constant-fold |
| 114 |
the access most of the time. (especially important on py3.x, where every |
| 115 |
``bytes.decode`` call checks ``sys.flags.utf8_mode``) |
| 116 |
- Speed up the flowspace a lot for huge functions. This makes building the PyPy |
| 117 |
binary a little bit faster. |
| 118 |
- Make ``UnicodeIO`` store its data in a list of ``r_int32``, as opposed to |
| 119 |
using the rpython (Python2.7) unicode type. we want to get rid of the unicode |
| 120 |
type and also it requires an extra copy all the time. |
| 121 |
- Make every Python integer that doesn't fit into a machine word use one word |
| 122 |
less memory by storing the sign differently. |
| 123 |
|
| 124 |
|
| 125 |
Python 3.9+ |
| 126 |
----------- |
| 127 |
|
| 128 |
- Create c-extension modules used in tests as part of the build (in |
| 129 |
package.py), not as part of testing. |
| 130 |
|
| 131 |
Bugfixes |
| 132 |
~~~~~~~~ |
| 133 |
- More selectively clear ``StopIteration`` exceptions on ``tp_iternext`` (issue |
| 134 |
3956_). Diagnosed and fixed by a new contributor. |
| 135 |
- Copy less when creating a venv by using a ``PYPY_PORTABLE_DEPS.txt`` file to |
| 136 |
state which dlls to copy in a portable build (issue 3611_) |
| 137 |
- On macos ``sendfile`` can return an error while sending part of the file |
| 138 |
(issue 3964_) |
| 139 |
- Fixes on both app-level and C level for ``Py_TPFLAGS_BASETYPE=0`` (issue |
| 140 |
2742_). Also set ``PyType_Type.tp_itemsize`` to ``sizeof(PyMemberDef)`` like |
| 141 |
on CPython |
| 142 |
- Fix ``PyType_FromSpecWithBases`` to correctly use ``Py_tp_doc``, |
| 143 |
``Py_tp_members`` in spec, fix ``__module__`` assignment, better handle |
| 144 |
``__name__`` and ``tp_name`` |
| 145 |
- Hide ``functools`` wrappers from the stack when reporting warnings (issue |
| 146 |
3988_) |
| 147 |
- Fix edge case of datetime isoformat parsing (issue 3989_) |
| 148 |
- Accept NULL ``tp_doc`` (bpo-41832_) |
| 149 |
- Align ``nb_int`` with ``PyNumber_Long`` (to get consistent error messages) |
| 150 |
- Handle ``pathlib.Path`` objects in ``_ssl`` (issue 4002_) |
| 151 |
- Implement ``_PyLong_AsInt`` which is not part of the stable API but used in |
| 152 |
testing |
| 153 |
|
| 154 |
Speedups and enhancements |
| 155 |
~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 156 |
- Avoid compiling a new regex where not needed (in ``email``, ``csv``, and |
| 157 |
elsewhere) (issue 3961_) |
| 158 |
|
| 159 |
Python 3.10 |
| 160 |
----------- |
| 161 |
|
| 162 |
Bugfixes |
| 163 |
~~~~~~~~ |
| 164 |
- Fix, test locking in HMAC update (issue 3962_) |
| 165 |
- When re-assigning to ``type.__bases__``, rebuild the cpyext type struct |
| 166 |
(issue 3976_) |
| 167 |
- Add missing slot macro ``Py_am_send`` (issue 3990_) |
| 168 |
|
| 169 |
.. _bpo-41832: https://bugs.python.org/issue41832 |
| 170 |
.. _2742: https://foss.heptapod.net/pypy/pypy/-/issues/2742 |
| 171 |
.. _3611: https://foss.heptapod.net/pypy/pypy/-/issues/3611 |
| 172 |
.. _3956: https://foss.heptapod.net/pypy/pypy/-/issues/3956 |
| 173 |
.. _3961: https://foss.heptapod.net/pypy/pypy/-/issues/3961 |
| 174 |
.. _3962: https://foss.heptapod.net/pypy/pypy/-/issues/3962 |
| 175 |
.. _3964: https://foss.heptapod.net/pypy/pypy/-/issues/3964 |
| 176 |
.. _3976: https://foss.heptapod.net/pypy/pypy/-/issues/3976 |
| 177 |
.. _3978: https://foss.heptapod.net/pypy/pypy/-/issues/3978 |
| 178 |
.. _3988: https://foss.heptapod.net/pypy/pypy/-/issues/3988 |
| 179 |
.. _3989: https://foss.heptapod.net/pypy/pypy/-/issues/3989 |
| 180 |
.. _3990: https://foss.heptapod.net/pypy/pypy/-/issues/3990 |
| 181 |
.. _4002: https://foss.heptapod.net/pypy/pypy/-/issues/4002 |
| 182 |
|