[issue47062] Implement asyncio.Runner context manager
Andrew Svetlov
report at bugs.python.org
Fri Mar 18 16:44:42 EDT 2022
New submission from Andrew Svetlov <andrew.svetlov at gmail.com>:
Sometimes asyncio.run() is not enough.
For example, unittest test case needs to call several async functions (setup, test, teardown) from the synchronous code using the same execution context and event loop.
The proposal provides the following:
with Runner() as runner:
runner.run(async_func())
----------
components: asyncio
messages: 415527
nosy: asvetlov, yselivanov
priority: normal
severity: normal
status: open
title: Implement asyncio.Runner context manager
versions: Python 3.11
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue47062>
_______________________________________
More information about the Python-bugs-list
mailing list