[Python-checkins] bpo-33649: Note that asyncio.run() calls shutdown_asyncgens() (GH-9380)

Miss Islington (bot) webhook-mailer at python.org
Tue Sep 18 00:12:08 EDT 2018


https://github.com/python/cpython/commit/1f4ea580675d7b30d3906d78c500997d7d96995d
commit: 1f4ea580675d7b30d3906d78c500997d7d96995d
branch: 3.7
author: Miss Islington (bot) <31488909+miss-islington at users.noreply.github.com>
committer: GitHub <noreply at github.com>
date: 2018-09-17T21:12:05-07:00
summary:

bpo-33649: Note that asyncio.run() calls shutdown_asyncgens() (GH-9380)

(cherry picked from commit ac94e38d076aebc56c2ff96a249b5e40f32633ea)

Co-authored-by: Yury Selivanov <yury at magic.io>

files:
M Doc/library/asyncio-eventloop.rst

diff --git a/Doc/library/asyncio-eventloop.rst b/Doc/library/asyncio-eventloop.rst
index 3b13a81a5b6a..252224218572 100644
--- a/Doc/library/asyncio-eventloop.rst
+++ b/Doc/library/asyncio-eventloop.rst
@@ -152,8 +152,12 @@ Running and stopping the loop
    close with an :meth:`~agen.aclose()` call.  After calling this method,
    the event loop will issue a warning if a new asynchronous generator
    is iterated. This should be used to reliably finalize all scheduled
-   asynchronous generators, e.g.::
+   asynchronous generators.
 
+   Note that there is no need to call this function when
+   :func:`asyncio.run` is used.
+
+   Example::
 
     try:
         loop.run_forever()



More information about the Python-checkins mailing list