nest_asyncio
nest_asyncio copied to clipboard
feature request: unapply
It would be great to have an unapply function or the ability to use this as a context manager so that one can allow nested asyncio only in special circumstances, e.g.:
async def afunc():
...
def func():
with nested_asyncio.apply_now() as loop:
loop.run_until_complete(afunc)
asyncio.get_event_loop().loop.run_until_complete(afunc) <- raises error
Yes please! nest-asyncio can break a lot of other packages that aren't expecting it.