PyPy v7.2.0: release of 2.7, and 3.6¶
The PyPy team is proud to release the version 7.2.0 of PyPy, which includes two 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.
The interpreters are based on much the same codebase, thus the double release.
With the support of Arm Holdings Ltd. and Crossbar.io, this release supports
the 64-bit aarch64
ARM architecture. More about the work and the
performance data around this welcome development can be found in the blog
post.
This release removes the “beta” tag from PyPy3.6. While there may still be some small corner-case incompatibilities (around the exact error messages in exceptions and the handling of faulty codec errorhandlers) we are happy with the quality of the 3.6 series and are looking forward to working on a Python 3.7 interpreter.
We updated our benchmark runner at https://speed.pypy.org to a more modern machine and updated the baseline python to CPython 2.7.11. Thanks to Baroque Software for maintaining the benchmark runner.
The CFFI-based _ssl
module was backported to PyPy2.7 and updated to use
cryptography version 2.7. Additionally the _hashlib
, and crypt
(or
_crypt
on Python3) modules were converted to CFFI. This has two
consequences. End users and packagers can more easily update these libraries
for their platform by executing (cd lib_pypy; ../bin/pypy _*_build.py)
.
More significantly, since PyPy itself links to fewer system shared objects
(DLLs), on platforms with a single runtime namespace like linux different CFFI
and c-extension modules can load different versions of the same shared object
into PyPy without collision (issue 2617).
Until downstream providers begin to distribute c-extension builds with PyPy, we have made packages for some common packages available as wheels.
The CFFI backend has been updated to version 1.13.0. We recommend using CFFI rather than c-extensions to interact with C, and cppyy for interacting with C++ code.
Thanks to Anvil, we revived the PyPy Sandbox, which allows total control over a python interpreter’s interactions with the external world.
We implemented a new JSON decoder that is much faster, uses less memory, and uses a JIT-friendly specialized dictionary.
As always, this release is 100% compatible with the previous one and fixed several issues and bugs raised by the growing community of PyPy users. 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 download the v7.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 27 new contributors, thanks for pitching in.
What is PyPy?¶
PyPy is a very compliant Python interpreter, almost a drop-in replacement for CPython 2.7, 3.6. 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.
Unfortunately at the moment of writing our ARM buildbots are out of service, so for now we are not releasing any binary for the ARM architecture (32 bit), although PyPy does support ARM 32 bit processors.
Changelog¶
Changes released in v7.1.1¶
Improve performance of
u''.append
Prevent a crash in
zlib
when flushing a closed streamFix a few corner cases when encountering unicode values above 0x110000
Teach the JIT how to handle very large constant lists, sets, or dicts
Fix building on ARM32 (issue 2984)
Fix a bug in register assignment in ARM32
Package windows DLLs needed by cffi modules next to the cffi c-extensions (issue 2988)
Cleanup and refactor JIT code to remove
rpython.jit.metainterp.typesystem
Fix memoryviews of ctype structures with padding, (CPython issue 32780)
Changes to Python 3.6 released in v7.1.1¶
On win32, override some
errno.E*
values that were added to MSVC in v2010 so thaterrno.E* == errno.WSAE*
as in CPythonDo the same optimization that CPython does for
(1, 2, 3, *a)
(but at the AST level)Raise a
TypeError
when using buffers and unicode such as''.strip(buffer)
and'a' < buffer
Support
_overlapped
and asyncio on win32Fix an issue where
''.join(list_of_strings)
would rarely confuse utf8 and bytes (issue 2997)Fix
io.IncrementalNewlineDecoder
interaction with\r
(issue 3012)
Python 3.6 only¶
Accept
a, b = (*x, 2)
(issue 2995)Class methods with the signature
def meth(*args, **kwargs)
were not adding an impliedself
argument (issue 2996)Fix handling of
__fpath__
(issue 2985)Disable
assert
when run with-O
(issue 3000)codecs.encode
,codecs.decode
can behave differently thanustr.encode
,bytes.decode
(issue 3001)Putting
pdb.set_trace
call in a threaded program did not work (issue 3003)Fix parsing for converting strings with underscore into ints
Add
memoryview.obj
which stores a reference, (issue 3016)Fix datetime.fromtimestamp for win32 (CPython issue 29097)
Improve multiprocessing support on win32
Support negative offsets in
lnotab
(issue 2943)Fix leak of file descriptor with _io.FileIO(‘dir/’)
Fix
float.__round__(None)
(issue 3033)Fix for when we should use the Universal Newline mode on Windows for stdin/stdout/stderr (issue 3007)
Fix ImportError invalid arguments error wording
Ignore GeneratorExit when throwing into the aclose coroutine of an asynchronous generator (CPython issue 35409)
Improve the pure-python
faulthander
moduleProperly raise an exception when a
BlockingIOError
exception escapes fromW_BufferedReader.readline_w()
(issue 3042)Fix a code path only used in
zipimport
(issue 3034)Update the stdlib to 3.6.9, fix many failing tests
Fix handling of
__debug__
,-O
, andsys.flags.optimizeOptimize
(CPython issue 27169)Fix raising
SystemExit
inatexit
Fix case where
int(<subint>)
would go into infinite recursionDon’t ignore fold parameter in
(date,)time.replace()
Fix logic bug for
memoryview.cast
(whenview.format
is not'B'
)Implement retry-on-EINTR in fcntl module (CPython issue 35189)
Fix handling of 1st argument to
hashlib.blake2{b,s}()
(CPython issue 33729)Prevent overflow in
_hashlib
digest()
(CPython issue 34922)IOBase.readlines()
relies on the iterator protocol instead of callingreadline()
directlyDon’t inherit
IS_ABSTRACT
flag in classesReset raw_pos after unwinding the raw stream (CPython issue 32228)
Add existing options
-b
and-d
topypy3 --help
textClean up
_codecs
error handling codeAdd support for using stdlib as a zipfile
Check return type of
__prepare__()
(CPython issue 31588)Fix logic in
_curses.get_wch
(issue 3064)Match CPython exit code when failing to flush stdout/stderr at exit
Improve SyntaxError message output
Add
range.__bool__
Add cursor validity check to
_sqlite.Cursor.close
Improve message when mistakenly using
print something
in Python3Handle generator exit in
athrow()
(CPython issue 33786)Support unmarshalling
TYPE_INT64
and turnOverflowErrors
frommarshal.loads
intoValueErrors
Update
_posixsubprocess.c
to match CPython (CPython issue 32270)Remove unused
_posixsubprocess.cloexec_pipe()
Add missing constants to
stat
andkill _stat
(issue 3073)Fix argument handling in
select.poll().poll()
Raise
SyntaxError
instead ofDeprecationWarning
when treating invalid escapes in bytes as errors (CPython issue 28691)Handle locale in time.strftime(). (issue 3079)
Fix an issue when calling
PyFrame.fset_f_lineno
(issue 3066)
Python 3.6 c-API¶
Add
PyStructSequence_InitType2
,Py_RETURN_NOTIMPLEMENTED
,PyGILState_Check
,PyUnicode_AsUCS4
,PyUnicode_AsUCS4Copy
,PyErr_SetFromWindowsErr
,Sync the various
Py**Flag
constants with CPythonAllow
PyTypeObject
withtp_doc==""
(issue 3055)Update
pymacro.h
to match CPython 3.6.9Support more datetime C functions and definitions