Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump aiohttp to 3.10.0b1 #122409

Merged
merged 14 commits into from
Jul 23, 2024
5 changes: 0 additions & 5 deletions homeassistant/components/http/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
from aiohttp.typedefs import JSONDecoder, StrOrURL
from aiohttp.web_exceptions import HTTPMovedPermanently, HTTPRedirection
from aiohttp.web_protocol import RequestHandler
from aiohttp_fast_url_dispatcher import FastUrlDispatcher, attach_fast_url_dispatcher
from cryptography import x509
from cryptography.hazmat.primitives import hashes, serialization
from cryptography.hazmat.primitives.asymmetric import rsa
Expand Down Expand Up @@ -335,10 +334,6 @@ def __init__(
"max_field_size": MAX_LINE_SIZE,
},
)
# By default aiohttp does a linear search for routing rules,
# we have a lot of routes, so use a dict lookup with a fallback
# to the linear search.
attach_fast_url_dispatcher(self.app, FastUrlDispatcher())
self.hass = hass
self.ssl_certificate = ssl_certificate
self.ssl_peer_certificate = ssl_peer_certificate
Expand Down
2 changes: 1 addition & 1 deletion homeassistant/components/lifx_cloud/scene.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ async def async_setup_platform(
try:
httpsession = async_get_clientsession(hass)
async with asyncio.timeout(timeout):
scenes_resp = await httpsession.get(url, headers=headers)
scenes_resp = await httpsession.get(url, headers=headers) # type: ignore[arg-type]
bdraco marked this conversation as resolved.
Show resolved Hide resolved

except (TimeoutError, aiohttp.ClientError):
_LOGGER.exception("Error on %s", url)
Expand Down
2 changes: 1 addition & 1 deletion homeassistant/components/no_ip/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ async def _update_no_ip(

try:
async with asyncio.timeout(timeout):
resp = await session.get(url, params=params, headers=headers)
resp = await session.get(url, params=params, headers=headers) # type: ignore[arg-type]
bdraco marked this conversation as resolved.
Show resolved Hide resolved
body = await resp.text()

if body.startswith(("good", "nochg")):
Expand Down
2 changes: 1 addition & 1 deletion homeassistant/helpers/aiohttp_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
import aiohttp
from aiohttp import web
from aiohttp.hdrs import CONTENT_TYPE, USER_AGENT
from aiohttp.resolver import AsyncResolver
from aiohttp.web_exceptions import HTTPBadGateway, HTTPGatewayTimeout

from homeassistant import config_entries
Expand All @@ -24,7 +25,6 @@
from homeassistant.util.hass_dict import HassKey
from homeassistant.util.json import json_loads

from .backports.aiohttp_resolver import AsyncResolver
from .frame import warn_use
from .json import json_dumps

Expand Down
1 change: 0 additions & 1 deletion homeassistant/helpers/backports/__init__.py

This file was deleted.

116 changes: 0 additions & 116 deletions homeassistant/helpers/backports/aiohttp_resolver.py

This file was deleted.

3 changes: 1 addition & 2 deletions homeassistant/package_constraints.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,8 @@
aiodhcpwatcher==1.0.2
aiodiscover==2.1.0
aiodns==3.2.0
aiohttp-fast-url-dispatcher==0.3.0
aiohttp-fast-zlib==0.1.1
aiohttp==3.9.5
aiohttp==3.10.0b1
aiohttp_cors==0.7.0
aiozoneinfo==0.2.1
astral==2.2
Expand Down
3 changes: 1 addition & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,8 @@ classifiers = [
requires-python = ">=3.12.0"
dependencies = [
"aiodns==3.2.0",
"aiohttp==3.9.5",
"aiohttp==3.10.0b1",
"aiohttp_cors==0.7.0",
"aiohttp-fast-url-dispatcher==0.3.0",
"aiohttp-fast-zlib==0.1.1",
"aiozoneinfo==0.2.1",
"astral==2.2",
Expand Down
3 changes: 1 addition & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,8 @@

# Home Assistant Core
aiodns==3.2.0
aiohttp==3.9.5
aiohttp==3.10.0b1
aiohttp_cors==0.7.0
aiohttp-fast-url-dispatcher==0.3.0
aiohttp-fast-zlib==0.1.1
aiozoneinfo==0.2.1
astral==2.2
Expand Down
1 change: 0 additions & 1 deletion script/licenses.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,6 @@ def from_dict(cls, data: dict[str, str]) -> PackageDefinition:
"aiocomelit", # https://github.com/chemelli74/aiocomelit/pull/138
"aioecowitt", # https://github.com/home-assistant-libs/aioecowitt/pull/180
"aiohappyeyeballs", # PSF-2.0 license
"aiohttp-fast-url-dispatcher", # https://github.com/bdraco/aiohttp-fast-url-dispatcher/pull/10
"aioopenexchangerates", # https://github.com/MartinHjelmare/aioopenexchangerates/pull/94
"aiooui", # https://github.com/Bluetooth-Devices/aiooui/pull/8
"aioruuvigateway", # https://github.com/akx/aioruuvigateway/pull/6
Expand Down
4 changes: 2 additions & 2 deletions tests/components/websocket_api/test_http.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from typing import Any, cast
from unittest.mock import patch

from aiohttp import ServerDisconnectedError, WSMsgType, web
from aiohttp import WSMsgType, WSServerHandshakeError, web
import pytest

from homeassistant.components.websocket_api import (
Expand Down Expand Up @@ -374,7 +374,7 @@ async def test_prepare_fail(
"homeassistant.components.websocket_api.http.web.WebSocketResponse.prepare",
side_effect=(TimeoutError, web.WebSocketResponse.prepare),
),
pytest.raises(ServerDisconnectedError),
pytest.raises(WSServerHandshakeError),
):
await hass_ws_client(hass)

Expand Down
Loading