CINXE.COM

PEP 3003 – Python Language Moratorium | peps.python.org

<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="color-scheme" content="light dark"> <title>PEP 3003 – Python Language Moratorium | peps.python.org</title> <link rel="shortcut icon" href="../_static/py.png"> <link rel="canonical" href="https://peps.python.org/pep-3003/"> <link rel="stylesheet" href="../_static/style.css" type="text/css"> <link rel="stylesheet" href="../_static/mq.css" type="text/css"> <link rel="stylesheet" href="../_static/pygments.css" type="text/css" media="(prefers-color-scheme: light)" id="pyg-light"> <link rel="stylesheet" href="../_static/pygments_dark.css" type="text/css" media="(prefers-color-scheme: dark)" id="pyg-dark"> <link rel="alternate" type="application/rss+xml" title="Latest PEPs" href="https://peps.python.org/peps.rss"> <meta property="og:title" content='PEP 3003 – Python Language Moratorium | peps.python.org'> <meta property="og:description" content="This PEP proposes a temporary moratorium (suspension) of all changes to the Python language syntax, semantics, and built-ins for a period of at least two years from the release of Python 3.1. In particular, the moratorium would include Python 3.2 (to b..."> <meta property="og:type" content="website"> <meta property="og:url" content="https://peps.python.org/pep-3003/"> <meta property="og:site_name" content="Python Enhancement Proposals (PEPs)"> <meta property="og:image" content="https://peps.python.org/_static/og-image.png"> <meta property="og:image:alt" content="Python PEPs"> <meta property="og:image:width" content="200"> <meta property="og:image:height" content="200"> <meta name="description" content="This PEP proposes a temporary moratorium (suspension) of all changes to the Python language syntax, semantics, and built-ins for a period of at least two years from the release of Python 3.1. In particular, the moratorium would include Python 3.2 (to b..."> <meta name="theme-color" content="#3776ab"> </head> <body> <svg xmlns="http://www.w3.org/2000/svg" style="display: none;"> <symbol id="svg-sun-half" viewBox="0 0 24 24" pointer-events="all"> <title>Following system colour scheme</title> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"> <circle cx="12" cy="12" r="9"></circle> <path d="M12 3v18m0-12l4.65-4.65M12 14.3l7.37-7.37M12 19.6l8.85-8.85"></path> </svg> </symbol> <symbol id="svg-moon" viewBox="0 0 24 24" pointer-events="all"> <title>Selected dark colour scheme</title> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"> <path stroke="none" d="M0 0h24v24H0z" fill="none"></path> <path d="M12 3c.132 0 .263 0 .393 0a7.5 7.5 0 0 0 7.92 12.446a9 9 0 1 1 -8.313 -12.454z"></path> </svg> </symbol> <symbol id="svg-sun" viewBox="0 0 24 24" pointer-events="all"> <title>Selected light colour scheme</title> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"> <circle cx="12" cy="12" r="5"></circle> <line x1="12" y1="1" x2="12" y2="3"></line> <line x1="12" y1="21" x2="12" y2="23"></line> <line x1="4.22" y1="4.22" x2="5.64" y2="5.64"></line> <line x1="18.36" y1="18.36" x2="19.78" y2="19.78"></line> <line x1="1" y1="12" x2="3" y2="12"></line> <line x1="21" y1="12" x2="23" y2="12"></line> <line x1="4.22" y1="19.78" x2="5.64" y2="18.36"></line> <line x1="18.36" y1="5.64" x2="19.78" y2="4.22"></line> </svg> </symbol> </svg> <script> document.documentElement.dataset.colour_scheme = localStorage.getItem("colour_scheme") || "auto" </script> <section id="pep-page-section"> <header> <h1>Python Enhancement Proposals</h1> <ul class="breadcrumbs"> <li><a href="https://www.python.org/" title="The Python Programming Language">Python</a> &raquo; </li> <li><a href="../pep-0000/">PEP Index</a> &raquo; </li> <li>PEP 3003</li> </ul> <button id="colour-scheme-cycler" onClick="setColourScheme(nextColourScheme())"> <svg aria-hidden="true" class="colour-scheme-icon-when-auto"><use href="#svg-sun-half"></use></svg> <svg aria-hidden="true" class="colour-scheme-icon-when-dark"><use href="#svg-moon"></use></svg> <svg aria-hidden="true" class="colour-scheme-icon-when-light"><use href="#svg-sun"></use></svg> <span class="visually-hidden">Toggle light / dark / auto colour theme</span> </button> </header> <article> <section id="pep-content"> <h1 class="page-title">PEP 3003 – Python Language Moratorium</h1> <dl class="rfc2822 field-list simple"> <dt class="field-odd">Author<span class="colon">:</span></dt> <dd class="field-odd">Brett Cannon, Jesse Noller, Guido van Rossum</dd> <dt class="field-even">Status<span class="colon">:</span></dt> <dd class="field-even"><abbr title="Accepted and implementation complete, or no longer active">Final</abbr></dd> <dt class="field-odd">Type<span class="colon">:</span></dt> <dd class="field-odd"><abbr title="Normative PEP describing or proposing a change to a Python community process, workflow or governance">Process</abbr></dd> <dt class="field-even">Created<span class="colon">:</span></dt> <dd class="field-even">21-Oct-2009</dd> <dt class="field-odd">Post-History<span class="colon">:</span></dt> <dd class="field-odd">03-Nov-2009</dd> </dl> <hr class="docutils" /> <section id="contents"> <details><summary>Table of Contents</summary><ul class="simple"> <li><a class="reference internal" href="#abstract">Abstract</a></li> <li><a class="reference internal" href="#rationale">Rationale</a></li> <li><a class="reference internal" href="#details">Details</a><ul> <li><a class="reference internal" href="#cannot-change">Cannot Change</a></li> <li><a class="reference internal" href="#case-by-case-exemptions">Case-by-Case Exemptions</a></li> <li><a class="reference internal" href="#allowed-to-change">Allowed to Change</a></li> </ul> </li> <li><a class="reference internal" href="#retroactive">Retroactive</a></li> <li><a class="reference internal" href="#extensions">Extensions</a></li> <li><a class="reference internal" href="#copyright">Copyright</a></li> <li><a class="reference internal" href="#references">References</a></li> </ul> </details></section> <section id="abstract"> <h2><a class="toc-backref" href="#abstract" role="doc-backlink">Abstract</a></h2> <p>This PEP proposes a temporary moratorium (suspension) of all changes to the Python language syntax, semantics, and built-ins for a period of at least two years from the release of Python 3.1. In particular, the moratorium would include Python 3.2 (to be released 18-24 months after 3.1) but allow Python 3.3 (assuming it is not released prematurely) to once again include language changes.</p> <p>This suspension of features is designed to allow non-CPython implementations to “catch up” to the core implementation of the language, help ease adoption of Python 3.x, and provide a more stable base for the community.</p> </section> <section id="rationale"> <h2><a class="toc-backref" href="#rationale" role="doc-backlink">Rationale</a></h2> <p>This idea was proposed by Guido van Rossum on the python-ideas <a class="footnote-reference brackets" href="#id6" id="id1">[1]</a> mailing list. The premise of his email was to slow the alteration of the Python core syntax, builtins and semantics to allow non-CPython implementations to catch up to the current state of Python, both 2.x and 3.x.</p> <p>Python, as a language is more than the core implementation – CPython – with a rich, mature and vibrant community of implementations, such as Jython <a class="footnote-reference brackets" href="#id7" id="id2">[2]</a>, IronPython <a class="footnote-reference brackets" href="#id8" id="id3">[3]</a> and PyPy <a class="footnote-reference brackets" href="#id9" id="id4">[4]</a> that are a benefit not only to the community, but to the language itself.</p> <p>Still others, such as Unladen Swallow <a class="footnote-reference brackets" href="#id10" id="id5">[5]</a> (a branch of CPython) seek not to create an alternative implementation, but rather they seek to enhance the performance and implementation of CPython itself.</p> <p>Python 3.x was a large part of the last several years of Python’s development. Its release, as well as a bevy of changes to the language introduced by it and the previous 2.6.x releases, puts alternative implementations at a severe disadvantage in “keeping pace” with core python development.</p> <p>Additionally, many of the changes put into the recent releases of the language as implemented by CPython have not yet seen widespread usage by the general user population. For example, most users are limited to the version of the interpreter (typically CPython) which comes pre-installed with their operating system. Most OS vendors are just barely beginning to ship Python 2.6 – even fewer are shipping Python 3.x.</p> <p>As it is expected that Python 2.7 be the effective “end of life” of the Python 2.x code line, with Python 3.x being the future, it is in the best interest of Python core development to temporarily suspend the alteration of the language itself to allow all of these external entities to catch up and to assist in the adoption of, and migration to, Python 3.x</p> <p>Finally, the moratorium is intended to free up cycles within core development to focus on other issues, such as the CPython interpreter and improvements therein, the standard library, etc.</p> <p>This moratorium does not allow for exceptions – once accepted, any pending changes to the syntax or semantics of the language will be postponed until the moratorium is lifted.</p> <p>This moratorium does not attempt to apply to any other Python implementation meaning that if desired other implementations may add features which deviate from the standard implementation.</p> </section> <section id="details"> <h2><a class="toc-backref" href="#details" role="doc-backlink">Details</a></h2> <section id="cannot-change"> <h3><a class="toc-backref" href="#cannot-change" role="doc-backlink">Cannot Change</a></h3> <ul class="simple"> <li>New built-ins</li> <li><dl class="simple"> <dt>Language syntax</dt><dd>The grammar file essentially becomes immutable apart from ambiguity fixes.</dd> </dl> </li> <li><dl class="simple"> <dt>General language semantics</dt><dd>The language operates as-is with only specific exemptions (see below).</dd> </dl> </li> <li><dl class="simple"> <dt>New __future__ imports</dt><dd>These are explicitly forbidden, as they effectively change the language syntax and/or semantics (albeit using a compiler directive).</dd> </dl> </li> </ul> </section> <section id="case-by-case-exemptions"> <h3><a class="toc-backref" href="#case-by-case-exemptions" role="doc-backlink">Case-by-Case Exemptions</a></h3> <ul class="simple"> <li><dl class="simple"> <dt>New methods on built-ins</dt><dd>The case for adding a method to a built-in object can be made.</dd> </dl> </li> <li><dl class="simple"> <dt>Incorrect language semantics</dt><dd>If the language semantics turn out to be ambiguous or improperly implemented based on the intention of the original design then the semantics may change.</dd> </dl> </li> <li><dl class="simple"> <dt>Language semantics that are difficult to implement</dt><dd>Because other VMs have not begun implementing Python 3.x semantics there is a possibility that certain semantics are too difficult to replicate. In those cases they can be changed to ease adoption of Python 3.x by the other VMs.</dd> </dl> </li> </ul> </section> <section id="allowed-to-change"> <h3><a class="toc-backref" href="#allowed-to-change" role="doc-backlink">Allowed to Change</a></h3> <ul class="simple"> <li><dl class="simple"> <dt>C API</dt><dd>It is entirely acceptable to change the underlying C code of CPython as long as other restrictions of this moratorium are not broken. E.g. removing the GIL would be fine assuming certain operations that are currently atomic remain atomic.</dd> </dl> </li> <li><dl class="simple"> <dt>The standard library</dt><dd>As the standard library is not directly tied to the language definition it is not covered by this moratorium.</dd> </dl> </li> <li><dl class="simple"> <dt>Backports of 3.x features to 2.x</dt><dd>The moratorium only affects features that would be new in 3.x.</dd> </dl> </li> <li><dl class="simple"> <dt>Import semantics</dt><dd>For example, <a class="pep reference internal" href="../pep-0382/" title="PEP 382 – Namespace Packages">PEP 382</a>. After all, import semantics vary between Python implementations anyway.</dd> </dl> </li> </ul> </section> </section> <section id="retroactive"> <h2><a class="toc-backref" href="#retroactive" role="doc-backlink">Retroactive</a></h2> <p>It is important to note that the moratorium covers all changes since the release of Python 3.1. This rule is intended to avoid features being rushed or smuggled into the CPython source tree while the moratorium is being discussed. A review of the NEWS file for the py3k development branch showed no commits would need to be rolled back in order to meet this goal.</p> </section> <section id="extensions"> <h2><a class="toc-backref" href="#extensions" role="doc-backlink">Extensions</a></h2> <p>The time period of the moratorium can only be extended through a new PEP.</p> </section> <section id="copyright"> <h2><a class="toc-backref" href="#copyright" role="doc-backlink">Copyright</a></h2> <p>This document has been placed in the public domain.</p> </section> <section id="references"> <h2><a class="toc-backref" href="#references" role="doc-backlink">References</a></h2> <aside class="footnote-list brackets"> <aside class="footnote brackets" id="id6" role="doc-footnote"> <dt class="label" id="id6">[<a href="#id1">1</a>]</dt> <dd><a class="reference external" href="https://mail.python.org/pipermail/python-ideas/2009-October/006305.html">https://mail.python.org/pipermail/python-ideas/2009-October/006305.html</a></aside> <aside class="footnote brackets" id="id7" role="doc-footnote"> <dt class="label" id="id7">[<a href="#id2">2</a>]</dt> <dd><a class="reference external" href="http://www.jython.org/">http://www.jython.org/</a></aside> <aside class="footnote brackets" id="id8" role="doc-footnote"> <dt class="label" id="id8">[<a href="#id3">3</a>]</dt> <dd><a class="reference external" href="http://www.codeplex.com/IronPython">http://www.codeplex.com/IronPython</a></aside> <aside class="footnote brackets" id="id9" role="doc-footnote"> <dt class="label" id="id9">[<a href="#id4">4</a>]</dt> <dd><a class="reference external" href="http://codespeak.net/pypy/">http://codespeak.net/pypy/</a></aside> <aside class="footnote brackets" id="id10" role="doc-footnote"> <dt class="label" id="id10">[<a href="#id5">5</a>]</dt> <dd><a class="reference external" href="http://code.google.com/p/unladen-swallow/">http://code.google.com/p/unladen-swallow/</a></aside> </aside> </section> </section> <hr class="docutils" /> <p>Source: <a class="reference external" href="https://github.com/python/peps/blob/main/peps/pep-3003.rst">https://github.com/python/peps/blob/main/peps/pep-3003.rst</a></p> <p>Last modified: <a class="reference external" href="https://github.com/python/peps/commits/main/peps/pep-3003.rst">2025-02-01 08:59:27 GMT</a></p> </article> <nav id="pep-sidebar"> <h2>Contents</h2> <ul> <li><a class="reference internal" href="#abstract">Abstract</a></li> <li><a class="reference internal" href="#rationale">Rationale</a></li> <li><a class="reference internal" href="#details">Details</a><ul> <li><a class="reference internal" href="#cannot-change">Cannot Change</a></li> <li><a class="reference internal" href="#case-by-case-exemptions">Case-by-Case Exemptions</a></li> <li><a class="reference internal" href="#allowed-to-change">Allowed to Change</a></li> </ul> </li> <li><a class="reference internal" href="#retroactive">Retroactive</a></li> <li><a class="reference internal" href="#extensions">Extensions</a></li> <li><a class="reference internal" href="#copyright">Copyright</a></li> <li><a class="reference internal" href="#references">References</a></li> </ul> <br> <a id="source" href="https://github.com/python/peps/blob/main/peps/pep-3003.rst">Page Source (GitHub)</a> </nav> </section> <script src="../_static/colour_scheme.js"></script> <script src="../_static/wrap_tables.js"></script> <script src="../_static/sticky_banner.js"></script> </body> </html>

Pages: 1 2 3 4 5 6 7 8 9 10