Content deleted Content added
Akeosnhaoe (talk | contribs) Undid revision 1246818795 by 110.39.161.155 (talk) Tags: Undo Mobile edit Mobile web edit Advanced mobile edit |
m vbump |
||
(47 intermediate revisions by 16 users not shown) | |||
Line 6:
[[File:Python logo and wordmark.svg|alt=|thumb|New Python logo, 2006–present]]
[[File:Guido-portrait-2014.jpg|thumb|Guido van Rossum in 2014]]
The [[programming language]] [[Python (programming language)|Python]] was conceived in the late 1980s,<ref name="venners-interview-pt-1">{{cite web |url=http://www.artima.com/intv/pythonP.html |title=The Making of Python |access-date=March 22, 2007 |publisher=Artima Developer |archive-date=September 1, 2016 |archive-url=https://web.archive.org/web/20160901183332/http://www.artima.com/intv/pythonP.html |url-status=live}}</ref> and its implementation was started in December 1989<ref name="timeline-of-python" /> by [[Guido van Rossum]] at [[Centrum Wiskunde & Informatica|CWI]] in [[the Netherlands]] as a successor to [[ABC (programming language)|ABC]] capable of [[exception handling]] and interfacing with the [[Amoeba (operating system)|Amoeba operating system]].<ref name="faq-created">{{cite web |url=https://www.python.org/doc/faq/general/#why-was-python-created-in-the-first-place |title=Why was Python created in the first place? |publisher=Python FAQ |access-date=March 22, 2007 |archive-date=February 23, 2008 |archive-url=https://web.archive.org/web/20080223222507/http://www.python.org/doc/faq/general/#why-was-python-created-in-the-first-place |url-status=live}}</ref> Van Rossum
Python 2.0 was released on October 16, 2000, with many major new features,
Python 3.0, a major, backwards-incompatible release, was released on December 3, 2008<ref name="3.0-release">{{cite web |url=https://www.python.org/download/releases/3.0/ |title=Welcome to Python.org |work=python.org |access-date=December 27, 2016 |archive-date=June 14, 2020 |archive-url=https://web.archive.org/web/20200614153714/https://www.python.org/download/releases/3.0/ |url-status=live}}</ref> after a long period of testing. Many of its major features
{{As of|2025|08|9|since=n}}, Python 3.13.6 is the latest stable release. This version currently receives full bug-fix and security updates, while Python 3.12—released in October 2023—had active bug-fix support only until April 2025, and since then only security fixes. Python 3.9<ref>{{Cite web |last=Langa |first=Łukasz |date=2022-05-17 |title=Python 3.9.13 is now available |url=https://pythoninsider.blogspot.com/2022/05/python-3913-is-now-available.html |access-date=2022-05-21 |website=Python Insider |archive-date=17 May 2022 |archive-url=https://web.archive.org/web/20220517173546/https://pythoninsider.blogspot.com/2022/05/python-3913-is-now-available.html |url-status=live}}</ref> is the oldest supported version of Python (albeit in the 'security support' phase), because Python 3.8 has become an end-of-life product.<ref>{{Cite web |title=Status of Python versions |url=https://devguide.python.org/versions/ |access-date=2024-10-07 |website=Python Developer's Guide |language=en}}</ref><ref>{{Cite web |date=8 October 2024 |title=Python |url=https://endoflife.date/python |access-date=2024-11-20 |website=endoflife.date |language=en-US }}</ref>
==Early history==
==Version 1==
Line 29 ⟶ 30:
In 2000, the Python core development team moved to BeOpen.com<ref>{{Cite web|url=https://slashdot.org/story/00/05/30/1931239/python-development-team-moves-to-beopencom|title=Python Development Team Moves to BeOpen.Com – Slashdot|website=slashdot.org|access-date=April 12, 2020|archive-date=April 12, 2020|archive-url=https://web.archive.org/web/20200412054433/https://slashdot.org/story/00/05/30/1931239/python-development-team-moves-to-beopencom|url-status=live}}</ref> to form the BeOpen PythonLabs team.<ref>{{Cite web|url=http://www.beopen.com/company/team.html|archive-url = https://web.archive.org/web/20000815095541/http://www.beopen.com/company/team.html|archive-date = August 15, 2000|title = Open | Your digital insurance partner}}</ref><ref>{{Cite web|url=http://joeellsworth.com/resume/references/pybiz_beopen_partnership.pdf|title=Content Management Provider PyBiz Announces Strategic Partnership With BeOpen in Utilizing Python Programming Language|access-date=April 12, 2020|archive-date=April 12, 2020|archive-url=https://web.archive.org/web/20200412054433/http://joeellsworth.com/resume/references/pybiz_beopen_partnership.pdf|url-status=live}}</ref> CNRI requested that a version 1.6 be released, summarizing Python's development up to the point at which the development team left CNRI. Consequently, the release schedules for 1.6 and 2.0 had a significant amount of overlap.<ref name="newin-2.0" /> Python 2.0 was the only release from BeOpen.com. After Python 2.0 was released by BeOpen.com, Guido van Rossum and the other PythonLabs developers joined [[Zope|Digital Creations]].
The Python 1.6 release included a new CNRI license that was substantially longer than the CWI license that had been used for earlier releases. The new license included a clause stating that the license was governed by the [[law]]s of the [[State of Virginia]]. The [[Free Software Foundation]] argued that the choice-of-law clause was incompatible with the [[GNU General Public License]]. BeOpen, CNRI and the FSF negotiated a change to Python's [[free
==Version 2==
Line 47 ⟶ 48:
| image3 = Python-logo-notext.svg
| alt3 = A highly abstracted symbol suggestive of the head ends of two snakes in a double helix viewed head-on, curved clockwise toward the viewer: a blue snake comes in from behind to the left, with head folding back on its body at the top, and a yellow snake comes in from behind to the right and its head folds back on its body at the bottom; the overall silhouette of the symbol forms a rough plus sign, and the eye locations are suggestive of a yin and yang.
| footer = Historic Python logos used on Windows (left) and the Macintosh (
| total_width = 200
}}
Line 56 ⟶ 57:
==Version 3==
{{redirect|Python 3|the Israeli missile|Python (missile)#Python-3}}
Python 3.0 (also called "Python 3000" or "Py3K") was released on December 3, 2008.<ref name="3.0-release" /> It was designed to rectify fundamental design flaws in the language{{snd}}the changes required could not be implemented while retaining full backwards compatibility with the 2.x series, which necessitated a new major version number. The guiding principle of Python 3 was: "reduce feature duplication by removing old ways of doing things".<ref>{{Cite web |title=PEP 3100 – Miscellaneous Python 3.0 Plans {{!}} peps.python.org |url=https://peps.python.org/pep-3100/ |access-date=2022-06-02 |website=peps.python.org |archive-date=May 25, 2022 |archive-url=https://web.archive.org/web/20220525072657/https://peps.python.org/pep-3100/ |url-status=live}}</ref>
Python 3.0 was developed with the same philosophy as in prior versions. However, as Python had accumulated new and redundant ways to program the same task, Python 3.0 had an emphasis on removing duplicative constructs and modules, in keeping with the [[Zen of Python]]: "There should be one— <!-- if you intend to correct the spacings on the em dashes, leave it alone, it's a tongue in cheek in the original philosophy by Tim Peters -->and preferably only one —obvious way to do it".
Nonetheless, Python 3.0 remained a [[Multi-paradigm programming language|multi-paradigm language]]. Coders could still follow [[Object-oriented programming|object-oriented]], [[structured programming|structured]], and [[functional programming|functional]] programming paradigms, among others, but within such broad choices, the details were intended to be more obvious in Python 3.0 than they were in Python 2.x.
===Compatibility===
Python 3.0 broke backward compatibility, and much Python 2 code does not run unmodified on Python 3.<ref>{{Cite web |title=PEP 3000 – Python 3000 {{!}} peps.python.org |url=https://peps.python.org/pep-3000/#compatibility-and-transition |access-date=2022-06-02 |website=peps.python.org |archive-date=April 2, 2022 |archive-url=https://web.archive.org/web/20220402165138/https://peps.python.org/pep-3000/#compatibility-and-transition |url-status=live}}</ref> Python's [[dynamic typing]] combined with the plans to change the semantics of certain methods of dictionaries, for example, made perfect [[source-to-source compiler|mechanical translation]] from Python 2.x to Python 3.0 very difficult. A tool called "<code>2to3</code>" does the parts of translation that can be done automatically. At this, <code>2to3</code> appeared to be fairly successful, though an early review noted that there were aspects of translation that such a tool would never be able to handle.<ref>{{Cite web |last=Ruby |first=Sam |date=September 1, 2007 |title=2to3 |url=https://intertwingly.net/blog/2007/09/01/2to3 |url-status=live |archive-url=https://web.archive.org/web/20160324182701/https://intertwingly.net/blog/2007/09/01/2to3 |archive-date=March 24, 2016 |access-date=2024-09-06 |website=intertwingly.net}}</ref> Prior to the roll-out of Python 3, projects requiring compatibility with both the 2.x and 3.x series were recommended to have one source (for the 2.x series), and produce releases for the Python 3.x platform using <code>2to3</code>. Edits to the Python 3.x code were discouraged for so long as the code needed to run on Python 2.x.<ref name="pep-3000" /> This is no longer recommended; as of 2012 the preferred approach was to create a single code base that can run under both Python 2 and 3 using compatibility modules.<ref>{{Cite web |last=Coghlan |first=Alyssa |date=April 21, 2020 |title=Python 3 Q & A – Alyssa Coghlan's Python Notes |url=https://python-notes.curiousefficiency.org/en/latest/python3/questions_and_answers.html#other-changes
===Features===
Some of the major changes included for Python 3.0 were:
* Changing {{code|print}} so that it is a [[Intrinsic function|built-in function]], not a statement. This made it easier to change a module to use a different print function, as well as making the syntax more regular. In Python 2.6 and 2.7 {{code|print()}} is available as a
* Removal of the Python 2 {{code|input}} function, and the renaming of the {{code|raw_input}} function to {{code|input}}. Python 3's {{code|input}} function behaves like Python 2's {{code|raw_input}} function, in that the input is always returned as a string rather than being evaluated as an expression
* Moving {{code|reduce}} (but not {{code|map}} or {{code|filter}}) out of the built-in namespace and into {{code|functools}} (the rationale being code that uses {{code|reduce}} is less readable than code that uses a for loop and accumulator variable)<ref>{{cite web |url=http://www.artima.com/weblogs/viewpost.jsp?thread=211200 |title=Python 3000 FAQ |first=Guido |last=van Rossum |work=artima.com |access-date=December 27, 2016 |archive-date=November 9, 2020 |archive-url=https://web.archive.org/web/20201109015427/https://www.artima.com/weblogs/viewpost.jsp?thread=211200 |url-status=live}}</ref><ref>{{Cite web |url=https://www.artima.com/weblogs/viewpost.jsp?thread=98196 |title=The fate of reduce() in Python 3000 |website=www.artima.com |access-date=2019-12-31 |archive-date=December 18, 2019 |archive-url=https://web.archive.org/web/20191218204011/https://www.artima.com/weblogs/viewpost.jsp?thread=98196 |url-status=live}}</ref>
Line 75 ⟶ 79:
* Removing backward-compatibility features, including old-style classes, string exceptions, and implicit relative imports
* A change in [[integer division]] functionality: in Python 2, integer division always returns an integer. For example {{code|5 / 2}} is {{code|2}}; whereas in Python 3, {{code|5 / 2}} is {{code|2.5}}. (In both Python 2{{snd}}2.2 onwards{{snd}}and Python 3, a separate operator exists to provide the old behavior: {{code|5 // 2}} is {{code|2}})
*Allowing non-ASCII letters to be used in identifiers,<ref>{{Cite web |title=PEP 3131 – Supporting Non-ASCII Identifiers {{!}} peps.python.org |url=https://peps.python.org/pep-3131/ |access-date=2024-07-01 |website=Python Enhancement Proposals (PEPs) |language=en}}</ref> such as in <code>smörgåsbord</code>
=== Subsequent releases ===
Python 3.2 defined a stable [[Application Binary Interface|ABI]], allowing extension modules to rely on functions across different Python versions.
Python 3.5 added the typing module, which allows for [[type hint]]s and [[function signature]] annotation. It additionally added the [[async/await]] syntax. Furthermore, .pyo files were removed, with .pyc files representing both unoptimized and optimized [[bytecode]].
Python 3.6 followed with async [[Generator (computer programming)|generator]]s and async comprehensions ([[List comprehension|for lists]] as well as dicts and sets), as well as formatted [[string literal]]s (f-strings).<ref>{{cite web |editor1-last=Pranskevichus |editor1-first=Elvis |editor2-last=Selivanov |editor2-first=Yury |title=What’s New In Python 3.6 |url=https://docs.python.org/3/whatsnew/3.6.html |website=Python documentation |access-date=5 August 2025 |language=en |date=December 23, 2016}}</ref>
Python 3.10 introduced [[structural pattern matching]] via match/case statements. Additionally it provided improved error messages which "were inspired by previous work in the PyPy interpreter" and added the <code>|</code> [[union type]] operator.<ref>{{Cite web |title=What's New In Python 3.10 |url=https://docs.python.org/3/whatsnew/3.10.html |access-date=2025-06-12 |website=Python documentation |language=en}}</ref>
Python 3.11 expanded [[exception handling (programming)|exception handling]] functionality. Around this version, there has been a focus on making Python faster; 3.11 is claimed to be 10–60% faster than 3.10,<ref>{{Cite web |title=Python 3.11 released [LWN.net] |author=corbet |work=lwn.net |date=24 October 2022 |access-date=15 November 2022 |url=https://lwn.net/Articles/912216/}}</ref> and 3.12 increases by an additional 5%.
Python 3.12 added the new keyword <code>type</code> and improved error messages.
Python 3.13 added an experimental [[Just-in-time compilation|just-in-time (JIT) compiler]], the ability to disable the [[global interpreter lock]], a new and improved interactive interpreter ([[read–eval–print loop|REPL]]), and an incremental [[Garbage collection (computer science)|garbage collector]].<ref>{{Cite web |title=What's New In Python 3.13 |url=https://docs.python.org/3.13/whatsnew/3.13.html#experimental-jit-compiler |access-date=2024-04-30 |website=Python documentation |language=en}}</ref>
Starting with Python 3.13, it and later versions receive two years of full support (increased from one and a half years), followed by three years of security support; this is the same total duration of support as previously.
Python 3.14.0 is now{{as of?|date=August 2025}} in the [[release candidate]] 1 phase. It introduces e.g. a new opt-in interpreter, up to 30% faster.{{cn|date=August 2025}}
Python 3.15 will "Make [[UTF-8]] mode default";<ref>{{Cite web |title=PEP 686 – Make UTF-8 mode default {{!}} peps.python.org |url=https://peps.python.org/pep-0686/ |access-date=2024-11-20 |website=Python Enhancement Proposals (PEPs) |language=en}}</ref> This mode is supported in all current Python versions, but it currently must be opted into. UTF-8 is already used by default on [[Microsoft Windows|Windows]] (and other [[operating system]]s) for most purposes, but an exception is opening files. Enabling UTF-8 also makes code fully [[Cross-platform software|cross-platform]].
==== Security ====
Security updates were expedited in 2021 and again twice in 2022. More issues were fixed in 2023 and in September 2024 (for Python versions 3.8.20 through 3.12.6)—all versions (including 2.7)<ref>{{Cite web|title=CVE-2021-3177 |url=https://access.redhat.com/security/cve/cve-2021-3177|access-date=2021-02-26|website=Red Hat Customer Portal |archive-date=6 March 2021|archive-url=https://web.archive.org/web/20210306183700/https://access.redhat.com/security/cve/cve-2021-3177|url-status=live}}</ref> had been insecure because of issues leading to possible [[remote code execution]]<ref>{{Cite web|title=CVE-2021-3177|url=https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-3177|access-date=2021-02-26|website=CVE|archive-date=27 February 2021|archive-url=https://web.archive.org/web/20210227192918/https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-3177|url-status=live}}</ref> and [[cache poisoning|web-cache poisoning]].<ref>{{Cite web|title=CVE-2021-23336|url=https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-23336|access-date=2021-02-26|website=CVE|archive-date=24 February 2021|archive-url=https://web.archive.org/web/20210224160700/https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-23336|url-status=live}}</ref>
==Table of versions==
Line 100 ⟶ 128:
| 1.0.4<ref name="timeline-of-python" />
| 1994-01-26<ref name="timeline-of-python" />
| colspan="2" | 1994-
|-
| {{Version|o|1.1}}
Line 220 ⟶ 248:
| 2023-06-06<ref name="pep-0537" />
|-
| {{Version|
|
| 2019-10-14<ref name="pep-0569" />
| 2021-05-03{{efn|group=version-table|name=last-bug-release}}<ref name="pep-0569" />
| 2024-10-07<ref name="pep-0569" />
|-
| {{Version|co|3.9}}{{Update after|2025|10}}
| ''3.9.
| 2020-10-05<ref name="pep-0596" />
| 2022-05-17{{efn|group=version-table|name=last-bug-release}}<ref name="pep-0596" />
Line 233 ⟶ 261:
|-
| {{Version|co|3.10}}{{Update after|2026|10}}
| ''3.10.
| 2021-10-04<ref name="pep-0619" />
| 2023-04-05{{efn|group=version-table|name=last-bug-release}}<ref name="pep-0619" />
Line 239 ⟶ 267:
|-
| {{Version|co|3.11}}{{Update after|2027|10}}
|''3.11.
| 2022-10-24<ref name="pep-0664" />
| 2024-04-02{{efn|group=version-table|name=last-bug-release}}<ref name="pep-0664" />
| 2027-10<ref name="pep-0664" />{{Update after|2027|10}}
|-
| {{Version|
|''3.12.
| 2023-10-02<ref name="pep-0693" />
| 2025-
| 2028-10<ref name="pep-0693" />{{Update after|2028|10}}
|-
| {{Version|
| ''3.13.
| 2024-10-
| 2026-05<ref name="pep-0719" />{{Update after|2026|05}}
| 2029-10<ref name="pep-0719" />{{Update after|2029|10}}
|-
| {{Version|
|
| 2025-10-
| 2027-05<ref name="pep-0745" />{{Update after|2027|05}}
| 2030-10<ref name="pep-0745" />{{Update after|2030|10}}
|-
| {{Version|p|3.15}}<!--Make preview version when in beta-->
| 3.15.0a0<ref name="pep-0790">{{Cite web |last=van Kemenade |first=Hugo |date=April 26, 2025 |title=PEP 790 – Python 3.15 Release Schedule |url=https://peps.python.org/pep-0790/ |access-date=2025-05-07 |website=Python Enhancement Proposals (PEPs) |language=en}}</ref>{{update after|2025|10|14}}
| 2026-10-01<ref name="pep-0790" />{{Update after|2026|10|01}}
| 2028-05<ref name="pep-0790" />{{Update after|2028|05}}
| 2031-10<ref name="pep-0790" />{{Update after|2031|10}}
|}
{{smalldiv|1=
{{Version|l|show=111111}}
''Italics'' indicates the latest micro version of currently supported versions as of
}}
Line 282 ⟶ 316:
DateFormat = dd/mm/yyyy
Period = from:01/01/1990 till:01/01/
TimeAxis = orientation:horizontal
Line 306 ⟶ 340:
fontsize:S
shift:(-6, -4)
bar:3.
bar:3.
bar:3.
bar:3.12 from:02/10/2023 till:01/10/2028 text:3.12 color:maintenance
bar:3.11 from:24/10/2022 till:01/10/2027 text:3.11 color:maintenance
bar:3.10 from:04/10/2021 till:01/10/2026 text:3.10 color:maintenance
bar:3.9 from:05/10/2020 till:01/10/2025 text:3.9 color:maintenance
bar:3.8 from:14/10/2019 till:
bar:3.7 from:27/06/2018 till:06/06/2023 text:3.7 color:out_of_support
bar:3.6 from:23/12/2016 till:23/12/2021 text:3.6 color:out_of_support
Line 344 ⟶ 379:
==References==
{{reflist|1=30em|refs=
<ref name="timeline-of-python">{{cite web |url=
<ref name="downloads">{{cite web|url=https://www.python.org/downloads/|title=Download Python {{!}} Python.org|access-date=2019-11-29|archive-date=August 8, 2018|archive-url=https://web.archive.org/web/20180808035421/https://www.python.org/downloads/|url-status=live}}</ref>
<ref name="releases">{{cite web|url=https://www.python.org/download/releases|title=Releases {{!}} Python.org|access-date=2019-11-29|archive-date=December 22, 2015|archive-url=https://web.archive.org/web/20151222142552/https://www.python.org/download/releases/|url-status=live}}</ref>
Line 381 ⟶ 416:
==External links==
* [
{{DEFAULTSORT:History Of Python}}
|