| 1 |
===================================== |
| 2 |
PyPy2.7 and PyPy3.5 v5.8 dual release |
| 3 |
===================================== |
| 4 |
|
| 5 |
The PyPy team is proud to release both PyPy2.7 v5.8 (an interpreter supporting |
| 6 |
Python 2.7 syntax), and a beta-quality PyPy3.5 v5.8 (an interpreter for Python |
| 7 |
3.5 syntax). The two releases are both based on much the same codebase, thus |
| 8 |
the dual release. Note that PyPy3.5 supports Linux 64bit only for now. |
| 9 |
|
| 10 |
This new PyPy2.7 release includes the upstream stdlib version 2.7.13, and |
| 11 |
PyPy3.5 includes the upstream stdlib version 3.5.3. |
| 12 |
|
| 13 |
We fixed critical bugs in the shadowstack_ rootfinder garbage collector |
| 14 |
strategy that crashed multithreaded programs and very rarely showed up |
| 15 |
even in single threaded programs. |
| 16 |
|
| 17 |
We added native PyPy support to profile frames in the vmprof_ statistical |
| 18 |
profiler. |
| 19 |
|
| 20 |
The ``struct`` module functions ``pack*`` and ``unpack*`` are now much faster, |
| 21 |
especially on raw buffers and bytearrays. Microbenchmarks show a 2x to 10x |
| 22 |
speedup. Thanks to `Gambit Research`_ for sponsoring this work. |
| 23 |
|
| 24 |
This release adds (but disables by default) link-time optimization and |
| 25 |
`profile guided optimization`_ of the base interpreter, which may make |
| 26 |
unjitted code run faster. To use these, translate with appropriate |
| 27 |
`options`_. Be aware of `issues with gcc toolchains`_, though. |
| 28 |
|
| 29 |
Please let us know if your use case is slow, we have ideas how to make things |
| 30 |
faster but need real-world examples (not micro-benchmarks) of problematic code. |
| 31 |
|
| 32 |
Work sponsored by a Mozilla grant_ continues on PyPy3.5; numerous fixes from |
| 33 |
CPython were ported to PyPy and PEP 489 was fully implemented. Of course the |
| 34 |
bug fixes and performance enhancements mentioned above are part of both PyPy |
| 35 |
2.7 and PyPy 3.5. |
| 36 |
|
| 37 |
CFFI_, which is part of the PyPy release, has been updated to an unreleased 1.10.1, |
| 38 |
improving an already great package for interfacing with C. |
| 39 |
|
| 40 |
As always, this release fixed many other issues and bugs raised by the |
| 41 |
growing community of PyPy users. We strongly recommend updating. |
| 42 |
|
| 43 |
You can download the v5.8 releases here: |
| 44 |
|
| 45 |
https://pypy.org/download.html |
| 46 |
|
| 47 |
We would like to thank our donors for the continued support of the PyPy |
| 48 |
project. |
| 49 |
|
| 50 |
We would also like to thank our contributors and |
| 51 |
encourage new people to join the project. PyPy has many |
| 52 |
layers and we need help with all of them: `PyPy`_ and `RPython`_ documentation |
| 53 |
improvements, tweaking popular `modules`_ to run on pypy, or general `help`_ |
| 54 |
with making RPython's JIT even better. |
| 55 |
|
| 56 |
.. _`profile guided optimization`: https://pythonfiles.wordpress.com/2017/05/12/enabling-profile-guided-optimizations-for-pypy |
| 57 |
.. _shadowstack: config/translation.gcrootfinder.html |
| 58 |
.. _vmprof: https://vmprof.readthedocs.io |
| 59 |
.. _`issues with gcc toolchains`: https://bitbucket.org/pypy/pypy/issues/2572/link-time-optimization-lto-disabled |
| 60 |
.. _CFFI: https://cffi.readthedocs.io/en/latest/whatsnew.html |
| 61 |
.. _grant: https://morepypy.blogspot.com/2016/08/pypy-gets-funding-from-mozilla-for.html |
| 62 |
.. _`PyPy`: index.html |
| 63 |
.. _`RPython`: https://rpython.readthedocs.org |
| 64 |
.. _`modules`: project-ideas.html#make-more-python-modules-pypy-friendly |
| 65 |
.. _`help`: project-ideas.html |
| 66 |
.. _`options`: config/commandline.html#general-translation-options |
| 67 |
.. _`these benchmarks show`: https://morepypy.blogspot.com/2017/03/async-http-benchmarks-on-pypy3.html |
| 68 |
.. _`Gambit Research`: https://gambitresearch.com |
| 69 |
|
| 70 |
What is PyPy? |
| 71 |
============= |
| 72 |
|
| 73 |
PyPy is a very compliant Python interpreter, almost a drop-in replacement for |
| 74 |
CPython 2.7 and CPython 3.5. It's fast (`PyPy and CPython 2.7.x`_ performance comparison) |
| 75 |
due to its integrated tracing JIT compiler. |
| 76 |
|
| 77 |
We also welcome developers of other `dynamic languages`_ to see what RPython |
| 78 |
can do for them. |
| 79 |
|
| 80 |
The PyPy 2.7 release supports: |
| 81 |
|
| 82 |
* **x86** machines on most common operating systems |
| 83 |
(Linux 32/64 bits, Mac OS X 64 bits, Windows 32 bits, OpenBSD, FreeBSD) |
| 84 |
|
| 85 |
* newer **ARM** hardware (ARMv6 or ARMv7, with VFPv3) running Linux, |
| 86 |
|
| 87 |
* big- and little-endian variants of **PPC64** running Linux, |
| 88 |
|
| 89 |
* **s390x** running Linux |
| 90 |
|
| 91 |
.. _`PyPy and CPython 2.7.x`: https://speed.pypy.org |
| 92 |
.. _`dynamic languages`: https://rpython.readthedocs.io/en/latest/examples.html |
| 93 |
|
| 94 |
Highlights of the PyPy2.7, cpyext, and RPython changes (since 5.7 released March, 2017) |
| 95 |
======================================================================================= |
| 96 |
|
| 97 |
See also issues that were resolved_ |
| 98 |
|
| 99 |
Note that these are also merged into PyPy 3.5 |
| 100 |
|
| 101 |
* New features and cleanups |
| 102 |
|
| 103 |
* Implement PyModule_New, Py_GetRecursionLimit, Py_SetRecursionLimit, |
| 104 |
Py_EnterRecursiveCall, Py_LeaveRecursiveCall, populate tp_descr_get and |
| 105 |
tp_descr_set slots, |
| 106 |
add conversions of ``__len__``, ``__setitem__``, ``__delitem__`` to |
| 107 |
appropriate C-API slots |
| 108 |
* Fix for multiple inheritance in app-level for C-API defined classes |
| 109 |
* Revert a change that removed tp_getattr (Part of the 5.7.1 bugfix release) |
| 110 |
* Document more differences with CPython here_ |
| 111 |
* Add native PyPy support to profile frames in vmprof |
| 112 |
* Fix an issue with Exception order on failed import |
| 113 |
* Fix for a corner case of __future__ imports |
| 114 |
* Update packaged Windows zlib, sqlite, expat and OpenSSL to versions used |
| 115 |
by CPython |
| 116 |
* Allow windows builds to use ``jom.exe`` for compiling in parallel |
| 117 |
* Rewrite ``itertools.groupby()``, following CPython |
| 118 |
* Backport changes from PyPy 3.5 to minimize the code differences |
| 119 |
* Improve support for BSD using patches contributed by downstream |
| 120 |
* Support profile-guided optimization, enabled with --profopt, , and |
| 121 |
specify training data ``profoptpath`` |
| 122 |
|
| 123 |
* Bug Fixes |
| 124 |
|
| 125 |
* Correctly handle dict.pop where the popping key is not the same type as the |
| 126 |
dict's and pop is called with a default (Part of the 5.7.1 bugfix release) |
| 127 |
* Improve our file's universal newline .readline implementation for |
| 128 |
``\n``, ``\r`` confusion |
| 129 |
* Tweak issue where ctype array ``_base`` was set on empty arrays, now it |
| 130 |
is closer to the implementation in CPython |
| 131 |
* Fix critical bugs in shadowstack that crashed multithreaded programs and |
| 132 |
very rarely showed up even in single threaded programs |
| 133 |
* Remove flaky fastpath function call from ctypes |
| 134 |
* Support passing a buffersize of 0 to socket.getsockopt |
| 135 |
* Avoid hash() returning -1 in cpyext |
| 136 |
|
| 137 |
* Performance improvements: |
| 138 |
|
| 139 |
* Tweaks made to improve performance by reducing the number of guards |
| 140 |
inserted in jitted code, based on feedback from users |
| 141 |
* Add garbage collector memory pressure to some c-level allocations |
| 142 |
* Speed up struck.pack, struck.pack_into |
| 143 |
* Performance tweaks to round(x, n) for the case n == 0 |
| 144 |
* Improve zipfile performance by not doing repeated string concatenation |
| 145 |
|
| 146 |
* RPython improvements |
| 147 |
|
| 148 |
* Improve the default shadowstack garbage collector, fixing a crash with |
| 149 |
multithreaded code and other issues |
| 150 |
* Make sure lstrip consumes the entire string |
| 151 |
* Support posix_fallocate and posix_fadvise, expose them on PyPy3.5 |
| 152 |
* Test and fix for int_and() propagating wrong bounds |
| 153 |
* Improve the generated machine code by tracking the (constant) value of |
| 154 |
r11 across instructions. This lets us avoid reloading r11 with another |
| 155 |
(apparently slowish) "movabs" instruction, replacing it with either |
| 156 |
nothing or a cheaper variant. |
| 157 |
* Performance tweaks in the x86 JIT-generated machine code: rarely taken |
| 158 |
blocks are moved off-line. Also, the temporary register used to contain |
| 159 |
large constants is reused across instructions. This helps CPUs branch |
| 160 |
predictor |
| 161 |
* Refactor rpython.rtyper.controllerentry to use use ``@specialize`` instead |
| 162 |
of ``._annspecialcase_`` |
| 163 |
* Refactor handling of buffers and memoryviews. Memoryviews will now be |
| 164 |
accepted in a few more places, e.g. in compile() |
| 165 |
|
| 166 |
|
| 167 |
.. _here: cpython_differences.html |
| 168 |
|
| 169 |
Highlights of the PyPy3.5 release (since 5.7 beta released March 2017) |
| 170 |
====================================================================== |
| 171 |
|
| 172 |
* New features |
| 173 |
|
| 174 |
* Implement main part of PEP 489 (multi-phase extension module initialization) |
| 175 |
* Add docstrings to various modules and functions |
| 176 |
* Adapt many CPython bug/feature fixes from CPython 3.5 to PyPy3.5 |
| 177 |
* Translation succeeds on Mac OS X, unfortunately our buildbot slave cannot |
| 178 |
be updated to the proper development versions of OpenSSL to properly |
| 179 |
package a release. |
| 180 |
* Implement `` _SSLSocket.server_side`` |
| 181 |
* Do not silently ignore ``_swappedbytes_`` in ctypes. We now raise a |
| 182 |
``NotImplementedError`` |
| 183 |
* Implement and expose ``msvcrt.SetErrorMode`` |
| 184 |
* Implement ``PyModule_GetState`` |
| 185 |
|
| 186 |
* Bug Fixes |
| 187 |
|
| 188 |
* Fix inconsistencies in the xml.etree.ElementTree.Element class, which on |
| 189 |
CPython is hidden by the C version from '_elementree'. |
| 190 |
* OSError(None,None) is different from OSError() |
| 191 |
* Get closer to supporting 32 bit windows, translation now succeeds and most |
| 192 |
lib-python/3/test runs |
| 193 |
* Call ``sys.__interactivehook__`` at startup |
| 194 |
* Let ``OrderedDict.__init__`` behave like CPython wrt. subclasses |
| 195 |
overriding ``__setitem__`` |
| 196 |
|
| 197 |
* Performance improvements: |
| 198 |
|
| 199 |
* Use "<python> -m test" to run the CPython test suite, as documented by CPython, |
| 200 |
instead of our outdated regrverbose.py script |
| 201 |
* Change _cffi_src/openssl/callbacks.py to stop relying on the CPython C API. |
| 202 |
* Avoid importing the full locale module during _io initialization, |
| 203 |
CPython change fbbf8b160e8d |
| 204 |
* Avoid freezing many app-level modules at translation, avoid importing many |
| 205 |
modules at startup |
| 206 |
* Refactor buffers, which allows an optimization for |
| 207 |
``bytearray()[:n].tobytes()`` |
| 208 |
|
| 209 |
* The following features of Python 3.5 are not implemented yet in PyPy: |
| 210 |
|
| 211 |
* PEP 442: Safe object finalization |
| 212 |
|
| 213 |
.. _resolved: whatsnew-pypy2-5.8.0.html |
| 214 |
|
| 215 |
Please update, and continue to help us make PyPy better. |
| 216 |
|
| 217 |
Cheers |