Bump aiohttp to 3.9.0rc0 for python 3.12 only (#103507)

Co-authored-by: Marc Mueller <30130371+cdce8p@users.noreply.github.com>
This commit is contained in:
J. Nick Koston 2023-11-14 18:02:14 -06:00 committed by GitHub
parent e87ebbef01
commit 54c98f32c2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 9 additions and 16 deletions

View File

@ -58,19 +58,6 @@ MAXIMUM_CONNECTIONS = 4096
MAXIMUM_CONNECTIONS_PER_HOST = 100
# Overwrite base aiohttp _wait implementation
# Homeassistant has a custom shutdown wait logic.
async def _noop_wait(*args: Any, **kwargs: Any) -> None:
"""Do nothing."""
return
# TODO: Remove version check with aiohttp 3.9.0 # pylint: disable=fixme
if sys.version_info >= (3, 12):
# pylint: disable-next=protected-access
web.BaseSite._wait = _noop_wait # type: ignore[method-assign]
class HassClientResponse(aiohttp.ClientResponse):
"""aiohttp.ClientResponse with a json method that uses json_loads by default."""

View File

@ -4,7 +4,7 @@ aiodiscover==1.5.1
aiohttp-fast-url-dispatcher==0.1.0
aiohttp-zlib-ng==0.1.1
aiohttp==3.8.5;python_version<'3.12'
aiohttp==3.9.0b0;python_version>='3.12'
aiohttp==3.9.0rc0;python_version>='3.12'
aiohttp_cors==0.7.0
astral==2.2
async-upnp-client==0.36.2

View File

@ -23,7 +23,7 @@ classifiers = [
]
requires-python = ">=3.11.0"
dependencies = [
"aiohttp==3.9.0b0;python_version>='3.12'",
"aiohttp==3.9.0rc0;python_version>='3.12'",
"aiohttp==3.8.5;python_version<'3.12'",
"aiohttp_cors==0.7.0",
"aiohttp-fast-url-dispatcher==0.1.0",

View File

@ -3,7 +3,7 @@
-c homeassistant/package_constraints.txt
# Home Assistant Core
aiohttp==3.9.0b0;python_version>='3.12'
aiohttp==3.9.0rc0;python_version>='3.12'
aiohttp==3.8.5;python_version<'3.12'
aiohttp_cors==0.7.0
aiohttp-fast-url-dispatcher==0.1.0

View File

@ -280,6 +280,12 @@ class AiohttpClientMockResponse:
def close(self):
"""Mock close."""
async def wait_for_close(self):
"""Wait until all requests are done.
Do nothing as we are mocking.
"""
@property
def response(self):
"""Property method to expose the response to other read methods."""