asyncio run or run_until_complete
Is there a simple way to make [code making use of asyncio.run] backwards compatible with Python 3.6? You can implement a simple substitute for asyncio.run and call it on older Python versions: import asyncio, sys, types def run(coro): if sys.version_info >= (3, 7): return asyncio.run(coro) # Emulate asyncio.run() on older versions # asyncio.run() requires a … Read more