From 3012c40c27f6eadde3d8ece5416b4ce89ee506cd Mon Sep 17 00:00:00 2001 From: disqualifier Date: Fri, 16 Oct 2026 04:38:41 -0400 Subject: [PATCH] refactor: drop the unreachable except aiohttp.ClientError: raise T3-21: neither curl_cffi nor noble_tls raises aiohttp exceptions (verified in both packages' sources), so the branch could not run. every error a real backend raises maps exactly as before; the asyncio.TimeoutError guard stays (TimeoutError is an OSError on 3.11+). folds into 1.0.5. Signed-off-by: disqualifier --- src/aioweb_tls/backends.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/aioweb_tls/backends.py b/src/aioweb_tls/backends.py index 6e497c7..e82e225 100644 --- a/src/aioweb_tls/backends.py +++ b/src/aioweb_tls/backends.py @@ -172,9 +172,8 @@ class CurlCffi: try: response = await session.request(method, url, impersonate=impersonate, **kwargs) - except aiohttp.ClientError: - raise except asyncio.TimeoutError: + # TimeoutError is an OSError (3.11+): keep it out of the wrap below raise except OSError as error: if _is_timeout_error(error): @@ -316,9 +315,8 @@ class Noble: try: response = await session.execute_request(method=method.upper(), url=url, **kwargs) - except aiohttp.ClientError: - raise except asyncio.TimeoutError: + # TimeoutError is an OSError (3.11+): keep it out of the wrap below raise except OSError as error: if _is_timeout_error(error):