1
0
mirror of https://github.com/yt-dlp/yt-dlp.git synced 2025-12-31 03:51:20 +00:00

Revert "Remove Python 3.6 support"

This reverts commit 6929b41a21.
This commit is contained in:
pukkandan
2022-08-19 09:37:32 +05:30
parent bf6bdf22de
commit 5dceb21df6
14 changed files with 57 additions and 23 deletions

23
yt_dlp/compat/asyncio.py Normal file
View File

@@ -0,0 +1,23 @@
# flake8: noqa: F405
from asyncio import * # noqa: F403
from .compat_utils import passthrough_module
passthrough_module(__name__, 'asyncio')
del passthrough_module
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)
try:
all_tasks # >= 3.7
except NameError:
all_tasks = Task.all_tasks