Bump aiohttp to 3.11.0b3 (#129363)
This commit is contained in:
parent
9a2a177b28
commit
53c486ccd1
7 changed files with 11 additions and 15 deletions
|
@ -330,13 +330,7 @@ class WebSocketHandler:
|
||||||
if TYPE_CHECKING:
|
if TYPE_CHECKING:
|
||||||
assert writer is not None
|
assert writer is not None
|
||||||
|
|
||||||
# aiohttp 3.11.0 changed the method name from _send_frame to send_frame
|
send_bytes_text = partial(writer.send_frame, opcode=WSMsgType.TEXT)
|
||||||
if hasattr(writer, "send_frame"):
|
|
||||||
send_frame = writer.send_frame # pragma: no cover
|
|
||||||
else:
|
|
||||||
send_frame = writer._send_frame # noqa: SLF001
|
|
||||||
|
|
||||||
send_bytes_text = partial(send_frame, opcode=WSMsgType.TEXT)
|
|
||||||
auth = AuthPhase(
|
auth = AuthPhase(
|
||||||
logger, hass, self._send_message, self._cancel, request, send_bytes_text
|
logger, hass, self._send_message, self._cancel, request, send_bytes_text
|
||||||
)
|
)
|
||||||
|
|
|
@ -5,7 +5,7 @@ aiodiscover==2.1.0
|
||||||
aiodns==3.2.0
|
aiodns==3.2.0
|
||||||
aiohasupervisor==0.2.1
|
aiohasupervisor==0.2.1
|
||||||
aiohttp-fast-zlib==0.1.1
|
aiohttp-fast-zlib==0.1.1
|
||||||
aiohttp==3.10.10
|
aiohttp==3.11.0b3
|
||||||
aiohttp_cors==0.7.0
|
aiohttp_cors==0.7.0
|
||||||
aiozoneinfo==0.2.1
|
aiozoneinfo==0.2.1
|
||||||
astral==2.2
|
astral==2.2
|
||||||
|
|
|
@ -28,7 +28,7 @@ dependencies = [
|
||||||
# change behavior based on presence of supervisor. Deprecated with #127228
|
# change behavior based on presence of supervisor. Deprecated with #127228
|
||||||
# Lib can be removed with 2025.11
|
# Lib can be removed with 2025.11
|
||||||
"aiohasupervisor==0.2.1",
|
"aiohasupervisor==0.2.1",
|
||||||
"aiohttp==3.10.10",
|
"aiohttp==3.11.0b3",
|
||||||
"aiohttp_cors==0.7.0",
|
"aiohttp_cors==0.7.0",
|
||||||
"aiohttp-fast-zlib==0.1.1",
|
"aiohttp-fast-zlib==0.1.1",
|
||||||
"aiozoneinfo==0.2.1",
|
"aiozoneinfo==0.2.1",
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
# Home Assistant Core
|
# Home Assistant Core
|
||||||
aiodns==3.2.0
|
aiodns==3.2.0
|
||||||
aiohasupervisor==0.2.1
|
aiohasupervisor==0.2.1
|
||||||
aiohttp==3.10.10
|
aiohttp==3.11.0b3
|
||||||
aiohttp_cors==0.7.0
|
aiohttp_cors==0.7.0
|
||||||
aiohttp-fast-zlib==0.1.1
|
aiohttp-fast-zlib==0.1.1
|
||||||
aiozoneinfo==0.2.1
|
aiozoneinfo==0.2.1
|
||||||
|
|
|
@ -275,7 +275,9 @@ async def test_limit_refetch(
|
||||||
|
|
||||||
with (
|
with (
|
||||||
pytest.raises(aiohttp.ServerTimeoutError),
|
pytest.raises(aiohttp.ServerTimeoutError),
|
||||||
patch("asyncio.timeout", side_effect=TimeoutError()),
|
patch.object(
|
||||||
|
client.session._connector, "connect", side_effect=asyncio.TimeoutError
|
||||||
|
),
|
||||||
):
|
):
|
||||||
resp = await client.get("/api/camera_proxy/camera.config_test")
|
resp = await client.get("/api/camera_proxy/camera.config_test")
|
||||||
|
|
||||||
|
|
|
@ -293,6 +293,6 @@ async def test_auth_sending_unknown_type_disconnects(
|
||||||
auth_msg = await ws.receive_json()
|
auth_msg = await ws.receive_json()
|
||||||
assert auth_msg["type"] == TYPE_AUTH_REQUIRED
|
assert auth_msg["type"] == TYPE_AUTH_REQUIRED
|
||||||
|
|
||||||
await ws._writer._send_frame(b"1" * 130, 0x30)
|
await ws._writer.send_frame(b"1" * 130, 0x30)
|
||||||
auth_msg = await ws.receive()
|
auth_msg = await ws.receive()
|
||||||
assert auth_msg.type == WSMsgType.close
|
assert auth_msg.type == WSMsgType.close
|
||||||
|
|
|
@ -5,7 +5,7 @@ from datetime import timedelta
|
||||||
from typing import Any, cast
|
from typing import Any, cast
|
||||||
from unittest.mock import patch
|
from unittest.mock import patch
|
||||||
|
|
||||||
from aiohttp import WSMsgType, WSServerHandshakeError, web
|
from aiohttp import ServerDisconnectedError, WSMsgType, web
|
||||||
import pytest
|
import pytest
|
||||||
|
|
||||||
from homeassistant.components.websocket_api import (
|
from homeassistant.components.websocket_api import (
|
||||||
|
@ -374,7 +374,7 @@ async def test_prepare_fail_timeout(
|
||||||
"homeassistant.components.websocket_api.http.web.WebSocketResponse.prepare",
|
"homeassistant.components.websocket_api.http.web.WebSocketResponse.prepare",
|
||||||
side_effect=(TimeoutError, web.WebSocketResponse.prepare),
|
side_effect=(TimeoutError, web.WebSocketResponse.prepare),
|
||||||
),
|
),
|
||||||
pytest.raises(WSServerHandshakeError),
|
pytest.raises(ServerDisconnectedError),
|
||||||
):
|
):
|
||||||
await hass_ws_client(hass)
|
await hass_ws_client(hass)
|
||||||
|
|
||||||
|
@ -392,7 +392,7 @@ async def test_prepare_fail_connection_reset(
|
||||||
"homeassistant.components.websocket_api.http.web.WebSocketResponse.prepare",
|
"homeassistant.components.websocket_api.http.web.WebSocketResponse.prepare",
|
||||||
side_effect=(ConnectionResetError, web.WebSocketResponse.prepare),
|
side_effect=(ConnectionResetError, web.WebSocketResponse.prepare),
|
||||||
),
|
),
|
||||||
pytest.raises(WSServerHandshakeError),
|
pytest.raises(ServerDisconnectedError),
|
||||||
):
|
):
|
||||||
await hass_ws_client(hass)
|
await hass_ws_client(hass)
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue