diff options
author | Jesús <heckyel@hyperbola.info> | 2022-02-13 17:31:03 -0500 |
---|---|---|
committer | Jesús <heckyel@hyperbola.info> | 2022-02-13 17:31:03 -0500 |
commit | efa26c289d48935cbd6410843cbe19c9f9d83bb0 (patch) | |
tree | 242a7f487df4f4d21cf58b61d0efc8dbd424a366 /yt_dlp/compat.py | |
parent | af4847e22e81d05177f92c712983ab3f2f20184b (diff) | |
parent | c82f051dbbe6ba6a6c56ccdbaa079cbf83912fe1 (diff) | |
download | hypervideo-pre-efa26c289d48935cbd6410843cbe19c9f9d83bb0.tar.lz hypervideo-pre-efa26c289d48935cbd6410843cbe19c9f9d83bb0.tar.xz hypervideo-pre-efa26c289d48935cbd6410843cbe19c9f9d83bb0.zip |
updated from upstream | 13/02/2022 at 17:31
Diffstat (limited to 'yt_dlp/compat.py')
-rw-r--r-- | yt_dlp/compat.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/yt_dlp/compat.py b/yt_dlp/compat.py index b97d4512e..2bc6a6b7f 100644 --- a/yt_dlp/compat.py +++ b/yt_dlp/compat.py @@ -134,6 +134,16 @@ except AttributeError: asyncio.run = compat_asyncio_run +try: # >= 3.7 + asyncio.tasks.all_tasks +except AttributeError: + asyncio.tasks.all_tasks = asyncio.tasks.Task.all_tasks + +try: + import websockets as compat_websockets +except ImportError: + compat_websockets = None + # Python 3.8+ does not honor %HOME% on windows, but this breaks compatibility with youtube-dl # See https://github.com/yt-dlp/yt-dlp/issues/792 # https://docs.python.org/3/library/os.path.html#os.path.expanduser @@ -303,6 +313,7 @@ __all__ = [ 'compat_urllib_response', 'compat_urlparse', 'compat_urlretrieve', + 'compat_websockets', 'compat_xml_parse_error', 'compat_xpath', 'compat_zip', |