PyPy Changelog

What's new in PyPy 2.6.0

Jun 2, 2015
  • ssue2005: ignore errors on closing random file handles while importing a module (cpython compatibility)
  • issue2013: added constants to _ssl for TLS 1.1 and 1.2
  • issue2014: Add PyLong_FromUnicode to cpyext.
  • issue2017: On non-Linux-x86 platforms, reduced the memory impact of creating a lot of greenlets/tasklets. Particularly useful on Win32 and on ARM, where you used to get a MemoryError after only 2500-5000 greenlets (the 32-bit address space is exhausted).
  • Update gdb_pypy for python3 (gdb comatability)
  • Merged rstrategies into rpython which provides a library for Storage Strategies
  • Support unicode strings in numpy.dtype creation i.e. np.dtype(u’int64’)
  • Various rpython cleanups for vmprof support
  • issue2019: Fix isspace as called by rpython unicode.strip()
  • issue2023: In the cpyext ‘Concrete Object Layer’ API, don’t call methods on the object (which can be overriden), but directly on the concrete base type.
  • issue2029: Hide the default_factory attribute in a dict
  • issue2027: Better document pyinteractive and add –withmod-time
  • branch gc-incminimark-pinning-improve: Object Pinning is now used in bz2 and rzlib (therefore also affects Python’s zlib). In case the data to compress/decompress is inside the nursery (incminimark) it no longer needs to create a non-moving copy of it. This saves one malloc and copying the data. Additionally a new GC environment variable is introduced (PYPY_GC_MAX_PINNED) primarily for debugging purposes.
  • branch refactor-pycall: Make *-unpacking in RPython function calls completely equivalent to passing the tuple’s elements as arguments. In other words, f(*(a, b)) now behaves exactly like f(a, b).
  • branch issue2018: Allow prebuilt rpython dict with function values
  • branch object-dtype2: Extend numpy dtypes to allow using objects with associated garbage collection hook
  • branch vmprof2: Add backend support for vmprof - a lightweight statistical profiler - to linux64, see client at https://vmprof.readthedocs.org
  • branch jit_hint_docs: Add more detail to @jit.elidable and @jit.promote in rpython/rlib/jit.py
  • branch remove_frame-debug-attrs: Remove the debug attributes from frames only used for tracing and replace them with a debug object that is created on-demand
  • branch can_cast: Implement np.can_cast, np.min_scalar_type and missing dtype comparison operations.
  • branch numpy-fixes: Fix some error related to object dtype, non-contiguous arrays, inplement parts of __array_interface__, __array_priority__, __array_wrap__
  • branch cells-local-stack: Unify the PyFrame.cells and Pyframe.locals_stack_w lists, making frame objects 1 or 3 words smaller.
  • branch pythonoptimize-env Implement PYTHONOPTIMIZE environment variable, fixing issue #2044
  • branch numpy-flags Finish implementation of ndarray.flags, including str() and repr()
  • branch cffi-1.0 PyPy now includes CFFI 1.0.
  • branch pypyw PyPy on windows provides a non-console pypyw.exe as well as pypy.exe. Similar to pythonw.exe, any use of stdout, stderr without redirection will crash.
  • branch fold-arith-ops remove multiple adds on add chains (“1 + 1 + 1 + ...”)
  • branch fix-result-types: * Refactor dtype casting and promotion rules for consistency and compatibility with CNumPy. * Refactor ufunc creation. * Implement np.promote_types().

New in PyPy 2.5.1 (Mar 31, 2015)

  • The past months have seen pypy mature and grow, as rpython becomes the goto solution for writing fast dynamic language interpreters. Our separation of Rpython and the python interpreter PyPy is now much clearer in the PyPy documentation and we now have seperate RPython documentation. Tell us what still isn’t clear, or even better help us improve the documentation.
  • We merged version 2.7.9 of python’s stdlib. From the python release notice:
  • The entirety of Python 3.4’s ssl module has been backported. See PEP 466 for justification.
  • HTTPS certificate validation using the system’s certificate store is now enabled by default. See PEP 476 for details.
  • SSLv3 has been disabled by default in httplib and its reverse dependencies due to the POODLE attack.
  • The ensurepip module has been backported, which provides the pip package manager in every Python 2.7 installation. See PEP 477.
  • The garbage collector now ignores parts of the stack which did not change since the last collection, another performance boost
  • errno and LastError are saved around cffi calls so things like pdb will not overwrite it
  • We continue to asymptotically approach a score of 7 times faster than cpython on our benchmark suite, we now rank 6.98 on latest runs
  • Issues reported with our previous release were resolved after reports from users on our issue tracker at https://bitbucket.org/pypy/pypy/issues or on IRC at #pypy.

New in PyPy 2.5.0 (Mar 31, 2015)

  • The past months have seen pypy mature and grow, as rpython becomes the goto solution for writing fast dynamic language interpreters. Our separation of rpython and the python interpreter PyPy is now much clearer in the PyPy documentation and we now have seperate RPython documentation.
  • We have improved warmup time as well as jitted code performance: more than 10% compared to pypy-2.4.0, due to internal cleanup and gc nursery improvements. We no longer zero-out memory allocated in the gc nursery by default, work that was started during a GSoC.
  • Passing objects between C and PyPy has been improved. We are now able to pass raw pointers to C (without copying) using pinning. This improves I/O; benchmarks that use networking intensively improved by about 50%. File() operations still need some refactoring but are already showing a 20% improvement on our benchmarks. Let us know if you see similar improvements.
  • Our integrated numpy support gained much of the GenericUfunc api in order to support the lapack/blas linalg module of numpy. This dovetails with work in the pypy/numpy repository to support linalg both through the (slower) cpyext capi interface and also via (the faster) pure python cffi interface, using an extended frompyfunc() api. We will soon post a seperate blog post specifically about linalg and PyPy.
  • Dictionaries are now ordered by default, see the blog post
  • Our nightly translations use –shared by default, including on OS/X and linux
  • We now more carefully handle errno (and GetLastError, WSAGetLastError) tying the handlers as close as possible to the external function call, in non-jitted as well as jitted code.
  • Issues reported with our previous release were resolved after reports from users on our issue tracker at https://bitbucket.org/pypy/pypy/issues or on IRC at #pypy.

New in PyPy 2.4.0 (Sep 22, 2014)

  • Reduced internal copying of bytearray operations
  • Tweak the internal structure of StringBuilder to speed up large string handling, which becomes advantageous on large programs at the cost of slightly slower small benchmark type programs.
  • Boost performance of thread-local variables in both unjitted and jitted code, this mostly affects errno handling on linux, which makes external calls faster.
  • Move to a mixed polling and mutex GIL model that make mutlithreaded jitted code run much faster
  • Optimize errno handling in linux (x86 and x86-64 only)
  • Remove ctypes pythonapi and ctypes.PyDLL, which never worked on PyPy
  • Fix performance regression on ufunc(, ) in numpy
  • Classes in the ast module are now distinct from structures used by the compiler, which simplifies and speeds up translation of our source code to the PyPy binary interpreter
  • Upgrade stdlib from 2.7.5 to 2.7.8
  • Win32 now links statically to zlib, expat, bzip, and openssl-1.0.1i. No more missing DLLs
  • Many issues were resolved since the 2.3.1 release on June 8

New in PyPy 2.3 (May 9, 2014)

  • Bugfixes:
  • Many issues were cleaned up after being reported. Note that we consider performance slowdowns as bugs. Here is a summary of the user-facing changes; for more information see whats-new:
  • The ARM port no longer crashes on unaligned memory access to floats and doubles, and singlefloats are supported in the JIT.
  • Generators are faster since they now skip unnecessary cleanup
  • A first time contributor simplified JIT traces by adding integer bound propagation in indexing and logical operations.
  • Optimize consecutive dictionary lookups of the same key in a chain
  • Our extensive pre-translation test suite now runs nightly on more platforms
  • Fix issues with reimporting builtin modules
  • Fix an RPython bug with loop-unrolling that appeared in the HippyVM PHP port
  • Support for corner cases on objects with __int__ and __float__ methods
  • Fix multithreaded support for gethostbyname_ex and gethostbyaddr
  • Fix handling of tp_name for type objects
  • New Platforms and Features:
  • Support for OpenBSD
  • Code cleanup: we continue to prune out old and unused code, and to refactor large parts of the codebase. We have separated RPython from the PyPy python interpreter, and RPython is seeing use in other dynamic language projects.
  • Support for precompiled headers in the build process for MSVC
  • Tweak support of errno in cpyext (the PyPy implemenation of the capi)
  • NumPy:
  • NumPy support has been split into a builtin _numpy module and a fork of the NumPy code base adapted to PyPy
  • You need to install NumPy separately with a virtualenv.
  • NumPy support has been improved, many failures in indexing, dtypes, and scalars were corrected. We are slowly approaching our goal of passing the NumPy test suite. We still do not support object or unicode ndarrays.
  • Speed of iteration in dot() is now within 1.5x of the NumPy c implementation (without BLAS acceleration). Since the same array iterator is used throughout the _numpy module, speed increases should be apparent in all NumPy functionality.
  • Most of the core functionality of nditer has been implemented.
  • A cffi-based numpy.random module is available as a branch; it will be merged soon after this release.
  • Enhancements to the PyPy JIT were made to support virtualizing the raw_store/raw_load memory operations used in NumPy arrays. Further work remains here in virtualizing the alloc_raw_storage when possible. This will allow scalars to have storages but still be virtualized when possible in loops.

New in PyPy 2.2.1 (Nov 28, 2013)

  • This is a bugfix release. The most important bugs fixed are:
  • an issue in sockets’ reference counting emulation, showing up notably when using the ssl module and calling makefile().
  • Tkinter support on Windows.
  • If sys.maxunicode==65535 (on Windows and maybe OS/X), the json decoder incorrectly decoded surrogate pairs.
  • some FreeBSD fixes.

New in PyPy 2.2 (Nov 15, 2013)

  • This release targets version 2.7.3 of the Python language. This release main highlight is the introduction of the incremental garbage collector, sponsored by the Raspberry Pi Foundation.
  • This release also contains several bugfixes and performance improvements.

New in PyPy 2.1 (Aug 1, 2013)

  • JIT support for ARM, architecture versions 6 and 7, hard- and soft-float ABI
  • Stacklet support for ARM
  • Support for os.statvfs and os.fstatvfs on unix systems
  • Improved logging performance
  • Faster sets for objects
  • Interpreter improvements
  • During packaging, compile the CFFI based TK extension
  • Pickling of numpy arrays and dtypes
  • Subarrays for numpy
  • Bugfixes to numpy
  • Bugfixes to cffi and ctypes
  • Bugfixes to the x86 stacklet support

New in PyPy 2.1 Beta 2 (Jul 26, 2013)

  • Fixed issue 1533: fix an RPython-level OverflowError for space.float_w(w_big_long_number).
  • Fixed issue 1552: GreenletExit should inherit from BaseException.
  • Fixed issue 1537: numpypy __array_interface__
  • Fixed issue 1238: Writing to an SSL socket in pypy sometimes failed with a “bad write retry” message.
  • distutils: copy CPython’s implementation of customize_compiler, dont call split on environment variables, honour CFLAGS, CPPFLAGS, LDSHARED and LDFLAGS.
  • During packaging, compile the CFFI tk extension.

New in PyPy 2.1 Beta (Jul 11, 2013)

  • You can now open extra editor windows, that behave similar to the editor area in Edit mode. Open a new window with Window > Open in New Window or the same item in the editor views’ split menu
  • Experimental support for debugging with LLDB on Mac was added (configure the debugger of your kit to be LLDB and point it to your lldb binary)
  • There is a BlackBerry development environment setup wizard now, making it easier to get started with on-device development
  • Git version control integration got many new features, including support for interactive rebases
  • Git now uses a side-by-side diff viewer by default, you can change the default in the version control settings
  • An editor specific for Python was added, with highlighting and indentation, and a Python class wizard
  • Progress information moved to the bottom-right corner, with the option of only showing a summarized progress bar
  • C++ got more refactoring actions:
  • Moving function definitions from inline in the header to source
  • Assigning a method return value or ‘new’ expression to a local variable
  • Adding declarations and implementations for virtual methods from the superclass
  • Features that were added to Android support:
  • Graphical editor for manifest files
  • QML debugging and profiling on devices

New in PyPy 2.0.2 (May 21, 2013)

  • It fixes a crash in the JIT when calling external C functions (with ctypes/cffi) in a multithreaded context.

New in PyPy 2.0.1 (May 17, 2013)

  • The fixes are mainly about fatal errors or crashes in our stdlib.
  • fix an occasional crash in the JIT that ends in RPython Fatal error: NotImplementedError.
  • id(x) is now always a positive number (except on int/float/long/complex). This fixes an issue in _sqlite.py (mostly for 32-bit Linux).
  • fix crashes of callback-from-C-functions (with cffi) when used together with Stackless features, on asmgcc (i.e. Linux only). Now gevent should work better.
  • work around an eventlet issue with socket._decref_socketios().

New in PyPy 2.0 (May 10, 2013)

  • stackless is now supported including greenlets, which means eventlet and gevent should work (but read below about gevent)
  • PyPy now contains release 0.6 of cffi as a builtin module, which is preferred way of calling C from Python that works well on PyPy
  • Stackless including greenlets should work. For gevent, you need to check out pypycore and use the pypy-hacks branch of gevent.
  • cffi is now a module included with PyPy. (cffi also exists for CPython; the two versions should be fully compatible.) It is the preferred way of calling C from Python that works on PyPy.
  • Callbacks from C are now JITted, which means XML parsing is much faster.
  • A lot of speed improvements in various language corners, most of them small, but speeding up some particular corners a lot.
  • The JIT was refactored to emit machine code which manipulates a “frame” that lives on the heap rather than on the stack. This is what makes Stackless work, and it could bring another future speed-up (not done yet).
  • A lot of stability issues fixed.
  • Refactoring much of the numpypy array classes, which resulted in removal of lazy expression evaluation. On the other hand, we now have more complete dtype support and support more array attributes.

New in PyPy 2.0 Beta 2 (Apr 8, 2013)

  • JIT now supports stackless features, that is greenlets and stacklets. This means that JIT can now optimize the code that switches the context. It enables running `eventlet`_ and `gevent`_ on PyPy (although gevent requires some special support that’s not quite finished, read below).
  • This is the first PyPy release that includes `cffi`_ as a core library. Version 0.6 comes included in the PyPy library. cffi has seen a lot of adoption among library authors and we believe it’s the best way to wrap C libaries. You can see examples of cffi usage in `_curses.py`_ and `_sqlite3.py`_ in the PyPy source code.

New in PyPy 2.0 Beta 1 (Nov 22, 2012)

  • cffi is officially supported by PyPy. You can install it normally by using pip install cffi once you have installed PyPy and pip. The corresponding 0.4 version of cffi has been released.
  • ARM is now an officially supported processor architecture. PyPy now work on soft-float ARM/Linux builds. Currently ARM processors supporting the ARMv7 and later ISA that include a floating-point unit are supported.
  • This release contains the latest Python standard library 2.7.3 and is fully compatible with Python 2.7.3.
  • It does not however contain hash randomization, since the solution present in CPython is not solving the problem anyway. The reason can be found on the CPython issue tracker.
  • gc.get_referrers() is now faster.
  • Various numpy improvements. The list includes:
  • axis argument support in many places
  • full support for fancy indexing
  • complex128 and complex64 dtypes
  • JIT hooks are now a powerful tool to introspect the JITting process that PyPy performs.
  • **kwds usage is much faster in the typical scenario
  • operations on long objects are now as fast as in CPython (from roughly 2x slower)
  • We now have special strategies for dict/set/list which contain unicode strings, which means that now such collections will be both faster and more compact.