CPython
- Not to be confused with Cython.
File:Python logo.svg | |
Developer(s) | Python core developers and the Python community, supported by the Python Software Foundation |
---|---|
Stable release | 3.3.3 / 12 November 2013 2.7.6 / 10 November 2013 |
Repository | |
Written in | C |
Platform | Cross-platform |
Type | Python Programming Language Interpreter |
License | Python Software Foundation License |
Website | www |
CPython is the default, most-widely used implementation of the Python programming language. It is written in C. In addition to CPython, there are other "production-quality" Python implementations: Jython, written in Java, PyPy, and IronPython, which is written for the Common Language Infrastructure. There are also several experimental implementations.[1]
CPython is a bytecode interpreter. It has a foreign function interface with several languages including C, in which one must explicitly write bindings in a language other than Python.
Supported platforms[2]
|
|
|
Previously supported platforms
PEP 11 lists platforms which are not supported in CPython by Python Software Foundation. These platforms can still be supported by external ports. See below.
- AtheOS (unsupported since 2.6)
- BeOS (unsupported since 2.6)
- DOS (unsupported since 2.0)
- IRIX 4 (unsupported since 2.3)
- Mac OS 9 (unsupported since 2.4)
- MINIX (unsupported since 2.3)
- Windows 3.x (unsupported since 2.0)
- Windows 9x (unsupported since 2.6)
- Windows NT4 (unsupported since 2.6)
External ports
These are ports not integrated to Python Software Foundation's official version of CPython, with links to its main development site. Ports often include additional modules for platform-specific functionalities, like graphics and sound API for PSP and SMS and camera API for S60.
- Amiga: AmigaPython
- AS/400: iSeriesPython
- DOS using DJGPP: PythonD
- PlayStation Portable: Stackless Python for PSP
- Symbian OS: Python for S60
- Windows CE/Pocket PC: Python Windows CE port
Concurrency issues
A significant drawback to using CPython is the presence of a Global Interpreter Lock on each CPython interpreter process, which effectively disables concurrent Python threads within one process.[3] To be truly concurrent in multitasking environment, separate CPython interpreter processes have to be run, which makes establishing communication between them a difficult task, though the multiprocessing module mitigates this somewhat. A lot of discussion took place whether to remove the GIL from CPython, even after the rejection of the “free threading” patches on CPython from Greg Stein which effectively replaced GIL with fine-grained locking. The rejection was mainly based on the overhead the patch inflicted to execution of single process code.[4]
Version history
Version | Release date | Supported until | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
2.2 | 2001-12-21[5] | 2003-05-30[6] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2.3 | 2003-07-29[7] | 2008-03-11[8] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2.4 | 2004-11-30[9] | 2008-12-19[10] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2.5 | 2006-09-19[11] | 2011-05-26[12] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2.6 | 2008-10-01[13] | 2013-10-29[14] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2.7 | 2010-07-03[15] | 2015 (at least)[16] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3.0 | 2008-12-03[17] | 2009-06-27[18] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3.1 | 2009-06-27[19] | 2014-06[20] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3.2 | 2011-02-20[21] | 2016-02[22] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3.3 | 2012-09-29[23] | 2017-09[24] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3.4 | 2014-02-23[25] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Old version, not maintained Old version, still maintained Latest version Future release |
References
- ^ Martelli, Alex (2006). Python in a Nutshell (2nd edition ed.). O'Reilly. pp. 5–7. ISBN 978-0-596-10046-9.
{{cite book}}
:|edition=
has extra text (help) - ^ "PythonImplementations". Retrieved 19 July 2012.
- ^ "Initialization, Finalization, and Threads — Python v2.7.6 documentation". Docs.python.org. Retrieved 2014-02-06.
- ^ "Library and Extension FAQ". Python v3.3.0 documentation. Python Software Foundation. "Can't we get rid of the Global Interpreter Lock?". Archived from the original on March 4, 2013.
{{cite web}}
: Unknown parameter|deadurl=
ignored (|url-status=
suggested) (help) - ^ "Python 2.2". Python.org. Retrieved 2014-02-06.
- ^ "Python 2.2.3". Python.org. Retrieved 2014-02-06.
- ^ "Python 2.3". Python.org. 2003-07-29. Retrieved 2014-02-06.
- ^ "Python 2.3.7 Release". Python.org. 2008-03-11. Retrieved 2014-02-06.
- ^ "Python 2.4". Python.org. 2004-11-30. Retrieved 2014-02-06.
- ^ "Python 2.4.6 Release". Python.org. 2008-12-19. Retrieved 2014-02-06.
- ^ "Python 2.5 Release". Python.org. 2006-09-19. Retrieved 2014-02-06.
- ^ "Python 2.5.6". Python.org. 2011-05-26. Retrieved 2014-02-06.
- ^ "Python 2.6 Release". Python.org. 2008-10-01. Retrieved 2014-02-06.
- ^ "Python 2.6.9 Release". Python.org. 2013-10-29. Retrieved 2014-02-06.
- ^ "Python 2.7 Release". Python.org. 2010-07-03. Retrieved 2014-02-06.
- ^ "PEP 373 - Python 2.7 Release Schedule". Python.org. Retrieved 2014-02-06.
- ^ "Python 3.0 Release". Python.org. 2008-12-03. Retrieved 2014-02-06.
- ^ "Python 3.0.1 Release". Python.org. 2009-02-13. Retrieved 2014-02-06.
- ^ "Python 3.1 Release". Python.org. 2009-06-27. Retrieved 2014-02-06.
- ^ "PEP 375 - Python 3.1 Release Schedule". Python.org. Retrieved 2014-02-06.
- ^ "Python 3.2 Release". Python.org. 2011-02-20. Retrieved 2014-02-06.
- ^ "PEP 392 - Python 3.2 Release Schedule". Python.org. Retrieved 2014-02-06.
- ^ "Python 3.3.0 Release". Python.org. 2012-09-29. Retrieved 2014-02-06.
- ^ "PEP 398 - Python 3.3 Release Schedule". Python.org. Retrieved 2014-02-06.
- ^ "PEP 429 - Python 3.4 Release Schedule". Python.org. Retrieved 2014-02-06.