python-peps/pep-0404/index.html

296 lines
18 KiB
HTML
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!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 404 Python 2.8 Un-release Schedule | peps.python.org</title>
<link rel="shortcut icon" href="../_static/py.png">
<link rel="canonical" href="https://peps.python.org/pep-0404/">
<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 404 Python 2.8 Un-release Schedule | peps.python.org'>
<meta property="og:description" content="This document describes the un-development and un-release schedule for Python 2.8.">
<meta property="og:type" content="website">
<meta property="og:url" content="https://peps.python.org/pep-0404/">
<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 document describes the un-development and un-release schedule for Python 2.8.">
<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 404</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 404 Python 2.8 Un-release Schedule</h1>
<dl class="rfc2822 field-list simple">
<dt class="field-odd">Author<span class="colon">:</span></dt>
<dd class="field-odd">Barry Warsaw &lt;barry&#32;&#97;t&#32;python.org&gt;</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="Non-normative PEP containing background, guidelines or other information relevant to the Python ecosystem">Informational</abbr></dd>
<dt class="field-even">Topic<span class="colon">:</span></dt>
<dd class="field-even"><a class="reference external" href="../topic/release/">Release</a></dd>
<dt class="field-odd">Created<span class="colon">:</span></dt>
<dd class="field-odd">09-Nov-2011</dd>
<dt class="field-even">Python-Version<span class="colon">:</span></dt>
<dd class="field-even">2.8</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="#un-release-manager-and-crew">Un-release Manager and Crew</a></li>
<li><a class="reference internal" href="#un-release-schedule">Un-release Schedule</a></li>
<li><a class="reference internal" href="#official-pronouncement">Official pronouncement</a></li>
<li><a class="reference internal" href="#upgrade-path">Upgrade path</a></li>
<li><a class="reference internal" href="#and-now-for-something-completely-different">And Now For Something Completely Different</a><ul>
<li><a class="reference internal" href="#strings-and-bytes">Strings and bytes</a></li>
<li><a class="reference internal" href="#numbers">Numbers</a></li>
<li><a class="reference internal" href="#classes">Classes</a></li>
<li><a class="reference internal" href="#multiple-spellings">Multiple spellings</a></li>
<li><a class="reference internal" href="#imports">Imports</a></li>
<li><a class="reference internal" href="#iterators-and-views">Iterators and views</a></li>
</ul>
</li>
<li><a class="reference internal" href="#copyright">Copyright</a></li>
</ul>
</details></section>
<section id="abstract">
<h2><a class="toc-backref" href="#abstract" role="doc-backlink">Abstract</a></h2>
<p>This document describes the un-development and un-release schedule for Python
2.8.</p>
</section>
<section id="un-release-manager-and-crew">
<h2><a class="toc-backref" href="#un-release-manager-and-crew" role="doc-backlink">Un-release Manager and Crew</a></h2>
<table class="docutils align-default">
<thead>
<tr class="row-odd"><th class="head">Position</th>
<th class="head">Name</th>
</tr>
</thead>
<tbody>
<tr class="row-even"><td>2.8 Un-release Manager</td>
<td>Cardinal Biggles</td>
</tr>
</tbody>
</table>
</section>
<section id="un-release-schedule">
<h2><a class="toc-backref" href="#un-release-schedule" role="doc-backlink">Un-release Schedule</a></h2>
<p>The current un-schedule is:</p>
<ul class="simple">
<li>2.8 final Never</li>
</ul>
</section>
<section id="official-pronouncement">
<h2><a class="toc-backref" href="#official-pronouncement" role="doc-backlink">Official pronouncement</a></h2>
<p>Rule number six: there is <em>no</em> official Python 2.8 release. There never will
be an official Python 2.8 release. It is an ex-release. Python 2.7
is the end of the Python 2 line of development.</p>
</section>
<section id="upgrade-path">
<h2><a class="toc-backref" href="#upgrade-path" role="doc-backlink">Upgrade path</a></h2>
<p>The official upgrade path from Python 2.7 is to Python 3.</p>
</section>
<section id="and-now-for-something-completely-different">
<h2><a class="toc-backref" href="#and-now-for-something-completely-different" role="doc-backlink">And Now For Something Completely Different</a></h2>
<p>In all seriousness, there are important reasons why there wont be an
official Python 2.8 release, and why you should plan to migrate
instead to Python 3.</p>
<p>Python is (as of this writing) more than 20 years old, and Guido and the
community have learned a lot in those intervening years. Guidos
original concept for Python 3 was to make changes to the language
primarily to remove the warts that had grown in the preceding
versions. Python 3 was not to be a complete redesign, but instead an
evolution of the language, and while maintaining full backward
compatibility with Python 2 was explicitly off-the-table, neither were
gratuitous changes in syntax or semantics acceptable. In most cases,
Python 2 code can be translated fairly easily to Python 3, sometimes
entirely mechanically by such tools as <a class="reference external" href="http://docs.python.org/library/2to3.html">2to3</a> (theres also a non-trivial
subset of the language that will run without modification on both 2.7 and
3.x).</p>
<p>Because maintaining multiple versions of Python is a significant drag
on the resources of the Python developers, and because the
improvements to the language and libraries embodied in Python 3 are so
important, it was decided to end the Python 2 lineage with Python
2.7. Thus, all new development occurs in the Python 3 line of
development, and there will never be an official Python 2.8 release.
Python 2.7 will however be maintained for longer than the usual period
of time.</p>
<p>Here are some highlights of the significant improvements in Python 3.
You can read in more detail on the <a class="reference external" href="http://docs.python.org/release/3.0.1/whatsnew/3.0.html">differences</a> between Python 2 and
Python 3. There are also many good guides on <a class="reference external" href="http://python3porting.com/">porting</a> from Python 2
to Python 3.</p>
<section id="strings-and-bytes">
<h3><a class="toc-backref" href="#strings-and-bytes" role="doc-backlink">Strings and bytes</a></h3>
<p>Python 2s basic original strings are called 8-bit strings, and
they play a dual role in Python 2 as both ASCII text and as byte
sequences. While Python 2 also has a unicode string type, the
fundamental ambiguity of the core string type, coupled with Python 2s
default behavior of supporting automatic coercion from 8-bit strings
to unicode objects when the two are combined, often leads to
<code class="docutils literal notranslate"><span class="pre">UnicodeError</span></code>s. Python 3s standard string type is Unicode based, and
Python 3 adds a dedicated bytes type, but critically, no automatic coercion
between bytes and unicode strings is provided. The closest the language gets
to implicit coercion are a few text-based APIs that assume a default
encoding (usually UTF-8) if no encoding is explicitly stated. Thus, the core
interpreter, its I/O libraries, module names, etc. are clear in their
distinction between unicode strings and bytes. Python 3s unicode
support even extends to the filesystem, so that non-ASCII file names are
natively supported.</p>
<p>This string/bytes clarity is often a source of difficulty in
transitioning existing code to Python 3, because many third party
libraries and applications are themselves ambiguous in this
distinction. Once migrated though, most <code class="docutils literal notranslate"><span class="pre">UnicodeError</span></code>s can be
eliminated.</p>
</section>
<section id="numbers">
<h3><a class="toc-backref" href="#numbers" role="doc-backlink">Numbers</a></h3>
<p>Python 2 has two basic integer types, a native machine-sized <code class="docutils literal notranslate"><span class="pre">int</span></code>
type, and an arbitrary length <code class="docutils literal notranslate"><span class="pre">long</span></code> type. These have been merged in
Python 3 into a single <code class="docutils literal notranslate"><span class="pre">int</span></code> type analogous to Python 2s <code class="docutils literal notranslate"><span class="pre">long</span></code>
type.</p>
<p>In addition, integer division now produces floating point numbers for
non-integer results.</p>
</section>
<section id="classes">
<h3><a class="toc-backref" href="#classes" role="doc-backlink">Classes</a></h3>
<p>Python 2 has two core class hierarchies, often called <em>classic
classes</em> and <em>new-style classes</em>. The latter allow for such things as
inheriting from the builtin basic types, support descriptor based tools
like the <code class="docutils literal notranslate"><span class="pre">property</span></code> builtin and provide a generally more sane and coherent
system for dealing with multiple inheritance. Python 3 provided the
opportunity to completely drop support for classic classes, so all classes
in Python 3 automatically use the new-style semantics (although thats a
misnomer now). There is no need to explicitly inherit from <code class="docutils literal notranslate"><span class="pre">object</span></code> or set
the default metatype to enable them (in fact, setting a default metatype at
the module level is no longer supported - the default metatype is always
<code class="docutils literal notranslate"><span class="pre">object</span></code>).</p>
<p>The mechanism for explicitly specifying a metaclass has also changed to use
a <code class="docutils literal notranslate"><span class="pre">metaclass</span></code> keyword argument in the class header line rather than a
<code class="docutils literal notranslate"><span class="pre">__metaclass__</span></code> magic attribute in the class body.</p>
</section>
<section id="multiple-spellings">
<h3><a class="toc-backref" href="#multiple-spellings" role="doc-backlink">Multiple spellings</a></h3>
<p>There are many cases in Python 2 where multiple spellings of some
constructs exist, such as <code class="docutils literal notranslate"><span class="pre">repr()</span></code> and <em>backticks</em>, or the two
inequality operators <code class="docutils literal notranslate"><span class="pre">!=</span></code> and <code class="docutils literal notranslate"><span class="pre">&lt;&gt;</span></code>. In all cases, Python 3 has chosen
exactly one spelling and removed the other (e.g. <code class="docutils literal notranslate"><span class="pre">repr()</span></code> and <code class="docutils literal notranslate"><span class="pre">!=</span></code>
were kept).</p>
</section>
<section id="imports">
<h3><a class="toc-backref" href="#imports" role="doc-backlink">Imports</a></h3>
<p>In Python 3, implicit relative imports within packages are no longer
available - only absolute imports and explicit relative imports are
supported. In addition, star imports (e.g. <code class="docutils literal notranslate"><span class="pre">from</span> <span class="pre">x</span> <span class="pre">import</span> <span class="pre">*</span></code>) are only
permitted in module level code.</p>
<p>Also, some areas of the standard library have been reorganized to make
the naming scheme more intuitive. Some rarely used builtins have been
relocated to standard library modules.</p>
</section>
<section id="iterators-and-views">
<h3><a class="toc-backref" href="#iterators-and-views" role="doc-backlink">Iterators and views</a></h3>
<p>Many APIs, which in Python 2 returned concrete lists, in Python 3 now
return iterators or lightweight <em>views</em>.</p>
</section>
</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>
<hr class="docutils" />
<p>Source: <a class="reference external" href="https://github.com/python/peps/blob/main/peps/pep-0404.rst">https://github.com/python/peps/blob/main/peps/pep-0404.rst</a></p>
<p>Last modified: <a class="reference external" href="https://github.com/python/peps/commits/main/peps/pep-0404.rst">2023-09-09 17:39:29 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="#un-release-manager-and-crew">Un-release Manager and Crew</a></li>
<li><a class="reference internal" href="#un-release-schedule">Un-release Schedule</a></li>
<li><a class="reference internal" href="#official-pronouncement">Official pronouncement</a></li>
<li><a class="reference internal" href="#upgrade-path">Upgrade path</a></li>
<li><a class="reference internal" href="#and-now-for-something-completely-different">And Now For Something Completely Different</a><ul>
<li><a class="reference internal" href="#strings-and-bytes">Strings and bytes</a></li>
<li><a class="reference internal" href="#numbers">Numbers</a></li>
<li><a class="reference internal" href="#classes">Classes</a></li>
<li><a class="reference internal" href="#multiple-spellings">Multiple spellings</a></li>
<li><a class="reference internal" href="#imports">Imports</a></li>
<li><a class="reference internal" href="#iterators-and-views">Iterators and views</a></li>
</ul>
</li>
<li><a class="reference internal" href="#copyright">Copyright</a></li>
</ul>
<br>
<a id="source" href="https://github.com/python/peps/blob/main/peps/pep-0404.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>