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