Skip to content

gh-93626: Set the release for __future__.annotations to None #93628

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jul 5, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions Doc/whatsnew/3.11.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
======================

Expand Down
6 changes: 3 additions & 3 deletions Lib/__future__.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
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().
Expand Down Expand Up @@ -96,7 +96,7 @@ def getMandatoryRelease(self):
"""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

Expand Down Expand Up @@ -143,5 +143,5 @@ def __repr__(self):
CO_FUTURE_GENERATOR_STOP)

annotations = _Feature((3, 7, 0, "beta", 1),
(3, 11, 0, "alpha", 0),
None,
CO_FUTURE_ANNOTATIONS)
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Set ``__future__.annotations`` to have a ``None`` mandatoryRelease to indicate that it is currently 'TBD'.