summaryrefslogtreecommitdiffstats
path: root/Doc/whatsnew
diff options
context:
space:
mode:
authorMatthias Bussonnier <bussonniermatthias@gmail.com>2019-05-22 19:07:45 (GMT)
committerMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2019-05-22 19:07:45 (GMT)
commit2ddbd21aec7f0e2f237a1073d3e0b313e673413f (patch)
tree9f131d887b70c9d74f5aa323c0161a2f72e66e51 /Doc/whatsnew
parentb121f63155d8e3c7c42ab6122e36eaf7f5e9f7f5 (diff)
downloadcpython-2ddbd21aec7f0e2f237a1073d3e0b313e673413f.zip
cpython-2ddbd21aec7f0e2f237a1073d3e0b313e673413f.tar.gz
cpython-2ddbd21aec7f0e2f237a1073d3e0b313e673413f.tar.bz2
bpo-34616: Document top level async in whatsnew/3.8. (GH-13484)
https://bugs.python.org/issue34616
Diffstat (limited to 'Doc/whatsnew')
-rw-r--r--Doc/whatsnew/3.8.rst10
1 files changed, 10 insertions, 0 deletions
diff --git a/Doc/whatsnew/3.8.rst b/Doc/whatsnew/3.8.rst
index 63b8200..68843e2 100644
--- a/Doc/whatsnew/3.8.rst
+++ b/Doc/whatsnew/3.8.rst
@@ -237,6 +237,16 @@ asyncio
On Windows, the default event loop is now :class:`~asyncio.ProactorEventLoop`.
+builtins
+--------
+
+The :func:`compile` built-in has been improved to accept the
+``ast.PyCF_ALLOW_TOP_LEVEL_AWAIT`` flag. With this new flag passed,
+:func:`compile` will allow top-level ``await``, ``async for`` and ``async with``
+constructs that are usually considered invalid syntax. Asynchronous code object
+marked with the ``CO_COROUTINE`` flag may then be returned.
+
+(Contributed by Matthias Bussonnier in :issue:`34616`)
collections
-----------