summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2022-07-05 09:16:32 (GMT)
committerGitHub <noreply@github.com>2022-07-05 09:16:32 (GMT)
commit99a06685d4034a9b3d4dd898292926932168d94d (patch)
tree55a19312de3407c9135e572169468f4c1d9e4859
parent68f5fa668343341b79ce1e23f1d9e773b98fd312 (diff)
downloadcpython-99a06685d4034a9b3d4dd898292926932168d94d.zip
cpython-99a06685d4034a9b3d4dd898292926932168d94d.tar.gz
cpython-99a06685d4034a9b3d4dd898292926932168d94d.tar.bz2
gh-93626: Set the release for `__future__.annotations` to `None` (GH-93628) (GH-94553)
Co-authored-by: Guido van Rossum <gvanrossum@gmail.com> (cherry picked from commit 4791a8a8357e67431cb686d9559aa419074b8e33) Co-authored-by: KotlinIsland <65446343+KotlinIsland@users.noreply.github.com>
-rw-r--r--Doc/whatsnew/3.11.rst7
-rw-r--r--Lib/__future__.py6
-rw-r--r--Misc/NEWS.d/next/Library/2022-06-09-14-44-21.gh-issue-93626.sfghs46.rst1
3 files changed, 11 insertions, 3 deletions
diff --git a/Doc/whatsnew/3.11.rst b/Doc/whatsnew/3.11.rst
index 0aa4429..eacd4c4 100644
--- a/Doc/whatsnew/3.11.rst
+++ b/Doc/whatsnew/3.11.rst
@@ -336,6 +336,13 @@ See :pep:`681` for more details.
(Contributed by Jelle Zijlstra in :gh:`91860`. PEP written by
Erik De Bonte and Eric Traut.)
+PEP 563 May Not Be the Future
+-----------------------------
+
+* :pep:`563` Postponed Evaluation of Annotations, ``__future__.annotations``
+ that was planned for this release has been indefinitely postponed.
+ See `this message <https://mail.python.org/archives/list/python-dev@python.org/message/VIZEBX5EYMSYIJNDBF6DMUMZOCWHARSO/>`_ for more information.
+
Other Language Changes
======================
diff --git a/Lib/__future__.py b/Lib/__future__.py
index 97dc90c..39720a5 100644
--- a/Lib/__future__.py
+++ b/Lib/__future__.py
@@ -33,7 +33,7 @@ in releases at or after that, modules no longer need
to use the feature in question, but may continue to use such imports.
MandatoryRelease may also be None, meaning that a planned feature got
-dropped.
+dropped or that the release version is undetermined.
Instances of class _Feature have two corresponding methods,
.getOptionalRelease() and .getMandatoryRelease().
@@ -96,7 +96,7 @@ class _Feature:
"""Return release in which this feature will become mandatory.
This is a 5-tuple, of the same form as sys.version_info, or, if
- the feature was dropped, is None.
+ the feature was dropped, or the release date is undetermined, is None.
"""
return self.mandatory
@@ -143,5 +143,5 @@ generator_stop = _Feature((3, 5, 0, "beta", 1),
CO_FUTURE_GENERATOR_STOP)
annotations = _Feature((3, 7, 0, "beta", 1),
- (3, 11, 0, "alpha", 0),
+ None,
CO_FUTURE_ANNOTATIONS)
diff --git a/Misc/NEWS.d/next/Library/2022-06-09-14-44-21.gh-issue-93626.sfghs46.rst b/Misc/NEWS.d/next/Library/2022-06-09-14-44-21.gh-issue-93626.sfghs46.rst
new file mode 100644
index 0000000..c6fa103
--- /dev/null
+++ b/Misc/NEWS.d/next/Library/2022-06-09-14-44-21.gh-issue-93626.sfghs46.rst
@@ -0,0 +1 @@
+Set ``__future__.annotations`` to have a ``None`` mandatoryRelease to indicate that it is currently 'TBD'.