| 1 |
============ |
| 2 |
PyPy2.7 v5.3 |
| 3 |
============ |
| 4 |
|
| 5 |
We have released PyPy2.7 v5.3, about six weeks after PyPy 5.1 and a week after |
| 6 |
`PyPy3.3 v5.2 alpha 1`_, the first PyPy release targeting 3.3 |
| 7 |
compatibility. This new PyPy2.7 release includes further improvements for the |
| 8 |
CAPI compatibility layer which we call cpyext. In addition to complete support |
| 9 |
for lxml, we now pass most (more than 90%) of the upstream numpy test suite, |
| 10 |
and much of SciPy is supported as well. |
| 11 |
|
| 12 |
We updated cffi_ to version 1.7 (small changes, documented here_). |
| 13 |
|
| 14 |
.. _`PyPy3.3 v5.2 alpha 1`: https://morepypy.blogspot.com/2016/05/pypy33-v52-alpha-1-released.html |
| 15 |
.. _cffi: https://cffi.readthedocs.org |
| 16 |
.. _here: https://cffi.readthedocs.io/en/latest/whatsnew.html |
| 17 |
|
| 18 |
You can download the PyPy2.7 v5.3 release here: |
| 19 |
|
| 20 |
https://pypy.org/download.html |
| 21 |
|
| 22 |
We would like to thank our donors for the continued support of the PyPy |
| 23 |
project. |
| 24 |
|
| 25 |
We would also like to thank our contributors and |
| 26 |
encourage new people to join the project. PyPy has many |
| 27 |
layers and we need help with all of them: `PyPy`_ and `RPython`_ documentation |
| 28 |
improvements, tweaking popular `modules`_ to run on pypy, or general `help`_ |
| 29 |
with making RPython's JIT even better. |
| 30 |
|
| 31 |
.. _`PyPy`: https://doc.pypy.org |
| 32 |
.. _`RPython`: https://rpython.readthedocs.org |
| 33 |
.. _`modules`: https://doc.pypy.org/project-ideas.html#make-more-python-modules-pypy-friendly |
| 34 |
.. _`help`: https://doc.pypy.org/project-ideas.html |
| 35 |
|
| 36 |
What is PyPy? |
| 37 |
============= |
| 38 |
|
| 39 |
PyPy is a very compliant Python interpreter, almost a drop-in replacement for |
| 40 |
CPython 2.7. It's fast (`PyPy and CPython 2.7.x`_ performance comparison) |
| 41 |
due to its integrated tracing JIT compiler. |
| 42 |
|
| 43 |
We also welcome developers of other `dynamic languages`_ to see what RPython |
| 44 |
can do for them. |
| 45 |
|
| 46 |
This release supports: |
| 47 |
|
| 48 |
* **x86** machines on most common operating systems |
| 49 |
(Linux 32/64 bits, Mac OS X 64 bits, Windows 32 bits, OpenBSD, FreeBSD) |
| 50 |
|
| 51 |
* newer **ARM** hardware (ARMv6 or ARMv7, with VFPv3) running Linux, |
| 52 |
|
| 53 |
* big- and little-endian variants of **PPC64** running Linux, |
| 54 |
|
| 55 |
* **s390x** running Linux |
| 56 |
|
| 57 |
.. _`PyPy and CPython 2.7.x`: https://speed.pypy.org |
| 58 |
.. _`dynamic languages`: https://pypyjs.org |
| 59 |
|
| 60 |
Other Highlights (since 5.1 released in April 2016) |
| 61 |
========================================================= |
| 62 |
|
| 63 |
* New features: |
| 64 |
|
| 65 |
* Merge a major expansion of the C-API support in cpyext, here are some of |
| 66 |
the highlights: |
| 67 |
|
| 68 |
- allow c-snippet tests to be run with -A so we can verify we are compatible |
| 69 |
- fix many edge cases exposed by fixing tests to run with -A |
| 70 |
- issequence() logic matches cpython |
| 71 |
- make PyStringObject and PyUnicodeObject field names compatible with cpython |
| 72 |
- add prelminary support for PyDateTime_* |
| 73 |
- support PyComplexObject, PyFloatObject, PyDict_Merge, PyDictProxy, |
| 74 |
PyMemoryView_*, _Py_HashDouble, PyFile_AsFile, PyFile_FromFile, |
| 75 |
PyAnySet_CheckExact, PyUnicode_Concat, PyDateTime_TZInfo |
| 76 |
- improve support for PyGILState_Ensure, PyGILState_Release, and thread |
| 77 |
primitives, also find a case where CPython will allow thread creation |
| 78 |
before PyEval_InitThreads is run, disallow on PyPy |
| 79 |
- create a PyObject-specific list strategy |
| 80 |
- rewrite slot assignment for typeobjects |
| 81 |
- improve tracking of PyObject to rpython object mapping |
| 82 |
- support tp_as_{number, sequence, mapping, buffer} slots |
| 83 |
- support ByteArrayObject via the new resizable_list_supporting_raw_ptr |
| 84 |
- implement PyList_SET_ITEM with CPython's behavior, instead of SetItem's |
| 85 |
- fix the signature of PyUFunc_FromFuncAndDataAndSignature |
| 86 |
- implement many PyWhatever_FOO() as a macro taking a `void *` |
| 87 |
|
| 88 |
* CPyExt tweak: instead of "GIL not held when a CPython C extension module |
| 89 |
calls PyXxx", we now silently acquire/release the GIL. Helps with |
| 90 |
CPython C extension modules that call some PyXxx() functions without |
| 91 |
holding the GIL (arguably, they are theoretically buggy). |
| 92 |
|
| 93 |
* Add rgc.FinalizerQueue, documented in pypy/doc/discussion/finalizer-order.rst. |
| 94 |
It is a more flexible way to make RPython finalizers. Use this mechanism to |
| 95 |
clean up handling of ``__del__`` methods, fixing issue #2287 |
| 96 |
|
| 97 |
* Generalize cpyext old-style buffers to more than just str/buffer, add |
| 98 |
support for mmap |
| 99 |
|
| 100 |
* Support command line -v to trace import statements |
| 101 |
|
| 102 |
* Add rposix functions for PyPy3.3 support |
| 103 |
|
| 104 |
* Give super an __init__ and a simple __new__ for CPython compatibility |
| 105 |
|
| 106 |
* Revive traceviewer, a tool to use pygame to view traces |
| 107 |
|
| 108 |
* Bug Fixes |
| 109 |
|
| 110 |
* Fix issue #2277: only special-case two exact lists in zip(), not list |
| 111 |
subclasses, because an overridden __iter__() should be called (probably) |
| 112 |
|
| 113 |
* Fix issue #2226: Another tweak in the incremental GC- this should ensure |
| 114 |
that progress in the major GC occurs quickly enough in all cases. |
| 115 |
|
| 116 |
* Clarify and refactor documentation on https://doc.pypy.org |
| 117 |
|
| 118 |
* Use "must be unicode, not %T" in unicodedata TypeErrors. |
| 119 |
|
| 120 |
* Manually reset sys.settrace() and sys.setprofile() when we're done running. |
| 121 |
This is not exactly what CPython does, but if we get an exception, unlike |
| 122 |
CPython, we call functions from the 'traceback' module, and these would |
| 123 |
call more the trace/profile function. That's unexpected and can lead |
| 124 |
to more crashes at this point. |
| 125 |
|
| 126 |
* Use the appropriate tp_dealloc on a subclass of a builtin type, and call |
| 127 |
tp_new for a python-sublcass of a C-API type |
| 128 |
|
| 129 |
* Fix for issue #2285 - rare vmprof segfaults on OS/X |
| 130 |
|
| 131 |
* Fixed issue #2172 - where a test specified an invalid parameter to mmap on powerpc |
| 132 |
|
| 133 |
* Fix issue #2311 - grab the `__future__` flags imported in the main script, in |
| 134 |
`-c`, or in `PYTHON_STARTUP`, and expose them to the `-i` console |
| 135 |
|
| 136 |
* Issues reported with our previous release were resolved_ after reports from users on |
| 137 |
our issue tracker at https://bitbucket.org/pypy/pypy/issues or on IRC at |
| 138 |
#pypy |
| 139 |
|
| 140 |
* Numpy_: |
| 141 |
|
| 142 |
* Implement ufunc.outer on numpypy |
| 143 |
|
| 144 |
* Move PyPy-specific numpy headers to a subdirectory (also changed `the repo`_ |
| 145 |
accordingly) |
| 146 |
|
| 147 |
* Performance improvements: |
| 148 |
|
| 149 |
* Use bitstrings to compress lists of descriptors that are attached to an |
| 150 |
EffectInfo |
| 151 |
|
| 152 |
* Remove most of the _ovf, _zer and _val operations from RPython. Kills |
| 153 |
quite some code internally, and allows the JIT to do better |
| 154 |
optimizations: for example, app-level code like ``x / 2`` or ``x % 2`` |
| 155 |
can now be turned into ``x >> 1`` or ``x & 1``, even if x is possibly |
| 156 |
negative. |
| 157 |
|
| 158 |
* Copy CPython's 'optimization': ignore __iter__ etc. for `f(**dict_subclass())` |
| 159 |
|
| 160 |
* Use the __builtin_add_overflow built-ins if they are available |
| 161 |
|
| 162 |
* Rework the way registers are moved/spilled in before_call() |
| 163 |
|
| 164 |
* Internal refactorings: |
| 165 |
|
| 166 |
* Refactor code to better support Python3-compatible syntax |
| 167 |
|
| 168 |
* Document and refactor OperationError -> oefmt |
| 169 |
|
| 170 |
* Reduce the size of generated C sources during translation by |
| 171 |
eliminating many many unused struct declarations (Issue #2281) |
| 172 |
|
| 173 |
* Remove a number of translation-time options that were not tested and |
| 174 |
never used. Also fix a performance bug in the method cache |
| 175 |
|
| 176 |
* Reduce the size of generated code by using the same function objects in |
| 177 |
all generated subclasses |
| 178 |
|
| 179 |
* Share cpyext Py* function wrappers according to the signature, shrinking the |
| 180 |
translated libpypy.so by about 10% (measured without the JIT) |
| 181 |
|
| 182 |
* Compile c snippets with -Werror, and fix warnings it exposed |
| 183 |
|
| 184 |
.. _resolved: https://doc.pypy.org/whatsnew-5.3.0.html |
| 185 |
.. _Numpy: https://bitbucket.org/pypy/numpy |
| 186 |
.. _`the repo`: https://bitbucket.org/pypy/numpy |
| 187 |
|
| 188 |
Please update, and continue to help us make PyPy better. |
| 189 |
|
| 190 |
Cheers |
| 191 |
|
| 192 |
The PyPy Team |
| 193 |
|