diff options
author | Pablo Galindo Salgado <Pablogsal@gmail.com> | 2023-07-26 15:34:15 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-07-26 15:34:15 (GMT) |
commit | da8f87b7ea421894c41dfc37f578e03409c5d280 (patch) | |
tree | b48f7099f287b2269a25ab7476fae45c06182f05 /Doc/library | |
parent | b0202a4e5d6b629ba5acbc703e950f08ebaf07df (diff) | |
download | cpython-da8f87b7ea421894c41dfc37f578e03409c5d280.zip cpython-da8f87b7ea421894c41dfc37f578e03409c5d280.tar.gz cpython-da8f87b7ea421894c41dfc37f578e03409c5d280.tar.bz2 |
gh-107015: Remove async_hacks from the tokenizer (#107018)
Diffstat (limited to 'Doc/library')
-rw-r--r-- | Doc/library/ast.rst | 5 | ||||
-rw-r--r-- | Doc/library/token-list.inc | 4 | ||||
-rw-r--r-- | Doc/library/token.rst | 10 |
3 files changed, 11 insertions, 8 deletions
diff --git a/Doc/library/ast.rst b/Doc/library/ast.rst index 530cf30..cd657ae 100644 --- a/Doc/library/ast.rst +++ b/Doc/library/ast.rst @@ -2146,7 +2146,7 @@ and classes for traversing abstract syntax trees: Currently ``major`` must equal to ``3``. For example, setting ``feature_version=(3, 4)`` will allow the use of ``async`` and ``await`` as variable names. The lowest supported version is - ``(3, 4)``; the highest is ``sys.version_info[0:2]``. + ``(3, 7)``; the highest is ``sys.version_info[0:2]``. If source contains a null character ('\0'), :exc:`ValueError` is raised. @@ -2169,6 +2169,9 @@ and classes for traversing abstract syntax trees: .. versionchanged:: 3.8 Added ``type_comments``, ``mode='func_type'`` and ``feature_version``. + .. versionchanged:: 3.13 + The minimum supported version for feature_version is now (3,7) + .. function:: unparse(ast_obj) diff --git a/Doc/library/token-list.inc b/Doc/library/token-list.inc index e885de8..39df292 100644 --- a/Doc/library/token-list.inc +++ b/Doc/library/token-list.inc @@ -207,10 +207,6 @@ .. data:: OP -.. data:: AWAIT - -.. data:: ASYNC - .. data:: TYPE_IGNORE .. data:: TYPE_COMMENT diff --git a/Doc/library/token.rst b/Doc/library/token.rst index 903847b..e6dc37d 100644 --- a/Doc/library/token.rst +++ b/Doc/library/token.rst @@ -80,17 +80,21 @@ the :mod:`tokenize` module. .. versionchanged:: 3.5 - Added :data:`AWAIT` and :data:`ASYNC` tokens. + Added :data:`!AWAIT` and :data:`!ASYNC` tokens. .. versionchanged:: 3.7 Added :data:`COMMENT`, :data:`NL` and :data:`ENCODING` tokens. .. versionchanged:: 3.7 - Removed :data:`AWAIT` and :data:`ASYNC` tokens. "async" and "await" are + Removed :data:`!AWAIT` and :data:`!ASYNC` tokens. "async" and "await" are now tokenized as :data:`NAME` tokens. .. versionchanged:: 3.8 Added :data:`TYPE_COMMENT`, :data:`TYPE_IGNORE`, :data:`COLONEQUAL`. - Added :data:`AWAIT` and :data:`ASYNC` tokens back (they're needed + Added :data:`!AWAIT` and :data:`!ASYNC` tokens back (they're needed to support parsing older Python versions for :func:`ast.parse` with ``feature_version`` set to 6 or lower). + +.. versionchanged:: 3.13 + Removed :data:`!AWAIT` and :data:`!ASYNC` tokens again. + |