PyPy v7.3.2: release of 2.7, 3.6, and 3.7 alpha¶
The PyPy team is proud to release the version 7.3.2 of PyPy, which 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.13
PyPy3.6: which is an interpreter supporting the syntax and the features of Python 3.6, including the stdlib for CPython 3.6.9.
PyPy3.7 alpha: which is our first release of an interpreter supporting the syntax and the features of Python 3.7, including the stdlib for CPython 3.7.9. We call this alpha quality software, there may be issues about compatibility with new and changed features in CPython 3.7. Please let us know what is broken or missing. We have not implemented the documented changes in the
re
module, and a few other pieces are also missing. For more information, see the PyPy 3.7 wiki page
The interpreters are based on much the same codebase, thus the multiple release. This is a micro release, all APIs are compatible with the 7.3.0 (Dec 2019) and 7.3.1 (April 2020) releases, but read on to find out what is new.
Conda Forge now supports PyPy as a python interpreter. The support is quite complete for linux and macOS. This is the result of a lot of hard work and goodwill on the part of the Conda Forge team. A big shout out to them for taking this on.
Development of PyPy has moved to https://foss.heptapod.net/pypy/pypy. This was covered more extensively in this blog post. We have seen an increase in the number of drive-by contributors who are able to use gitlab + mercurial to create merge requests.
The CFFI backend has been updated to version 1.14.2. We recommend using CFFI rather than c-extensions to interact with C, and using cppyy for performant wrapping of C++ code for Python.
Numpy has begun shipping wheels on PyPI for PyPy, currently for linux 64-bit only. Wheels for PyPy windows will be available from the next NumPy release.
A new contributor took us up on the challenge to get windows 64-bit` support.
The work is proceeding on the win64
branch, more help in coding or
sponsorship is welcome.
As always, this release fixed several issues and bugs. We strongly recommend updating. Many of the fixes are the direct result of end-user bug reports, so please continue reporting issues as they crop up.
You can find links to download the v7.3.2 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.
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 8 new contributors, thanks for pitching in.
If you are a python library maintainer and use c-extensions, please consider making a 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.6, and 3.7. It’s fast (PyPy and CPython 2.7.x 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 X 64 bits, Windows 32 bits, OpenBSD, FreeBSD)
big- and little-endian variants of PPC64 running Linux,
s390x running Linux
64-bit ARM machines running Linux.
PyPy does support ARM 32 bit processors, but does not release binaries.
Changelog¶
Python 3.6 only¶
Fix
_sqlite3.Connection
withisolation_level=None
in the constructorFix embedded mode for CFFI (CFFI issue 449)
Add
socket.recvmsg_into
Fix return types in
os.readlink()
(issue 3177) andos.listdir()
Fix os.listdir()` for win32
Update
_ssl
to handle Post Handshake Authorization callbacks (PHA)Fix
oldcrc
argument ofbinascii.crc_hqx
tounsigned int
Implement
socket.sethostname()
(issue 3198)Backport CPython 35519: “Rename test.bisect to test.bisect_cmd” from CPython 3.7
Fix the repr of
SRE_Pattern
andSRE_Match
Fix ill-defined behaviour with class.__init__ (issue 3239)
Improve pickling performance (issue 3230)
Forward port race condition fix from PyPy 2.7
Lib/weakref.py
(issue 3243)Implement bpo 30465: Fix lineno and col_offset in fstring AST nodes (merge request 730)
Implement bpo 29104: Fixed parsing backslashes in f-strings (merge request 736)
Fix
time.sleep
bug in win32Expose missing
lzma_stream_encoder
in cffi_lzma
module (issue 3242_)Fix
os.unsetenv
on win32, bpo 39413 (CPython 3.7+, we can do 3.6+)Add symlinks to
pypy
,pypy3.6
to linux, macOS tarball. Maybe needed for macOS and multibuildThe following sequence no longer makes any copy:
b = StringBuilder(); b.append(some_large_string); s = b.build()
Add missing
os
constants:P_NOWAIT
,P_NOWAITO
,P_WAIT
Allow codec errorhandlers to modify the underlying str/bytes being converted
Do not import
platform
at startup (issue 3269)Enable more extensive optimizations of list strategies on Python3, since
int
andlong
are the same (issue 3250)Special case bytewise codec errorhandlers
replace
,ignore
,surrogateescape
to use the same logic asfinal == True
Allow
CRTL-C
to interrupttime.sleep
on windowsInhibit compiler tail-call optimization via
PYPY_INHIBIT_TAIL_CALL
on windowsWhen
pypy -m pip
fails to findpip
, give an error message that hints atpypy -m ensurepip
Fix broken
_socket.share
on windowsAdd missing
os.{gs}et_handle_inheritable
(PEP 446) on windowsFix ip address hashing in
ipaddress.py
: CPython issue 41004Disallow CR/LF in
email.headerregistry.Address
: CPython issue 39073Ban
reuse_address
parameter inloop.create_datagram_endpoint()
inasyncio.base_events
: CPython issue 37228Preventing newline in
encodongs.uu.filename
from corrupting the output format: CPython issue 38945Prevent backtracking in regexes in
http.cookiejar
: Cpython issue 38804Sync
email._header_value_parser
,email._parseaddr
and their respective tests: CPython 37461 and 34155Revert extending
time.time()
and friends to accept an optionalinfo
argument, use a privatetime
function instead.
Python 3.6 C-API¶
Add
PyType_GetFlags
,PyType_GetSlot
,PyUnicode_{En,De}code_Locale
,PyUnicode_{Find,Read,Write}Char
,Fix
PyUnicode_*
handling on windows wherewchar_t
is 2 bytes