2022-02-04 13:37:02 +00:00
|
|
|
# flake8: noqa: F405
|
|
|
|
from asyncio import * # noqa: F403
|
|
|
|
|
2022-04-26 00:15:18 +00:00
|
|
|
from .compat_utils import passthrough_module
|
2022-04-24 16:28:18 +00:00
|
|
|
|
|
|
|
passthrough_module(__name__, 'asyncio')
|
|
|
|
del passthrough_module
|
2022-02-04 13:37:02 +00:00
|
|
|
|
|
|
|
try:
|
|
|
|
run # >= 3.7
|
|
|
|
except NameError:
|
|
|
|
def run(coro):
|
|
|
|
try:
|
|
|
|
loop = get_event_loop()
|
|
|
|
except RuntimeError:
|
|
|
|
loop = new_event_loop()
|
|
|
|
set_event_loop(loop)
|
|
|
|
loop.run_until_complete(coro)
|
2022-04-26 00:15:18 +00:00
|
|
|
|
|
|
|
try:
|
|
|
|
all_tasks # >= 3.7
|
|
|
|
except NameError:
|
|
|
|
all_tasks = Task.all_tasks
|