diff --git a/homeassistant/helpers/aiohttp_client.py b/homeassistant/helpers/aiohttp_client.py index b8d810d899b7b..fba9bb647ddd5 100644 --- a/homeassistant/helpers/aiohttp_client.py +++ b/homeassistant/helpers/aiohttp_client.py @@ -58,19 +58,6 @@ 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.""" diff --git a/homeassistant/package_constraints.txt b/homeassistant/package_constraints.txt index eaf7dc0dadd51..04ab96748d2a0 100644 --- a/homeassistant/package_constraints.txt +++ b/homeassistant/package_constraints.txt @@ -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 diff --git a/pyproject.toml b/pyproject.toml index 550cafc414627..67657586ea53e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -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", diff --git a/requirements.txt b/requirements.txt index f751354a4a30c..5b33374b7cc58 100644 --- a/requirements.txt +++ b/requirements.txt @@ -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 diff --git a/tests/test_util/aiohttp.py b/tests/test_util/aiohttp.py index ac874fcc45c93..4f2518253ffa1 100644 --- a/tests/test_util/aiohttp.py +++ b/tests/test_util/aiohttp.py @@ -280,6 +280,12 @@ def raise_for_status(self): 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."""