You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
PEP 563 and annotations __future__ mandatory version #85486
The PEP was accepted apparently by Guido sometime after the second posting 21-Nov-2017. Guido added the annotations entry to __future__ on 1/26/2018 with the 'mandatory' version changed to 4.0, which means 'some indefinite undecided future version'. I consider '4.0' to the intentional and definitive until Guido or Lucasz say otherwise.
When PEP implementations differ from the PEP, we do not usually go back and revise the PEP. The implementation rules unless clearly buggy.
In general, "4.0" means "never", and for some deprecations that seems totally appropriate. I wouldn't worry about it. I'm closing this issue now that all three PRs have been merged. Thanks for your contribution!
Activity
wyz23x2 commentedon Jul 16, 2020
In https://docs.python.org/3/library/__future__.html:
annotations | 3.7.0b1 | *4.0* | PEP-563: Postponed evaluation of annotations
In PEP-563:
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.
Python 4.0 or 3.10? Not clear.
terryjreedy commentedon Jul 18, 2020
The PEP was accepted apparently by Guido sometime after the second posting 21-Nov-2017. Guido added the annotations entry to __future__ on 1/26/2018 with the 'mandatory' version changed to 4.0, which means 'some indefinite undecided future version'. I consider '4.0' to the intentional and definitive until Guido or Lucasz say otherwise.
When PEP implementations differ from the PEP, we do not usually go back and revise the PEP. The implementation rules unless clearly buggy.
15 remaining items
gvanrossum commentedon Jul 25, 2020
Waiting for someone to submit a PR.
miss-islington commentedon Jul 25, 2020
New changeset 0028c14 by YoSTEALTH in branch 'master':
bpo-41314: fixed annotations __future__ version (GH-21616)
0028c14
gvanrossum commentedon Jul 25, 2020
@ned This will need your assistance to merge the 3.7 backport IIUC.
gvanrossum commentedon Jul 25, 2020
Never mind, Miss Islington failed to backport to 3.7, so let's forget about that.
YoSTEALTH commentedon Jul 25, 2020
@gvanrossum I found couple of odd places where 4.0 is mentioned like https://docs.python.org/3/library/array.html for example, should a new issue be created? I am not sure how many more there are.
miss-islington commentedon Jul 25, 2020
New changeset b99f770 by Miss Islington (bot) in branch '3.8':
bpo-41314: fixed annotations __future__ version (GH-21616)
b99f770
miss-islington commentedon Jul 25, 2020
New changeset fdc91c2 by Miss Islington (bot) in branch '3.9':
bpo-41314: fixed annotations __future__ version (GH-21616)
fdc91c2
gvanrossum commentedon Jul 25, 2020
In general, "4.0" means "never", and for some deprecations that seems totally appropriate. I wouldn't worry about it. I'm closing this issue now that all three PRs have been merged. Thanks for your contribution!