New submission from Andrew Svetlov <andrew.svet...@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 <rep...@bugs.python.org>
<https://bugs.python.org/issue47062>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to