From: Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> Date: Fri, 27 Dec 2024 14:15:40 +0000 (+0100) Subject: [3.12] Mention loop_factory argument in docstring for asyncio.run() (GH-128288) ... X-Git-Tag: v3.12.9~132 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=3a726be127b38ad568b100176c2de3112ae07b9d;p=thirdparty%2FPython%2Fcpython.git [3.12] Mention loop_factory argument in docstring for asyncio.run() (GH-128288) (#128292) Mention loop_factory argument in docstring for asyncio.run() (GH-128288) (cherry picked from commit 0b5f1fae573a2c658eb000433ad7b87e9c40c697) Co-authored-by: Andrew Svetlov --- diff --git a/Lib/asyncio/runners.py b/Lib/asyncio/runners.py index 1b89236599aa..102ae78021b2 100644 --- a/Lib/asyncio/runners.py +++ b/Lib/asyncio/runners.py @@ -168,6 +168,7 @@ def run(main, *, debug=None, loop_factory=None): running in the same thread. If debug is True, the event loop will be run in debug mode. + If loop_factory is passed, it is used for new event loop creation. This function always creates a new event loop and closes it at the end. It should be used as a main entry point for asyncio programs, and should