Skip to content

Commit

Permalink
Bump aiohttp to 3.10.0b1 (#122409)
Browse files Browse the repository at this point in the history
  • Loading branch information
bdraco authored Jul 23, 2024
1 parent d78327a commit 6bdc5be
Show file tree
Hide file tree
Showing 9 changed files with 6 additions and 132 deletions.
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/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

0 comments on commit 6bdc5be

Please sign in to comment.