Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion aiohttp/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -683,7 +683,7 @@ async def _request(
except ClientError:
raise
except OSError as exc:
if exc.errno is None and isinstance(exc, asyncio.TimeoutError): # type: ignore[unreachable]
if exc.errno is None and isinstance(exc, asyncio.TimeoutError):
raise
raise ClientOSError(*exc.args) from exc

Expand Down
7 changes: 2 additions & 5 deletions aiohttp/client_reqrep.py
Original file line number Diff line number Diff line change
Expand Up @@ -603,11 +603,8 @@ async def write_bytes(
except OSError as underlying_exc:
reraised_exc = underlying_exc

exc_is_not_timeout = (
underlying_exc.errno is not None
or not isinstance( # type: ignore[unreachable]
underlying_exc, asyncio.TimeoutError
)
exc_is_not_timeout = underlying_exc.errno is not None or not isinstance(
underlying_exc, asyncio.TimeoutError
)
if exc_is_not_timeout:
reraised_exc = ClientOSError(
Expand Down
10 changes: 5 additions & 5 deletions aiohttp/connector.py
Original file line number Diff line number Diff line change
Expand Up @@ -1118,7 +1118,7 @@ async def _wrap_create_connection(
except ssl_errors as exc:
raise ClientConnectorSSLError(req.connection_key, exc) from exc
except OSError as exc:
if exc.errno is None and isinstance(exc, asyncio.TimeoutError): # type: ignore[unreachable]
if exc.errno is None and isinstance(exc, asyncio.TimeoutError):
raise
raise client_error(req.connection_key, exc) from exc

Expand Down Expand Up @@ -1207,7 +1207,7 @@ async def _start_tls_connection(
except ssl_errors as exc:
raise ClientConnectorSSLError(req.connection_key, exc) from exc
except OSError as exc:
if exc.errno is None and isinstance(exc, asyncio.TimeoutError): # type: ignore[unreachable]
if exc.errno is None and isinstance(exc, asyncio.TimeoutError):
raise
raise client_error(req.connection_key, exc) from exc
except TypeError as type_err:
Expand Down Expand Up @@ -1278,7 +1278,7 @@ async def _create_direct_connection(
# across all connections.
hosts = await self._resolve_host(host, port, traces=traces)
except OSError as exc:
if exc.errno is None and isinstance(exc, asyncio.TimeoutError): # type: ignore[unreachable]
if exc.errno is None and isinstance(exc, asyncio.TimeoutError):
raise
# in case of proxy it is not ClientProxyConnectionError
# it is problem of resolving proxy ip itself
Expand Down Expand Up @@ -1472,7 +1472,7 @@ async def _create_connection(
self._factory, self._path
)
except OSError as exc:
if exc.errno is None and isinstance(exc, asyncio.TimeoutError): # type: ignore[unreachable]
if exc.errno is None and isinstance(exc, asyncio.TimeoutError):
raise
raise UnixClientConnectorError(self.path, req.connection_key, exc) from exc

Expand Down Expand Up @@ -1541,7 +1541,7 @@ async def _create_connection(
# other option is to manually set transport like
# `proto.transport = trans`
except OSError as exc:
if exc.errno is None and isinstance(exc, asyncio.TimeoutError): # type: ignore[unreachable]
if exc.errno is None and isinstance(exc, asyncio.TimeoutError):
raise
raise ClientConnectorError(req.connection_key, exc) from exc

Expand Down
2 changes: 1 addition & 1 deletion requirements/base.txt
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ propcache==0.2.1
# via
# -r requirements/runtime-deps.in
# yarl
pycares==4.4.0
pycares==4.5.0
# via aiodns
pycparser==2.22
# via cffi
Expand Down
31 changes: 9 additions & 22 deletions requirements/constraints.txt
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ cffi==1.17.1
# pytest-codspeed
cfgv==3.4.0
# via pre-commit
charset-normalizer==3.4.0
charset-normalizer==3.4.1
# via requests
cherry-picker==2.4.0
# via -r requirements/dev.in
Expand All @@ -47,7 +47,6 @@ click==8.1.8
# pip-tools
# slotscheck
# towncrier
# typer
# wait-for-it
coverage==7.6.9
# via
Expand All @@ -68,9 +67,7 @@ exceptiongroup==1.2.2
execnet==2.1.1
# via pytest-xdist
filelock==3.16.1
# via
# pytest-codspeed
# virtualenv
# via virtualenv
freezegun==1.5.1
# via
# -r requirements/lint.in
Expand Down Expand Up @@ -111,7 +108,7 @@ multidict==6.1.0
# -r requirements/multidict.in
# -r requirements/runtime-deps.in
# yarl
mypy==1.13.0 ; implementation_name == "cpython"
mypy==1.14.0 ; implementation_name == "cpython"
# via
# -r requirements/lint.in
# -r requirements/test.in
Expand All @@ -131,7 +128,7 @@ platformdirs==4.3.6
# via virtualenv
pluggy==1.5.0
# via pytest
pre-commit==3.5.0
pre-commit==4.0.1
# via -r requirements/lint.in
propcache==0.2.1
# via
Expand All @@ -141,7 +138,7 @@ proxy-py==2.4.9
# via
# -r requirements/lint.in
# -r requirements/test.in
pycares==4.4.0
pycares==4.5.0
# via aiodns
pycparser==2.22
# via cffi
Expand Down Expand Up @@ -171,7 +168,7 @@ pytest==8.1.1
# pytest-cov
# pytest-mock
# pytest-xdist
pytest-codspeed==3.0.0
pytest-codspeed==3.1.0
# via
# -r requirements/lint.in
# -r requirements/test.in
Expand All @@ -185,7 +182,7 @@ pytest-xdist==3.6.1
# via -r requirements/test.in
python-dateutil==2.9.0.post0
# via freezegun
python-on-whales==0.73.0
python-on-whales==0.74.0
# via
# -r requirements/lint.in
# -r requirements/test.in
Expand All @@ -194,17 +191,12 @@ pyyaml==6.0.2
requests==2.32.3
# via
# cherry-picker
# python-on-whales
# sphinx
# sphinxcontrib-spelling
rich==13.9.4
# via
# pytest-codspeed
# typer
# via pytest-codspeed
setuptools-git==1.2
# via -r requirements/test.in
shellingham==1.5.4
# via typer
six==1.17.0
# via python-dateutil
slotscheck==0.19.1
Expand Down Expand Up @@ -248,14 +240,10 @@ towncrier==23.11.0
# via
# -r requirements/doc.in
# sphinxcontrib-towncrier
tqdm==4.67.1
# via python-on-whales
trustme==1.2.0 ; platform_machine != "i686"
# via
# -r requirements/lint.in
# -r requirements/test.in
typer==0.12.5
# via python-on-whales
typing-extensions==4.12.2
# via
# multidict
Expand All @@ -264,7 +252,6 @@ typing-extensions==4.12.2
# pydantic-core
# python-on-whales
# rich
# typer
uritemplate==4.1.1
# via gidgethub
urllib3==2.3.0
Expand All @@ -287,7 +274,7 @@ yarl==1.18.3
# The following packages are considered to be unsafe in a requirements file:
pip==24.3.1
# via pip-tools
setuptools==75.2.0
setuptools==75.6.0
# via
# incremental
# pip-tools
31 changes: 9 additions & 22 deletions requirements/dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ cffi==1.17.1
# pytest-codspeed
cfgv==3.4.0
# via pre-commit
charset-normalizer==3.4.0
charset-normalizer==3.4.1
# via requests
cherry-picker==2.4.0
# via -r requirements/dev.in
Expand All @@ -47,7 +47,6 @@ click==8.1.8
# pip-tools
# slotscheck
# towncrier
# typer
# wait-for-it
coverage==7.6.9
# via
Expand All @@ -66,9 +65,7 @@ exceptiongroup==1.2.2
execnet==2.1.1
# via pytest-xdist
filelock==3.16.1
# via
# pytest-codspeed
# virtualenv
# via virtualenv
freezegun==1.5.1
# via
# -r requirements/lint.in
Expand Down Expand Up @@ -108,7 +105,7 @@ multidict==6.1.0
# via
# -r requirements/runtime-deps.in
# yarl
mypy==1.13.0 ; implementation_name == "cpython"
mypy==1.14.0 ; implementation_name == "cpython"
# via
# -r requirements/lint.in
# -r requirements/test.in
Expand All @@ -128,7 +125,7 @@ platformdirs==4.3.6
# via virtualenv
pluggy==1.5.0
# via pytest
pre-commit==3.5.0
pre-commit==4.0.1
# via -r requirements/lint.in
propcache==0.2.1
# via
Expand All @@ -138,7 +135,7 @@ proxy-py==2.4.9
# via
# -r requirements/lint.in
# -r requirements/test.in
pycares==4.4.0
pycares==4.5.0
# via aiodns
pycparser==2.22
# via cffi
Expand Down Expand Up @@ -166,7 +163,7 @@ pytest==8.1.1
# pytest-cov
# pytest-mock
# pytest-xdist
pytest-codspeed==3.0.0
pytest-codspeed==3.1.0
# via
# -r requirements/lint.in
# -r requirements/test.in
Expand All @@ -180,7 +177,7 @@ pytest-xdist==3.6.1
# via -r requirements/test.in
python-dateutil==2.9.0.post0
# via freezegun
python-on-whales==0.73.0
python-on-whales==0.74.0
# via
# -r requirements/lint.in
# -r requirements/test.in
Expand All @@ -189,16 +186,11 @@ pyyaml==6.0.2
requests==2.32.3
# via
# cherry-picker
# python-on-whales
# sphinx
rich==13.9.4
# via
# pytest-codspeed
# typer
# via pytest-codspeed
setuptools-git==1.2
# via -r requirements/test.in
shellingham==1.5.4
# via typer
six==1.17.0
# via python-dateutil
slotscheck==0.19.1
Expand Down Expand Up @@ -239,14 +231,10 @@ towncrier==23.11.0
# via
# -r requirements/doc.in
# sphinxcontrib-towncrier
tqdm==4.67.1
# via python-on-whales
trustme==1.2.0 ; platform_machine != "i686"
# via
# -r requirements/lint.in
# -r requirements/test.in
typer==0.12.5
# via python-on-whales
typing-extensions==4.12.2
# via
# multidict
Expand All @@ -255,7 +243,6 @@ typing-extensions==4.12.2
# pydantic-core
# python-on-whales
# rich
# typer
uritemplate==4.1.1
# via gidgethub
urllib3==2.3.0
Expand All @@ -278,7 +265,7 @@ yarl==1.18.3
# The following packages are considered to be unsafe in a requirements file:
pip==24.3.1
# via pip-tools
setuptools==75.2.0
setuptools==75.6.0
# via
# incremental
# pip-tools
4 changes: 2 additions & 2 deletions requirements/doc-spelling.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ babel==2.16.0
# via sphinx
certifi==2024.12.14
# via requests
charset-normalizer==3.4.0
charset-normalizer==3.4.1
# via requests
click==8.1.8
# via towncrier
Expand Down Expand Up @@ -76,5 +76,5 @@ urllib3==2.3.0
# via requests

# The following packages are considered to be unsafe in a requirements file:
setuptools==75.2.0
setuptools==75.6.0
# via incremental
4 changes: 2 additions & 2 deletions requirements/doc.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ babel==2.16.0
# via sphinx
certifi==2024.12.14
# via requests
charset-normalizer==3.4.0
charset-normalizer==3.4.1
# via requests
click==8.1.8
# via towncrier
Expand Down Expand Up @@ -69,5 +69,5 @@ urllib3==2.3.0
# via requests

# The following packages are considered to be unsafe in a requirements file:
setuptools==75.2.0
setuptools==75.6.0
# via incremental
Loading
Loading