PyPy v7.3.10: release of python 2.7, 3.8, and 3.9¶
Note
This is a pre-release announcement. When the release actually happens, it will be announced on the PyPy blog
The PyPy team is proud to release version 7.3.10 of PyPy. We have some nice speedups and bugfixes we wish to share. The release includes three different interpreters:
PyPy2.7, which is an interpreter supporting the syntax and the features of Python 2.7 including the stdlib for CPython 2.7.18+ (the
+
is for backported security updates)PyPy3.8, which is an interpreter supporting the syntax and the features of Python 3.8, including the stdlib for CPython 3.8.15.
PyPy3.9, which is an interpreter supporting the syntax and the features of Python 3.9, including the stdlib for CPython 3.9.15. We have gained confidence in the stability of this version, and are removing the “beta” label.
The interpreters are based on much the same codebase, thus the multiple release. This is a micro release, all APIs are compatible with the other 7.3 releases. Highlights of the release, since the release of 7.3.9 in March 2022 include:
A release of Apple Silicon M1 arm64 versions. This work was sponsored by an anonymous donor and is tested on our buildbots.
Many improvements to the basic interpreter to make it faster
The conda-forge community has built over 1000 packages for PyPy3.8 and 3.9, making it easier than ever to use PyPy.
Update the packaged OpenSSL to 1.1.1s and apply applicable secruity fixes from CPython 3.9.15 to PyPy2.7
Update the HPy backend in PyPy3.8 and PyPY3.9 to 0.0.4
We recommend updating. You can find links to download the v7.3.10 releases here:
We would like to thank our donors for the continued support of the PyPy project. If PyPy is not quite good enough for your needs, we are available for direct consulting work. If PyPy is helping you out, we would love to hear about it and encourage submissions to our blog via a pull request to https://github.com/pypy/pypy.org
We would also like to thank our contributors and encourage new people to join the project. PyPy has many layers and we need help with all of them: PyPy and RPython documentation improvements, tweaking popular modules to run on PyPy, or general help with making RPython’s JIT even better. Since the previous release, we have accepted contributions from XXX new contributors, thanks for pitching in, and welcome to the project!
If you are a python library maintainer and use C-extensions, please consider making a HPy / CFFI / cppyy version of your library that would be performant on PyPy. In any case both cibuildwheel and the multibuild system support building wheels for PyPy.
What is PyPy?¶
PyPy is a Python interpreter, a drop-in replacement for CPython 2.7, 3.8 and 3.9. It’s fast (PyPy and CPython 3.7.4 performance comparison) due to its integrated tracing JIT compiler.
We also welcome developers of other dynamic languages to see what RPython can do for them.
This PyPy release supports:
x86 machines on most common operating systems (Linux 32/64 bits, Mac OS 64 bits, Windows 64 bits, OpenBSD, FreeBSD)
64-bit ARM machines running Linux. A shoutout to Huawei for sponsoring the VM running the tests.
Apple M1 arm64 machines.
s390x running Linux
big- and little-endian variants of PPC64 running Linux,
PyPy support Windows 32-bit, PPC64 big- and little-endian, and ARM 32 bit, but does not release binaries. Please reach out to us if you wish to sponsor releases for those platforms.
Changelog¶
Default version (2.7+)¶
C-API (cpyext) and C-extensions¶
Make sure
decref
is being called even if a c-level call raises an exception (issue 3854)
Python 3.8+¶
Python 3.8+ bugfixes¶
Fix bug in the disassembler of py3 opcodes (issue 3700)
Raise ModuleNotFoundError instead of ImportError in some cases
Fix lineno, col_offset for decorated functions and classes
Add a
name
tosys.hash_info
Fix concurrency problem in buffered io reading (issue 3729)
Make it possible to multiple-inherit from KeyError again (issue 3728)
Check results from _openssl’s
EVP_DigestInit_ex
andEVP_DigestUpdate
, and fix some failing tests (issue 3741)Fix pickling of filters
Fix the way that the lookup annotation optimization breaks python3 due to the way that module instances can change their class at runtime (issue 3758)
Use the name mapping when creating new hashes for
_hashlib
(issue 3778)Expose
os.sendfile
on macosDo not override PyPy’s MAGIC_NUMBER` when using stdlib/importlib/_bootstrap_external.py (issue 3783)
Fix dictionary unpacking for kwargs (issue 3775)
Add memory pressure when creating a tkinter image (issue 3798)
Remove debug print from
_winapi
(issue 3819)Add
__contains__
to array.array type (issue 3820)Fix CVE-2022-37454 via porting CPython changes to _sha3/kcp/KeccakSponge.inc
Make type lookups fill the
.name
field ofAttributeError
Check cursor lock in sqlite3
Cursor.close
, also lock around__fetch_one_row
Implement
os.get_native_thread
Fix setting a slice in a memoryview with non-unit strides (issue 3857)
Python 3.8+ speedups and enhancements¶
Speed up
fstrings
by making the parentstack a resizable list of charsBetter error message when the
__iter__
of a class is set toNone
(issue 3716)Refactor the package.py script for better compatibility with conda-forge
Add a jit driver for filter (issue 3745)
Improve opcode handling:
jump_absolute
,int_xor
, and othersDon’t make a loop for one-arg
print()
Make float hashing elidable and avoid creating bridges
Mimic CPython’s
max_int_threshold
to limit the length of a string that that can be parsed into an int
Python 3.8+ C-API¶
Add
PyReversed_Type
,PyUnicode_EncodeCodePage
,PyInterpreterState_GetID
,PyErr_SetFromErrnoWithFilenameObjects
,PyUnicode_Append
,PyUnicode_AppendAndDel
,PyClassMethod_Type
,PyStructSequence_SetItem
,PyStructSequence_GetItem
,PyDictValues_Type
,PyDictKeys_Type
,Map user defined python
__init__
totp_init
(issue 2806)Fix PyDict_Contains (issue 3742)
Allow big ints in
PyNumber_ToBase
(issue 3765)Normalize OSErrors more consistenly, may not be completely fixed on macos (issue 3786)
Fix
PyDict_Contains
to raise on unhashable keyUse
tp_itemsize==0
onPyUnicode_Type
, even for compact forms (issue 3772)Include
<sys/time.h>
in headers, which fixes a problem with musl (issue 3801)Add missing incref in
PyObject_Init
, allocatetp_basicsize
bytes when creating aPyTypeObject
(issues 3844, 3847)Assign
tp_getset
to app-level type inPyType_FromSpecWithBases
(issue 3851)Properly instantiate
PyFunction_Type
,PyMethod_Type
,PyRange_Type
,PyTraceBack_Type
(issue 3776)
Python 3.9+¶
Python 3.9+ bugfixes¶
Fix
f-string
bug where the recursive tokenization was done incorrectly (issue 3751)Fixes to repr and slots of nested GenericAliases (issue 3720)
Match CPython error messages for zip when strict=True
Add
BASE_TYPE_ADAPTION
optimization to sqlite3Make
__file__
of the__main__
module be an absolute path, if possible (issue 3766)Use an absolute path for the main module (issue 3792)
Use an absolute path for
sys.path[0]
when running a directory from the cmdline (issue 3792)Fix first line number of eval to be reported as 0 (issue 3800)
Implement
bitcount
for intsCheck when unmarshalling
TYPE_SHORT_ASCII
that non-ascii bytes are not presentFix CVE-2022-42919 as CPython did in cpython-97514
Fix
DICT_MERGE
with objects that aren’t dicts and don’t implement__len__
(issue 3841)
Python 3.9+ speedups and enhancements¶
Adopt CPython changes to speed up fractions (issue 3746, cpython-91851)