|Initial release||mid 2007|
|Type||Python interpreter and compiler toolchain|
PyPy (//) is an implementation of the Python programming language. PyPy often runs faster than the standard implementation CPython because PyPy uses a just-in-time compiler. Most Python code runs well on PyPy except for code that depends on CPython extensions, which either does not work or incurs some overhead when run in PyPy. Internally, PyPy uses a technique known as meta-tracing, which transforms an interpreter into a tracing just-in-time compiler. Since interpreters are usually easier to write than compilers, but run slower, this technique can make it easier to produce efficient implementations of programming languages. PyPy's meta-tracing toolchain is called RPython.
PyPy does not have full compatibility with more recent versions of the CPython ecosystem. While it claims compatibility with Python 2.7, 3.7, 3.8 and 3.9 ("a drop-in replacement for CPython"), it loses out on newer features and syntax in Python 3.10, such as syntax for pattern matching.
Details and motivation
PyPy aims to provide a common translation and support framework for producing implementations of dynamic languages, emphasizing a clean separation between language specification and implementation aspects. It also aims to provide a compliant, flexible and fast implementation of the Python programming language using the above framework to enable new advanced features without having to encode low-level details into it.
The PyPy interpreter itself is written in a restricted subset of Python called RPython (Restricted Python). RPython puts some constraints on the Python language such that a variable's type can be inferred at compile time.
It allows for pluggable garbage collectors, as well as optionally enabling Stackless Python features. Finally, it includes a just-in-time (JIT) generator that builds a just-in-time compiler into the interpreter, given a few annotations in the interpreter source code. The generated JIT compiler is a tracing JIT.
RPython is now also used to write non-Python language implementations, such as Pixie.
PyPy as of version 7.3.7 is compatible with three CPython versions: 2.7, 3.7 and 3.8. The first PyPy version compatible with CPython v3 is PyPy v2.3.1 (2014). The PyPy interpreter compatible with CPython v3 is also known as PyPy3.
PyPy has JIT compilation support on 32-bit/64-bit x86 and 32-bit/64-bit ARM processors. It is tested nightly on Windows, Linux, OpenBSD and Mac OS X. PyPy is able to run pure Python software that does not rely on implementation-specific features.
There is a compatibility layer for CPython C API extensions called CPyExt, but it is incomplete and experimental. The preferred way of interfacing with C shared libraries is through the built-in C foreign function interface (CFFI) or ctypes libraries.
PyPy was initially a research and development-oriented project. Reaching a mature state of development and an official 1.0 release in mid-2007, its next focus was on releasing a production-ready version with more CPython compatibility. Many of PyPy's changes have been made during coding sprints.
- In August 2008, PyPy was able to run some popular Python libraries like Pylons, Pyglet, Nevow and Django.
- On 12 March 2010, PyPy 1.2 was released, focusing on speed. It included a working, though not yet stable, just-in-time compiler.
- On 30 April 2011, PyPy version 1.5 was released, which reached compatibility with CPython 2.7.
- On 9 May 2013, PyPy 2.0 was released, which introduced alpha-quality support for JIT compilation on ARMv6 and ARMv7 JIT, and included CFFI in the standard library.
- On 20 June 2014, PyPy3 was declared stable and introduced compatibility with the more modern Python 3. It was released alongside PyPy 2.3.1 and bears the same version number.
- On 21 March 2017, the PyPy project released version 5.7 of both PyPy and PyPy3, with the latter introducing beta-quality support for Python 3.5.
- On 26 April 2018, version 6.0 was released, with support for Python 2.7 and 3.5 (still beta-quality on Windows).
- On 11 February 2019, version 7.0 was released, with support for Python 2.7 and 3.5.
- On 14 October 2019, version 7.2 was released, with support for Python 3.6.9.
- On 24 December 2019, version 7.3 was released, with support for Python 3.6.9.
- On 16 February 2020, the PyPy team announced the move of the source code hosting from Bitbucket to heptapod.net with the repositories of the CFFI (C Foreign Function Interface) project. A new logo and website design are also published. However, the author and the license of the new logo are unknown.
PyPy was funded by the European Union being a Specific Targeted Research Project between December 2004 and March 2007. In June 2008, PyPy announced funding being part of the Google Open Source programs and has agreed to focus on making PyPy more compatible with CPython. In 2009 Eurostars, a European Union funding agency specially focused on SMEs, accepted a proposal from PyPy project members titled "PYJIT – a fast and flexible toolkit for dynamic programming languages based on PyPy". Eurostars funding lasted until August 2011. At PyCon US 2011, the Python Software Foundation provided a $10,000 grant for PyPy to continue work on performance and compatibility with newer versions of the language. The port to ARM architecture was sponsored in part by the Raspberry Pi Foundation.
The PyPy project also accepts donations through its status blog pages. As of 2013, a variety of sub-projects had funding: Python 3 version compatibility, built-in optimized NumPy support for numerical calculations and software transactional memory support to allow better parallelism.
Note: This topic belongs to "Free software " portal
- Bootstrapping (compilers)
- Partial evaluation
- Unladen Swallow
- "Interview Maciej Fijalkowski PyPy". 29 November 2015. https://decisionstats.com/2015/11/29/interview-maciej-fijalkowski-pypy/.
- "PyPy Speed". https://speed.pypy.org/.
- "PEP 634 -- Structural Pattern Matching: Specification" (in en). https://www.python.org/dev/peps/pep-0634/.
- Samuele Pedroni (March 2007). "PyPy – Goals and Architecture Overview". http://codespeak.net/pypy/dist/pypy/doc/architecture.html#mission-statement.
- "PyPy – Goals and Architecture Overview – Mission Statement". http://doc.pypy.org/en/latest/architecture.html#mission-statement.
- Our runtime interpreter is “RPython”, Coding Guide – PyPy documentation
- "It is a proper subset of Python, restricted in a way that enables easy analysis and efficient code generation", Ancona et al., 2007.
- Bolz, Carl; Cuni, Antonio; Fijalkowski, Maciej; Rigo, Armin. "Tracing the Meta-Level: PyPy's Tracing JIT Compiler". ICOOOLPS '09. doi:10.1145/1565824.1565827.
- Timothy Balridge interview.
- "PyPy – Python compatibility". 28 December 2019. http://pypy.org/compat.html.
- "PyPy v7.3.7: bug-fix release of 3.7, 3.8". 25 October 2021. https://www.pypy.org/posts/2021/10/pypy-v737-release.html.
- the PyPy team (20 June 2014). "PyPy3 2.3.1 – Fulcrum". PyPy blog. http://morepypy.blogspot.it/2014/06/pypy3-231-fulcrum.html.
- "PyPy v7.2.0: release of 2.7, and 3.6". pypy.org. 16 October 2019. https://pypy.readthedocs.io/en/latest/release-v7.2.0.html.
- "PyPy – Python compatibility". 28 December 2019. http://pypy.org/compat.html.
- "Running pylons on top of PyPy". 10 June 2008. http://morepypy.blogspot.com/2008/06/running-pylons-on-top-of-pypy.html.
- "Running Pyglet on top of PyPy". 20 February 2008. http://morepypy.blogspot.com/2008/02/running-pyglet-on-pypy.html.
- "Running Nevow on top of PyPy". 20 June 2008. http://morepypy.blogspot.com/2008/06/running-nevow-on-top-of-pypy.html.
- "PyPy runs unmodified django 1.0 beta". 19 August 2008. http://morepypy.blogspot.com/2008/08/pypy-runs-unmodified-django-10-beta.html.
- "Introducing the PyPy 1.2 release". 30 April 2011. https://morepypy.blogspot.dk/2011/04/pypy-15-released-catching-up.html.
- "PyPy 1.5 Released: Catching Up". 12 March 2010. https://morepypy.blogspot.dk/2010/03/introducing-pypy-12-release.html.
- Jake Edge (15 May 2013). "A look at the PyPy 2.0 release". LWN.net. https://lwn.net/Articles/550427/.
- "PyPy 2.0 – Einstein Sandwich". 9 May 2013. https://morepypy.blogspot.dk/2013/05/pypy-20-einstein-sandwich.html.
- "PyPy2.7 and PyPy3.5 v5.7 – two in one release". 21 March 2017. https://morepypy.blogspot.dk/2017/03/pypy27-and-pypy35-v57-two-in-one-release.html.
- "PyPy2.7 and PyPy3.5 v6.0 dual release". 26 April 2018. https://morepypy.blogspot.de/2018/04/pypy27-and-pypy35-v60-dual-release.html.
- Cuni, Antonio (2019-02-11). "PyPy Status Blog: PyPy v7.0.0: triple release of 2.7, 3.5 and 3.6-alpha". https://morepypy.blogspot.com/2019/02/pypy-v700-triple-release-of-27-35-and.html.
- Mattip (2019-10-14). "PyPy Status Blog: PyPy v7.2 released". https://morepypy.blogspot.com/2019/10/pypy-v72-released.html.
- Mattip (2019-12-24). "PyPy Status Blog: PyPy v7.3.0 released". https://morepypy.blogspot.com/2019/12/pypy-730-released.html.
- "PyPy and CFFI have moved to Heptapod". 16 February 2020. https://www.pypy.org/posts/2020/02/pypy-and-cffi-have-moved-to-heptapod-5791595152472747032.html.
- "EU Community Research and Development Information Service Entry". http://cordis.europa.eu/projects/rcn/74481_en.html.
- "Eurostars – Aim Higher". http://www.eurostars-eureka.eu/.
- "Project Page on Eureka Network". http://www.eurekanetwork.org/project/-/id/4791.
- "A thank you to the PSF". 22 March 2011. http://morepypy.blogspot.com/2011/03/thank-you-to-psf.html.
- "PyPy Status Blog: Oh, and btw: PyPy gets funding through "Eurostars"". 10 December 2010. http://morepypy.blogspot.com/2010/12/oh-and-btw-pypy-gets-funding-through.html.
- Davide Ancona, Massimo Ancona, Antonio Cuni, Nicholas D. Matsakis, 2007. RPython: a Step Towards Reconciling Dynamically and Statically Typed OO Languages. In Proc. Dynamic Language Symposium (DLS), 2007. ACM Press.
- Carl Friedrich Bolz, Antonio Cuni, Maciej Fijalkowski, 2009. Tracing the meta-level: PyPy's Tracing JIT Compiler. In Proc. ICOOOLPS, 2009. ACM Press.
- Corbet, Jonathan (11 May 2011). "A brief experiment with PyPy". LWN.net. https://lwn.net/Articles/442268/.
- von Eitzen, Chris (21 November 2011). "PyPy 1.7 widens the performance "sweet spot"". The H (Heinz Heise). http://www.h-online.com/open/news/item/PyPy-1-7-widens-the-performance-sweet-spot-1382249.html.
- Rose, John (2 December 2011). "A Day with PyPy". Oracle developer blog. http://blogs.oracle.com/jrose/entry/a_day_with_pypy.
- "Interview Maciej Fijalkowski pypy". Decisionstats blog. 29 November 2015. http://decisionstats.com/2015/11/29/interview-maciej-fijalkowski-pypy/.
Original source: https://en.wikipedia.org/wiki/PyPy. Read more