mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2026-01-30 02:31:51 +00:00
[compat/asyncio] Use asyncio.all_tasks
This commit is contained in:
@@ -2,8 +2,7 @@
|
||||
|
||||
from asyncio import * # noqa: F403
|
||||
|
||||
from . import tasks # noqa: F401
|
||||
from ..compat_utils import passthrough_module
|
||||
from .compat_utils import passthrough_module
|
||||
|
||||
passthrough_module(__name__, 'asyncio')
|
||||
del passthrough_module
|
||||
@@ -18,3 +17,8 @@ except NameError:
|
||||
loop = new_event_loop()
|
||||
set_event_loop(loop)
|
||||
loop.run_until_complete(coro)
|
||||
|
||||
try:
|
||||
all_tasks # >= 3.7
|
||||
except NameError:
|
||||
all_tasks = Task.all_tasks
|
||||
@@ -1,13 +0,0 @@
|
||||
# flake8: noqa: F405
|
||||
|
||||
from asyncio.tasks import * # noqa: F403
|
||||
|
||||
from ..compat_utils import passthrough_module
|
||||
|
||||
passthrough_module(__name__, 'asyncio.tasks')
|
||||
del passthrough_module
|
||||
|
||||
try: # >= 3.7
|
||||
all_tasks
|
||||
except NameError:
|
||||
all_tasks = Task.all_tasks
|
||||
Reference in New Issue
Block a user