aboutsummaryrefslogtreecommitdiff
path: root/yt_dlp/networking/_requests.py
diff options
context:
space:
mode:
authorSimon Sawicki <contact@grub4k.xyz>2025-03-16 12:45:44 +0100
committerGitHub <noreply@github.com>2025-03-16 12:45:44 +0100
commit95f8df2f796d0048119615200758199aedcd7cf4 (patch)
treeb7e43ce4dc3522bc07ac87ec1e8085bb8813ff15 /yt_dlp/networking/_requests.py
parente67d786c7cc87bd449d22e0ddef08306891c1173 (diff)
[networking] Always add unsupported suffix on version mismatch (#12626)
Authored by: Grub4K
Diffstat (limited to 'yt_dlp/networking/_requests.py')
-rw-r--r--yt_dlp/networking/_requests.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/yt_dlp/networking/_requests.py b/yt_dlp/networking/_requests.py
index 23775845d..5b6b264a6 100644
--- a/yt_dlp/networking/_requests.py
+++ b/yt_dlp/networking/_requests.py
@@ -21,9 +21,11 @@ if urllib3 is None:
urllib3_version = tuple(int_or_none(x, default=0) for x in urllib3.__version__.split('.'))
if urllib3_version < (1, 26, 17):
+ urllib3._yt_dlp__version = f'{urllib3.__version__} (unsupported)'
raise ImportError('Only urllib3 >= 1.26.17 is supported')
if requests.__build__ < 0x023202:
+ requests._yt_dlp__version = f'{requests.__version__} (unsupported)'
raise ImportError('Only requests >= 2.32.2 is supported')
import requests.adapters