CPython

From Wikipedia, the free encyclopedia
Jump to: navigation, search
Not to be confused with Cython.
CPython
Python logo and wordmark.svg
Developer(s) Python core developers and the Python community, supported by the Python Software Foundation
Stable release 3.5.2 / 27 June 2016; 60 days ago (2016-06-27)
2.7.12 / 25 June 2016; 2 months ago (2016-06-25)
Written in C
Platform 42 platforms; see § Supported platforms
Type Python Programming Language Interpreter
License Python Software Foundation License
Website www.python.org

CPython is the default, most widely used implementation of the Python programming language. It is written in C. CPython is a source code 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.

Alternatives[edit]

CPython is one of several "production-quality" Python implementations including: Jython, written in Java for the Java virtual machine (JVM), PyPy, written in RPython and translated into C, and IronPython, which is written in C# for the Common Language Infrastructure. There are also several experimental implementations.[1]

Concurrency issues[edit]

A significant limitation of CPython is the use of a global interpreter lock (GIL) on each CPython interpreter process, which effectively disables concurrent Python threads within one process.[2] Concurrency can only be achieved with separate CPython interpreter processes managed by a multitasking operating system. This complicates communication between concurrent Python processes, though the multiprocessing module mitigates this somewhat. Much discussion took place on whether to remove the GIL from CPython. A set of "free threading" patches to CPython was submitted by Greg Stein, which effectively replaced GIL with fine-grained locking. However the patches were rejected due to the execution overhead they introduced into single-process code.[3]

Supported platforms[edit]

Supported platforms include:[4]

Previously supported platforms[edit]

PEP 11[6] lists platforms which are not supported in CPython by Python Software Foundation. These platforms can still be supported by external ports. See below.

External ports[edit]

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.

Version history[edit]

Version Release date Supported until
Old version, no longer supported: 2.2 2001-12-21[12] 2003-05-30[13]
Old version, no longer supported: 2.3 2003-07-29[14] 2008-03-11[15]
Old version, no longer supported: 2.4 2004-11-30[16] 2008-12-19[17]
Old version, no longer supported: 2.5 2006-09-19[18] 2011-05-26[19]
Old version, no longer supported: 2.6 2008-10-01[20] 2013-10-29[21]
Older version, yet still supported: 2.7 2010-07-03[22] 2020[23]
Old version, no longer supported: 3.0 2008-12-03[24] 2009-06-27[25]
Old version, no longer supported: 3.1 2009-06-27[26] 2014-06[27]
Old version, no longer supported: 3.2 2011-02-20[28] 2016-02[29]
Older version, yet still supported: 3.3 2012-09-29[30] 2017-09[31]
Older version, yet still supported: 3.4 2014-03-17[32] 2019-03[citation needed]
Current stable version: 3.5 2015-09-13[33] 2020-09[citation needed]
Future release: 3.6 Late 2016[34]
Legend:
Old version
Older version, still supported
Latest version
Latest preview version
Future release

References[edit]

  1. ^ Martelli, Alex (2006). Python in a Nutshell (2nd ed.). O'Reilly. pp. 5–7. ISBN 978-0-596-10046-9. 
  2. ^ "Initialization, Finalization, and Threads — Python v2.7.6 documentation". Docs.python.org. Retrieved 2015-08-08. 
  3. ^ "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. 
  4. ^ "PythonImplementations". Retrieved 19 July 2012. 
  5. ^ "Irix still supported?". 
  6. ^ PEP 11
  7. ^ AmigaPython
  8. ^ iSeriesPython
  9. ^ PythonD
  10. ^ Stackless Python for PSP
  11. ^ Python Windows CE port
  12. ^ "Python 2.2". Python.org. Retrieved 2014-02-06. 
  13. ^ "Python 2.2.3". Python.org. Retrieved 2014-02-06. 
  14. ^ "Python 2.3". Python.org. 2003-07-29. Retrieved 2014-02-06. 
  15. ^ "Python 2.3.7 Release". Python.org. 2008-03-11. Retrieved 2014-02-06. 
  16. ^ "Python 2.4". Python.org. 2004-11-30. Retrieved 2014-02-06. 
  17. ^ "Python 2.4.6 Release". Python.org. 2008-12-19. Retrieved 2014-02-06. 
  18. ^ "Python 2.5 Release". Python.org. 2006-09-19. Retrieved 2014-02-06. 
  19. ^ "Python 2.5.6". Python.org. 2011-05-26. Retrieved 2014-02-06. 
  20. ^ "Python 2.6 Release". Python.org. 2008-10-01. Retrieved 2014-02-06. 
  21. ^ "Python 2.6.9 Release". Python.org. 2013-10-29. Retrieved 2014-02-06. 
  22. ^ "Python 2.7 Release". Python.org. 2010-07-03. Retrieved 2014-02-06. 
  23. ^ "PEP 373 - Python 2.7 Release Schedule". Python.org. Retrieved 2014-02-06. 
  24. ^ "Python 3.0 Release". Python.org. 2008-12-03. Retrieved 2014-02-06. 
  25. ^ "Python 3.0.1 Release". Python.org. 2009-02-13. Retrieved 2014-02-06. 
  26. ^ "Python 3.1 Release". Python.org. 2009-06-27. Retrieved 2014-02-06. 
  27. ^ "PEP 375 - Python 3.1 Release Schedule". Python.org. Retrieved 2014-02-06. 
  28. ^ "Python 3.2 Release". Python.org. 2011-02-20. Retrieved 2014-02-06. 
  29. ^ "PEP 392 - Python 3.2 Release Schedule". Python.org. Retrieved 2014-02-06. 
  30. ^ "Python 3.3.0 Release". Python.org. 2012-09-29. Retrieved 2014-02-06. 
  31. ^ "PEP 398 - Python 3.3 Release Schedule". Python.org. Retrieved 2014-02-06. 
  32. ^ "Python 3.4.0 Release". Python.org. Retrieved 2014-04-26. 
  33. ^ "Python 3.5.0 Release". Python.org. Retrieved 2015-09-16. 
  34. ^ "Python 3.6 Release Schedule". Python.org. Retrieved 2015-09-16.