the former condition would return True for 2.31.*
6cfbc1071f (commitcomment-142642913)
This commit is contained in:
Mike Fährmann
2024-06-02 16:10:06 +02:00
parent cbaf041cea
commit 5d3d03a1f1

View File

@@ -837,7 +837,7 @@ def _build_requests_adapter(ssl_options, ssl_ciphers, source_address):
if ssl_options or ssl_ciphers:
ssl_context = urllib3.connection.create_urllib3_context(
options=ssl_options or None, ciphers=ssl_ciphers)
if requests.__version__ > "2.31":
if not requests.__version__ < "2.32":
# https://github.com/psf/requests/pull/6731
ssl_context.load_default_certs()
ssl_context.check_hostname = False