Repository navigation
PEP 563 and annotations __future__ mandatory version #85486
Description
Activity
In https://docs.python.org/3/library/__future__.html:
annotations | 3.7.0b1 | *4.0* | PEP-563: Postponed evaluation of annotationsIn 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.
- addeddocsDocumentation in the Doc dirDocumentation in the Doc dir3.7 (EOL)end of lifeend of life3.10 (EOL)end of lifeend of life
on Jul 16, 2020 - addeddocsDocumentation in the Doc dirDocumentation in the Doc dir3.7 (EOL)end of lifeend of life3.10 (EOL)end of lifeend of life
on Jul 16, 2020 - addedstdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directory
on 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.
- added3.8 (EOL)end of lifeend of life3.9 (EOL)end of lifeend of lifeand removed3.7 (EOL)end of lifeend of life
on Jul 18, 2020 15 remaining items
Waiting for someone to submit a PR.
@ned This will need your assistance to merge the 3.7 backport IIUC.
Never mind, Miss Islington failed to backport to 3.7, so let's forget about that.
@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.
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!
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields: