2022-02-04 14:37:02 +01:00
|
|
|
# flake8: noqa: F405
|
|
|
|
from asyncio import * # noqa: F403
|
|
|
|
|
2022-04-26 02:15:18 +02:00
|
|
|
from .compat_utils import passthrough_module
|
2022-04-24 18:28:18 +02:00
|
|
|
|
|
|
|
passthrough_module(__name__, 'asyncio')
|
|
|
|
del passthrough_module
|
2022-02-04 14:37:02 +01: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 02:15:18 +02:00
|
|
|
|
|
|
|
try:
|
|
|
|
all_tasks # >= 3.7
|
|
|
|
except NameError:
|
|
|
|
all_tasks = Task.all_tasks
|