diff --git a/pyproject.toml b/pyproject.toml index 7b3b5304..b831f420 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -11,7 +11,7 @@ dependencies = [ "httpx>=0.23.0, <1", "pydantic>=1.9.0, <3", "typing-extensions>=4.5, <5", - "anyio>=3.5.0, <4", + "anyio>=3.5.0, <5", "distro>=1.7.0, <2", "sniffio", @@ -49,7 +49,7 @@ dev-dependencies = [ "pyright==1.1.332", "mypy==1.7.1", "black==23.3.0", - "respx==0.19.2", + "respx==0.20.2", "pytest==7.1.1", "pytest-asyncio==0.21.1", "ruff==0.0.282", diff --git a/requirements-dev.lock b/requirements-dev.lock index e7a2e23a..ce154682 100644 --- a/requirements-dev.lock +++ b/requirements-dev.lock @@ -8,7 +8,7 @@ -e file:. annotated-types==0.6.0 -anyio==3.7.1 +anyio==4.1.0 argcomplete==3.1.2 attrs==23.1.0 black==23.3.0 @@ -20,9 +20,9 @@ distlib==0.3.7 distro==1.8.0 exceptiongroup==1.1.3 filelock==3.12.4 -h11==0.12.0 -httpcore==0.15.0 -httpx==0.23.0 +h11==0.14.0 +httpcore==1.0.2 +httpx==0.25.2 idna==3.4 iniconfig==2.0.0 isort==5.10.1 @@ -41,8 +41,8 @@ pyright==1.1.332 pytest==7.1.1 pytest-asyncio==0.21.1 python-dateutil==2.8.2 -respx==0.19.2 -rfc3986==1.5.0 +pytz==2023.3.post1 +respx==0.20.2 ruff==0.0.282 six==1.16.0 sniffio==1.3.0 diff --git a/requirements.lock b/requirements.lock index 0c8c2c2e..2022a5c5 100644 --- a/requirements.lock +++ b/requirements.lock @@ -8,16 +8,15 @@ -e file:. annotated-types==0.6.0 -anyio==3.7.1 +anyio==4.1.0 certifi==2023.7.22 distro==1.8.0 exceptiongroup==1.1.3 -h11==0.12.0 -httpcore==0.15.0 -httpx==0.23.0 +h11==0.14.0 +httpcore==1.0.2 +httpx==0.25.2 idna==3.4 pydantic==2.4.2 pydantic-core==2.10.1 -rfc3986==1.5.0 sniffio==1.3.0 typing-extensions==4.8.0 diff --git a/tests/test_client.py b/tests/test_client.py index 55502d8e..a37278e9 100644 --- a/tests/test_client.py +++ b/tests/test_client.py @@ -6,7 +6,7 @@ import json import asyncio import inspect -from typing import Any, Dict, Union, cast +from typing import Any, Union, cast from unittest import mock import httpx @@ -353,7 +353,7 @@ def test_request_extra_query(self) -> None: ), ), ) - params = cast(Dict[str, str], dict(request.url.params)) + params = dict(request.url.params) assert params == {"my_query_param": "Foo"} # if both `query` and `extra_query` are given, they are merged @@ -367,7 +367,7 @@ def test_request_extra_query(self) -> None: ), ), ) - params = cast(Dict[str, str], dict(request.url.params)) + params = dict(request.url.params) assert params == {"bar": "1", "foo": "2"} # `extra_query` takes priority over `query` when keys clash @@ -381,7 +381,7 @@ def test_request_extra_query(self) -> None: ), ), ) - params = cast(Dict[str, str], dict(request.url.params)) + params = dict(request.url.params) assert params == {"foo": "2"} @pytest.mark.respx(base_url=base_url) @@ -542,7 +542,9 @@ def test_transport_option_is_deprecated(self) -> None: DeprecationWarning, match="The `transport` argument is deprecated. The `http_client` argument should be passed instead", ): - transport = httpx.MockTransport(lambda: None) + transport = httpx.MockTransport( + lambda: None, # type: ignore + ) client = Finch( base_url=base_url, access_token=access_token, _strict_response_validation=True, transport=transport @@ -558,7 +560,9 @@ def test_transport_option_mutually_exclusive_with_http_client(self) -> None: base_url=base_url, access_token=access_token, _strict_response_validation=True, - transport=httpx.MockTransport(lambda: None), + transport=httpx.MockTransport( + lambda: None, # type: ignore + ), http_client=http_client, ) @@ -1057,7 +1061,7 @@ def test_request_extra_query(self) -> None: ), ), ) - params = cast(Dict[str, str], dict(request.url.params)) + params = dict(request.url.params) assert params == {"my_query_param": "Foo"} # if both `query` and `extra_query` are given, they are merged @@ -1071,7 +1075,7 @@ def test_request_extra_query(self) -> None: ), ), ) - params = cast(Dict[str, str], dict(request.url.params)) + params = dict(request.url.params) assert params == {"bar": "1", "foo": "2"} # `extra_query` takes priority over `query` when keys clash @@ -1085,7 +1089,7 @@ def test_request_extra_query(self) -> None: ), ), ) - params = cast(Dict[str, str], dict(request.url.params)) + params = dict(request.url.params) assert params == {"foo": "2"} @pytest.mark.respx(base_url=base_url) @@ -1246,7 +1250,9 @@ def test_transport_option_is_deprecated(self) -> None: DeprecationWarning, match="The `transport` argument is deprecated. The `http_client` argument should be passed instead", ): - transport = httpx.MockTransport(lambda: None) + transport = httpx.MockTransport( + lambda: None, # type: ignore + ) client = AsyncFinch( base_url=base_url, access_token=access_token, _strict_response_validation=True, transport=transport @@ -1262,7 +1268,9 @@ async def test_transport_option_mutually_exclusive_with_http_client(self) -> Non base_url=base_url, access_token=access_token, _strict_response_validation=True, - transport=httpx.MockTransport(lambda: None), + transport=httpx.MockTransport( + lambda: None, # type: ignore + ), http_client=http_client, )