Make `from __future__ import annotations` the default in Python 3.10 (#1371)

This commit is contained in:
Łukasz Langa 2020-05-19 00:32:25 +02:00 committed by GitHub
parent fb7c1aa82b
commit 7c65046e88
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 7 deletions

View File

@ -280,13 +280,7 @@ Deprecation policy
Starting with Python 3.7, a ``__future__`` import is required to use the
described functionality. No warnings are raised.
In Python 3.8 a ``PendingDeprecationWarning`` is raised by the
compiler in the presence of type annotations in modules without the
``__future__`` import.
Starting with Python 3.9 the warning becomes a ``DeprecationWarning``.
In Python 4.0 this will become the default behavior. Use of annotations
In Python 3.10 this will become the default behavior. Use of annotations
incompatible with this PEP is no longer supported.