diff options
author | coletdjnz <coletdjnz@protonmail.com> | 2024-05-21 09:44:41 +1200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-05-20 21:44:41 +0000 |
commit | c36513f1be2ef3d3cec864accbffda1afaa06ffd (patch) | |
tree | b6f7e8ad65302dc3482e6c48d08201fb0b178570 /yt_dlp/networking/_requests.py | |
parent | 3e35aa32c74bc108375be8c8b6b3bfc90dfff1b4 (diff) |
[rh:requests] Update to `requests` 2.32.0 (#9980)
Authored by: coletdjnz
Diffstat (limited to 'yt_dlp/networking/_requests.py')
-rw-r--r-- | yt_dlp/networking/_requests.py | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/yt_dlp/networking/_requests.py b/yt_dlp/networking/_requests.py index e3edc77f3..75eee8824 100644 --- a/yt_dlp/networking/_requests.py +++ b/yt_dlp/networking/_requests.py @@ -21,8 +21,8 @@ urllib3_version = tuple(int_or_none(x, default=0) for x in urllib3.__version__.s if urllib3_version < (1, 26, 17): raise ImportError('Only urllib3 >= 1.26.17 is supported') -if requests.__build__ < 0x023100: - raise ImportError('Only requests >= 2.31.0 is supported') +if requests.__build__ < 0x023200: + raise ImportError('Only requests >= 2.32.0 is supported') import requests.adapters import requests.utils @@ -181,9 +181,13 @@ class RequestsHTTPAdapter(requests.adapters.HTTPAdapter): return super().proxy_manager_for(proxy, **proxy_kwargs, **self._pm_args, **extra_kwargs) def cert_verify(*args, **kwargs): - # lean on SSLContext for cert verification + # Lean on our SSLContext for cert verification pass + def _get_connection(self, request, *_, proxies=None, **__): + # Lean on our SSLContext for cert verification + return self.get_connection(request.url, proxies) + class RequestsSession(requests.sessions.Session): """ |