diff --git a/requirements-min.txt b/requirements-min.txt index b1da7ed..1e76567 100644 --- a/requirements-min.txt +++ b/requirements-min.txt @@ -1,4 +1,4 @@ -requests==2.26.0 -urllib3==1.26.2 +requests==2.30.0 +urllib3==2.0.3 aiohttp==3.8.0 httpx==0.27.0 diff --git a/setup.py b/setup.py index 4ed5b67..752ef58 100644 --- a/setup.py +++ b/setup.py @@ -50,7 +50,7 @@ package_data={"elastic_transport": ["py.typed"]}, packages=packages, install_requires=[ - "urllib3>=1.26.2, <3", + "urllib3>=2, <3", "certifi", "sniffio", ], diff --git a/tests/test_httpserver.py b/tests/test_httpserver.py index 4c956af..0c6e6c6 100644 --- a/tests/test_httpserver.py +++ b/tests/test_httpserver.py @@ -18,27 +18,14 @@ import warnings import pytest -import requests -import urllib3 from elastic_transport import Transport @pytest.mark.parametrize("node_class", ["urllib3", "requests"]) def test_simple_request(node_class, https_server_ip_node_config): - # when testing minimum urllib3 and requests dependencies, we disable - # the deprecation warning for ssl.match_hostname() - silence_ssl_deprecation = ( - node_class == "urllib3" and urllib3.__version__ == "1.26.2" - ) or (node_class == "requests" and requests.__version__ == "2.26.0") - with warnings.catch_warnings(): warnings.simplefilter("error") - if silence_ssl_deprecation: - warnings.filterwarnings( - "ignore", ".*match_hostname.*deprecated", DeprecationWarning - ) - t = Transport([https_server_ip_node_config], node_class=node_class) resp, data = t.perform_request("GET", "/foobar")