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:
parent
e87ebbef01
commit
54c98f32c2
5 changed files with 9 additions and 16 deletions
|
@ -58,19 +58,6 @@ MAXIMUM_CONNECTIONS = 4096
|
||||||
MAXIMUM_CONNECTIONS_PER_HOST = 100
|
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):
|
class HassClientResponse(aiohttp.ClientResponse):
|
||||||
"""aiohttp.ClientResponse with a json method that uses json_loads by default."""
|
"""aiohttp.ClientResponse with a json method that uses json_loads by default."""
|
||||||
|
|
||||||
|
|
|
@ -4,7 +4,7 @@ aiodiscover==1.5.1
|
||||||
aiohttp-fast-url-dispatcher==0.1.0
|
aiohttp-fast-url-dispatcher==0.1.0
|
||||||
aiohttp-zlib-ng==0.1.1
|
aiohttp-zlib-ng==0.1.1
|
||||||
aiohttp==3.8.5;python_version<'3.12'
|
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
|
aiohttp_cors==0.7.0
|
||||||
astral==2.2
|
astral==2.2
|
||||||
async-upnp-client==0.36.2
|
async-upnp-client==0.36.2
|
||||||
|
|
|
@ -23,7 +23,7 @@ classifiers = [
|
||||||
]
|
]
|
||||||
requires-python = ">=3.11.0"
|
requires-python = ">=3.11.0"
|
||||||
dependencies = [
|
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==3.8.5;python_version<'3.12'",
|
||||||
"aiohttp_cors==0.7.0",
|
"aiohttp_cors==0.7.0",
|
||||||
"aiohttp-fast-url-dispatcher==0.1.0",
|
"aiohttp-fast-url-dispatcher==0.1.0",
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
-c homeassistant/package_constraints.txt
|
-c homeassistant/package_constraints.txt
|
||||||
|
|
||||||
# Home Assistant Core
|
# 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==3.8.5;python_version<'3.12'
|
||||||
aiohttp_cors==0.7.0
|
aiohttp_cors==0.7.0
|
||||||
aiohttp-fast-url-dispatcher==0.1.0
|
aiohttp-fast-url-dispatcher==0.1.0
|
||||||
|
|
|
@ -280,6 +280,12 @@ class AiohttpClientMockResponse:
|
||||||
def close(self):
|
def close(self):
|
||||||
"""Mock close."""
|
"""Mock close."""
|
||||||
|
|
||||||
|
async def wait_for_close(self):
|
||||||
|
"""Wait until all requests are done.
|
||||||
|
|
||||||
|
Do nothing as we are mocking.
|
||||||
|
"""
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def response(self):
|
def response(self):
|
||||||
"""Property method to expose the response to other read methods."""
|
"""Property method to expose the response to other read methods."""
|
||||||
|
|
Loading…
Add table
Reference in a new issue