Skip to content
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

PEP 563: Correct references to 3.10 default adoption #2086

Merged
merged 3 commits into from
Sep 25, 2021
Merged
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
13 changes: 8 additions & 5 deletions pep-0563.rst
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ This PEP proposes changing function annotations and variable annotations
so that they are no longer evaluated at function definition time.
Instead, they are preserved in ``__annotations__`` in string form.

This change is going to be introduced gradually, starting with a new
This change is being introduced gradually, starting with a
``__future__`` import in Python 3.7.


Expand All @@ -45,6 +45,8 @@ hinting use case:
computationally free.

Postponing the evaluation of annotations solves both problems.
NOTE: PEP 649 proposes an alternative solution to the above issues,
putting this PEP in danger of being superceded.

Non-goals
---------
Expand Down Expand Up @@ -85,7 +87,7 @@ aforementioned PEPs should be considered deprecated.
Implementation
==============

In Python 3.10, function and variable annotations will no longer be
With this PEP, function and variable annotations will no longer be
evaluated at definition time. Instead, a string form will be preserved
in the respective ``__annotations__`` dictionary. Static type checkers
will see no difference in behavior, whereas tools using annotations at
Expand Down Expand Up @@ -283,9 +285,10 @@ Deprecation policy
Starting with Python 3.7, a ``__future__`` import is required to use the
described functionality. No warnings are raised.

In Python 3.10 this will become the default behavior. Use of annotations
incompatible with this PEP is no longer supported.

NOTE: Whether this will eventually become the default behavior is currently unclear
pending decision on PEP 649. In any case, use of annotations that depend upon
their eager evaluation is incompatible with both proposals and is no longer
supported.

Forward References
==================
Expand Down