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: from __future__ import annotations is not mandatory in 3.11.0a1+
Type: behavior Stage: resolved
Components: Installation Versions: Python 3.11
process
Status: closed Resolution: duplicate
Dependencies: Superseder:
Assigned To: Nosy List: Crowthebird, steven.daprano
Priority: normal Keywords:

Created on 2021-10-17 04:50 by Crowthebird, last changed 2022-04-11 14:59 by admin. This issue is now closed.

Messages (4)
msg404125 - (view) Author: Jeremiah Gabriel Pascual (Crowthebird) * Date: 2021-10-17 04:50
>>> import sys
>>> import __future__
>>> __future__.annotations
_Feature((3, 7, 0, 'beta', 1), (3, 11, 0, 'alpha', 0), 16777216)
>>> sys.version_info
sys.version_info(major=3, minor=11, micro=0, releaselevel='alpha', serial=1)
>>> sys.version_info > __future__.annotations.mandatory
True
>>> sys.version_info >= __future__.annotations.mandatory
True

Why is it still not automatically inside python 3.11.0a1?
msg404126 - (view) Author: Jeremiah Gabriel Pascual (Crowthebird) * Date: 2021-10-17 04:52
test case:
>>> a: A = 'test'
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
NameError: name 'A' is not defined. Did you mean: 'a'?
msg404127 - (view) Author: Steven D'Aprano (steven.daprano) * (Python committer) Date: 2021-10-17 05:30
> Why is it still not automatically inside python 3.11.0a1?

Probably because this is the .0a1 version, and making it mandatory just hasn't been done yet. The developers are only human and can't do everything instantly.
msg404128 - (view) Author: Steven D'Aprano (steven.daprano) * (Python committer) Date: 2021-10-17 05:34
Duplicate: #38605
History
Date User Action Args
2022-04-11 14:59:51adminsetgithub: 89662
2021-10-17 05:34:30steven.dapranosetstatus: open -> closed
resolution: duplicate
stage: resolved
2021-10-17 05:34:10steven.dapranosetmessages: + msg404128
2021-10-17 05:30:27steven.dapranosetnosy: + steven.daprano
messages: + msg404127
2021-10-17 04:52:54Crowthebirdsetmessages: + msg404126
2021-10-17 04:50:55Crowthebirdcreate