bpo-30406: Make async and await proper keywords (#1669)
Per PEP 492, 'async' and 'await' should become proper keywords in 3.7.
diff --git a/Doc/library/token.rst b/Doc/library/token.rst
index b7ca9db..3739910 100644
--- a/Doc/library/token.rst
+++ b/Doc/library/token.rst
@@ -98,8 +98,6 @@
RARROW
ELLIPSIS
OP
- AWAIT
- ASYNC
ERRORTOKEN
N_TOKENS
NT_OFFSET
@@ -129,9 +127,11 @@
.. versionchanged:: 3.5
- Added :data:`AWAIT` and :data:`ASYNC` tokens. Starting with
- Python 3.7, "async" and "await" will be tokenized as :data:`NAME`
- tokens, and :data:`AWAIT` and :data:`ASYNC` will be removed.
+ 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
+ now tokenized as :data:`NAME` tokens.
diff --git a/Doc/tools/extensions/pyspecific.py b/Doc/tools/extensions/pyspecific.py
index e8c8876..00acd4f 100644
--- a/Doc/tools/extensions/pyspecific.py
+++ b/Doc/tools/extensions/pyspecific.py
@@ -272,9 +272,9 @@
# Support for building "topic help" for pydoc
pydoc_topic_labels = [
- 'assert', 'assignment', 'atom-identifiers', 'atom-literals',
- 'attribute-access', 'attribute-references', 'augassign', 'binary',
- 'bitwise', 'bltin-code-objects', 'bltin-ellipsis-object',
+ 'assert', 'assignment', 'async', 'atom-identifiers', 'atom-literals',
+ 'attribute-access', 'attribute-references', 'augassign', 'await',
+ 'binary', 'bitwise', 'bltin-code-objects', 'bltin-ellipsis-object',
'bltin-null-object', 'bltin-type-objects', 'booleans',
'break', 'callable-types', 'calls', 'class', 'comparisons', 'compound',
'context-managers', 'continue', 'conversions', 'customization', 'debugger',