[Python-checkins] Clarify asyncio.Runner docs re: loop_factory (#95979)

gvanrossum webhook-mailer at python.org
Sun Aug 14 11:53:43 EDT 2022


https://github.com/python/cpython/commit/e8259e047c42976427b08f100b9d8ba52db7ee69
commit: e8259e047c42976427b08f100b9d8ba52db7ee69
branch: main
author: Kumar Aditya <59607654+kumaraditya303 at users.noreply.github.com>
committer: gvanrossum <gvanrossum at gmail.com>
date: 2022-08-14T08:53:34-07:00
summary:

Clarify asyncio.Runner docs re: loop_factory (#95979)

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

diff --git a/Doc/library/asyncio-runner.rst b/Doc/library/asyncio-runner.rst
index d0df1db892f..4abe7b6e087 100644
--- a/Doc/library/asyncio-runner.rst
+++ b/Doc/library/asyncio-runner.rst
@@ -75,7 +75,9 @@ Runner context manager
    :ref:`asyncio-debug-mode` settings.
 
    *loop_factory* could be used for overriding the loop creation.
-   :func:`asyncio.new_event_loop` is used if ``None``.
+   It is the responsibility of the *loop_factory* to set the created loop as the
+   current one. By default :func:`asyncio.new_event_loop` is used and set as
+   current event loop with :func:`asyncio.set_event_loop` if *loop_factory* is ``None``.
 
    Basically, :func:`asyncio.run()` example can be rewritten with the runner usage::
 



More information about the Python-checkins mailing list