This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: PEP 563 and annotations __future__ mandatory version
Type: Stage: resolved
Components: Documentation, Library (Lib) Versions: Python 3.10, Python 3.9, Python 3.8
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: docs@python Nosy List: YoSTEALTH, docs@python, gvanrossum, lukasz.langa, miss-islington, ned.deily, terry.reedy, wyz23x2
Priority: normal Keywords: patch

Created on 2020-07-16 10:34 by wyz23x2, last changed 2022-04-11 14:59 by admin. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 21616 merged YoSTEALTH, 2020-07-25 18:23
PR 21620 merged miss-islington, 2020-07-25 21:43
PR 21621 merged miss-islington, 2020-07-25 21:43
Messages (12)
msg373753 - (view) Author: wyz23x2 (wyz23x2) * Date: 2020-07-16 10:34
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.
msg373872 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2020-07-18 05:49
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.
msg373907 - (view) Author: Guido van Rossum (gvanrossum) * (Python committer) Date: 2020-07-18 15:13
The PEP now says 3.10, so the docs for __future__ should be fixed.
msg374271 - (view) Author: wyz23x2 (wyz23x2) * Date: 2020-07-25 15:32
Ping?
msg374272 - (view) Author: Guido van Rossum (gvanrossum) * (Python committer) Date: 2020-07-25 16:07
Waiting for someone to submit a PR.
msg374283 - (view) Author: miss-islington (miss-islington) Date: 2020-07-25 21:43
New changeset 0028c14073109595e7532ec00bb1e8bf39ecfb4d by YoSTEALTH in branch 'master':
bpo-41314: fixed annotations __future__ version (GH-21616)
https://github.com/python/cpython/commit/0028c14073109595e7532ec00bb1e8bf39ecfb4d
msg374284 - (view) Author: Guido van Rossum (gvanrossum) * (Python committer) Date: 2020-07-25 21:44
@ned This will need your assistance to merge the 3.7 backport IIUC.
msg374285 - (view) Author: Guido van Rossum (gvanrossum) * (Python committer) Date: 2020-07-25 21:46
Never mind, Miss Islington failed to backport to 3.7, so let's forget about that.
msg374287 - (view) Author: (YoSTEALTH) * Date: 2020-07-25 21:57
@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.
msg374289 - (view) Author: miss-islington (miss-islington) Date: 2020-07-25 22:00
New changeset b99f770230e0db390aa80c5135b1053f3be48e19 by Miss Islington (bot) in branch '3.8':
bpo-41314: fixed annotations __future__ version (GH-21616)
https://github.com/python/cpython/commit/b99f770230e0db390aa80c5135b1053f3be48e19
msg374290 - (view) Author: miss-islington (miss-islington) Date: 2020-07-25 22:00
New changeset fdc91c2e6096f60ddb8b7f72fe7926ccbbf42800 by Miss Islington (bot) in branch '3.9':
bpo-41314: fixed annotations __future__ version (GH-21616)
https://github.com/python/cpython/commit/fdc91c2e6096f60ddb8b7f72fe7926ccbbf42800
msg374292 - (view) Author: Guido van Rossum (gvanrossum) * (Python committer) Date: 2020-07-25 22:12
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!
History
Date User Action Args
2022-04-11 14:59:33adminsetgithub: 85486
2020-07-25 22:12:13gvanrossumsetstatus: open -> closed
resolution: fixed
messages: + msg374292

stage: patch review -> resolved
2020-07-25 22:00:51miss-islingtonsetmessages: + msg374290
2020-07-25 22:00:23miss-islingtonsetmessages: + msg374289
2020-07-25 21:57:53YoSTEALTHsetmessages: + msg374287
2020-07-25 21:46:11gvanrossumsetmessages: + msg374285
versions: - Python 3.7
2020-07-25 21:44:13gvanrossumsetnosy: + ned.deily
messages: + msg374284
2020-07-25 21:43:09miss-islingtonsetpull_requests: + pull_request20762
2020-07-25 21:43:02miss-islingtonsetpull_requests: + pull_request20761
2020-07-25 21:43:01miss-islingtonsetnosy: + miss-islington
messages: + msg374283
2020-07-25 19:00:49YoSTEALTHsetversions: + Python 3.7
2020-07-25 18:23:01YoSTEALTHsetkeywords: + patch
nosy: + YoSTEALTH

pull_requests: + pull_request20758
stage: resolved -> patch review
2020-07-25 16:07:12gvanrossumsetmessages: + msg374272
2020-07-25 15:32:38wyz23x2setmessages: + msg374271
2020-07-18 15:13:11gvanrossumsetstatus: closed -> open
resolution: not a bug -> (no value)
messages: + msg373907
2020-07-18 05:49:26terry.reedysetstatus: open -> closed


title: __future__ doc and PEP 563 conflict -> PEP 563 and annotations __future__ mandatory version
nosy: + gvanrossum, terry.reedy, lukasz.langa
versions: + Python 3.8, Python 3.9, - Python 3.7
messages: + msg373872
resolution: not a bug
stage: resolved
2020-07-18 02:53:07wyz23x2setcomponents: + Library (Lib)
2020-07-16 10:34:59wyz23x2setassignee: docs@python

nosy: + docs@python
components: + Documentation
versions: + Python 3.7, Python 3.10
2020-07-16 10:34:24wyz23x2create