[3.13] gh-128308: pass **kwargs to asyncio task_factory (GH-128768) (#130084)

* [3.13] gh-128308: pass `**kwargs` to asyncio task_factory (GH-128768)
(cherry picked from commit 38a9956876)

Co-authored-by: Thomas Grainger <tagrain@gmail.com>
Co-authored-by: Kumar Aditya <kumaraditya@python.org>


---------

Co-authored-by: Thomas Grainger <tagrain@gmail.com>
Co-authored-by: Kumar Aditya <kumaraditya@python.org>
This commit is contained in:
Andrew Svetlov 2025-02-14 17:34:17 +01:00 committed by GitHub
parent 9e23e0ad2c
commit 7b0543ebe6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 40 additions and 21 deletions

View file

@ -382,9 +382,9 @@ Creating Futures and Tasks
If *factory* is ``None`` the default task factory will be set.
Otherwise, *factory* must be a *callable* with the signature matching
``(loop, coro, context=None)``, where *loop* is a reference to the active
``(loop, coro, **kwargs)``, where *loop* is a reference to the active
event loop, and *coro* is a coroutine object. The callable
must return a :class:`asyncio.Future`-compatible object.
must pass on all *kwargs*, and return a :class:`asyncio.Task`-compatible object.
.. method:: loop.get_task_factory()