diff options
| author | dirkf <fieldhouse@gmx.net> | 2025-11-03 20:41:04 +0000 |
|---|---|---|
| committer | dirkf <fieldhouse@gmx.net> | 2025-11-21 01:52:11 +0000 |
| commit | 27867cc814b60b7a9e95de4e971a3743f33bbd96 (patch) | |
| tree | 24e967a76ae4ff619d3ee91eccb33e04b0659188 | |
| parent | 70b40dd1efeb7d4afc7f860ddcaea28455a64d11 (diff) | |
[compat] Add `compat_thread`
| -rw-r--r-- | youtube_dl/compat.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/youtube_dl/compat.py b/youtube_dl/compat.py index 96b099a58..25fbc8edd 100644 --- a/youtube_dl/compat.py +++ b/youtube_dl/compat.py @@ -3637,6 +3637,16 @@ except ImportError: compat_zstandard = None +# compat_thread +try: + import _thread as compat_thread +except ImportError: + try: + import thread as compat_thread + except ImportError: + import dummy_thread as compat_thread + + legacy = [ 'compat_HTMLParseError', 'compat_HTMLParser', @@ -3722,6 +3732,7 @@ __all__ = [ 'compat_struct_unpack', 'compat_subprocess_get_DEVNULL', 'compat_subprocess_Popen', + 'compat_thread', 'compat_tokenize_tokenize', 'compat_urllib_error', 'compat_urllib_parse', |
