| 1 |
========================= |
| 2 |
What's new in PyPy2.7 5.4 |
| 3 |
========================= |
| 4 |
|
| 5 |
.. this is a revision shortly after release-pypy2.7-v5.3 |
| 6 |
.. startrev: 873218a739f1 |
| 7 |
|
| 8 |
.. 418b05f95db5 |
| 9 |
|
| 10 |
Improve CPython compatibility for ``is``. Now code like ``if x is ():`` |
| 11 |
works the same way as it does on CPython. See https://doc.pypy.org/cpython_differences.html#object-identity-of-primitive-values-is-and-id . |
| 12 |
|
| 13 |
.. pull request #455 |
| 14 |
|
| 15 |
Add sys.{get,set}dlopenflags, for cpyext extensions. |
| 16 |
|
| 17 |
.. branch: fix-gen-dfa |
| 18 |
|
| 19 |
Resolves an issue with the generator script to build the dfa for Python syntax. |
| 20 |
|
| 21 |
.. branch: z196-support |
| 22 |
|
| 23 |
Fixes a critical issue in the register allocator and extends support on s390x. |
| 24 |
PyPy runs and translates on the s390x revisions z10 (released February 2008, experimental) |
| 25 |
and z196 (released August 2010) in addition to zEC12 and z13. |
| 26 |
To target e.g. z196 on a zEC12 machine supply CFLAGS="-march=z196" to your shell environment. |
| 27 |
|
| 28 |
.. branch: s390x-5.3-catchup |
| 29 |
|
| 30 |
Implement the backend related changes for s390x. |
| 31 |
|
| 32 |
.. branch: incminimark-ll_assert |
| 33 |
.. branch: vmprof-openbsd |
| 34 |
|
| 35 |
.. branch: testing-cleanup |
| 36 |
|
| 37 |
Simplify handling of interp-level tests and make it more forward- |
| 38 |
compatible. |
| 39 |
|
| 40 |
.. branch: pyfile-tell |
| 41 |
|
| 42 |
Sync w_file with the c-level FILE* before returning FILE* in PyFile_AsFile |
| 43 |
|
| 44 |
.. branch: rw-PyString_AS_STRING |
| 45 |
|
| 46 |
Allow rw access to the char* returned from PyString_AS_STRING, also refactor |
| 47 |
PyStringObject to look like cpython's and allow subclassing PyString_Type and |
| 48 |
PyUnicode_Type |
| 49 |
|
| 50 |
.. branch: save_socket_errno |
| 51 |
|
| 52 |
Bug fix: if ``socket.socket()`` failed, the ``socket.error`` did not show |
| 53 |
the errno of the failing system call, but instead some random previous |
| 54 |
errno. |
| 55 |
|
| 56 |
.. branch: PyTuple_Type-subclass |
| 57 |
|
| 58 |
Refactor PyTupleObject to look like cpython's and allow subclassing |
| 59 |
PyTuple_Type |
| 60 |
|
| 61 |
.. branch: call-via-pyobj |
| 62 |
|
| 63 |
Use offsets from PyTypeObject to find actual c function to call rather than |
| 64 |
fixed functions, allows function override after PyType_Ready is called |
| 65 |
|
| 66 |
.. branch: issue2335 |
| 67 |
|
| 68 |
Avoid exhausting the stack in the JIT due to successive guard |
| 69 |
failures in the same Python function ending up as successive levels of |
| 70 |
RPython functions, while at app-level the traceback is very short |
| 71 |
|
| 72 |
.. branch: use-madv-free |
| 73 |
|
| 74 |
Try harder to memory to the OS. See e.g. issue #2336. Note that it does |
| 75 |
not show up as a reduction of the VIRT column in ``top``, and the RES |
| 76 |
column might also not show the reduction, particularly on Linux >= 4.5 or |
| 77 |
on OS/X: it uses MADV_FREE, which only marks the pages as returnable to |
| 78 |
the OS if the memory is low. |
| 79 |
|
| 80 |
.. branch: cpyext-slotdefs2 |
| 81 |
|
| 82 |
Fill in more slots when creating a PyTypeObject from a W_TypeObject |
| 83 |
More slots are still TBD, like tp_print and richcmp |
| 84 |
|
| 85 |
.. branch: json-surrogates |
| 86 |
|
| 87 |
Align json module decode with the cpython's impl, fixes issue 2345 |
| 88 |
|
| 89 |
.. branch: issue2343 |
| 90 |
|
| 91 |
Copy CPython's logic more closely for handling of ``__instancecheck__()`` |
| 92 |
and ``__subclasscheck__()``. Fixes issue 2343. |
| 93 |
|
| 94 |
.. branch: msvcrt-cffi |
| 95 |
|
| 96 |
Rewrite the Win32 dependencies of 'subprocess' to use cffi instead |
| 97 |
of ctypes. This avoids importing ctypes in many small programs and |
| 98 |
scripts, which in turn avoids enabling threads (because ctypes |
| 99 |
creates callbacks at import time, and callbacks need threads). |
| 100 |
|
| 101 |
.. branch: new-jit-log |
| 102 |
|
| 103 |
The new logging facility that integrates with and adds features to vmprof.com. |
| 104 |
|
| 105 |
.. branch: jitlog-32bit |
| 106 |
|
| 107 |
Resolve issues to use the new logging facility on a 32bit system |
| 108 |
|
| 109 |
.. branch: ep2016sprint |
| 110 |
|
| 111 |
Trying harder to make hash(-1) return -2, like it does on CPython |
| 112 |
|
| 113 |
.. branch: jitlog-exact-source-lines |
| 114 |
|
| 115 |
Log exact line positions in debug merge points. |
| 116 |
|
| 117 |
.. branch: null_byte_after_str |
| 118 |
|
| 119 |
Allocate all RPython strings with one extra byte, normally unused. |
| 120 |
It is used to hold a final zero in case we need some ``char *`` |
| 121 |
representation of the string, together with checks like ``not |
| 122 |
can_move()`` or object pinning. Main new thing that this allows: |
| 123 |
``ffi.from_buffer(string)`` in CFFI. Additionally, and most |
| 124 |
importantly, CFFI calls that take directly a string as argument don't |
| 125 |
copy the string any more---this is like CFFI on CPython. |
| 126 |
|
| 127 |
.. branch: resource_warning |
| 128 |
|
| 129 |
Add a new command line option -X track-resources which will produce |
| 130 |
ResourceWarnings when the GC closes unclosed files and sockets. |
| 131 |
|
| 132 |
.. branch: cpyext-realloc |
| 133 |
|
| 134 |
Implement PyObject_Realloc |
| 135 |
|
| 136 |
.. branch: inline-blocks |
| 137 |
|
| 138 |
Improve a little bit the readability of the generated C code |
| 139 |
|
| 140 |
.. branch: improve-vmprof-testing |
| 141 |
|
| 142 |
Improved vmprof support: now tries hard to not miss any Python-level |
| 143 |
frame in the captured stacks, even if there is the metainterp or |
| 144 |
blackhole interp involved. Also fix the stacklet (greenlet) support. |
| 145 |
|
| 146 |
.. branch: py2-mappingproxy |
| 147 |
|
| 148 |
``type.__dict__`` now returns a ``dict_proxy`` object, like on CPython. |
| 149 |
Previously it returned what looked like a regular dict object (but it |
| 150 |
was already read-only). |
| 151 |
|
| 152 |
|
| 153 |
.. branch: const-fold-we-are-jitted |
| 154 |
|
| 155 |
Reduce the size of the generated C code by constant-folding ``we_are_jitted`` |
| 156 |
in non-jitcode. |
| 157 |
|
| 158 |
.. branch: memoryview-attributes |
| 159 |
|
| 160 |
Support for memoryview attributes (format, itemsize, ...). |
| 161 |
Extends the cpyext emulation layer. |
| 162 |
|
| 163 |
.. branch: redirect-assembler-jitlog |
| 164 |
|
| 165 |
Log more information to properly rebuild the redirected traces in jitviewer. |
| 166 |
|
| 167 |
.. branch: cpyext-subclass |
| 168 |
|
| 169 |
Copy Py_TPFLAGS_CHECKTYPES, Py_TPFLAGS_HAVE_INPLACEOPS when inheriting |