Changes for aiohttp 3.10.0 (#122463)

This commit is contained in:
Marc Mueller 2024-07-23 15:37:26 +02:00 committed by GitHub
parent 32cd54b1e3
commit 5727f30026
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 4 additions and 3 deletions

View file

@ -42,7 +42,7 @@ async def async_setup_platform(
token = config.get(CONF_TOKEN)
timeout = config.get(CONF_TIMEOUT)
headers = {AUTHORIZATION: f"Bearer {token}"}
headers: dict[str, str] = {AUTHORIZATION: f"Bearer {token}"}
url = "https://api.lifx.com/v1/scenes"

View file

@ -94,7 +94,7 @@ async def _update_no_ip(
params = {"hostname": domain}
headers = {
headers: dict[str, str] = {
AUTHORIZATION: f"Basic {auth_str.decode('utf-8')}",
USER_AGENT: HA_USER_AGENT,
}

View file

@ -5,6 +5,7 @@ from __future__ import annotations
import asyncio
from collections.abc import Awaitable, Callable
from contextlib import suppress
import socket
from ssl import SSLContext
import sys
from types import MappingProxyType
@ -300,7 +301,7 @@ def _async_get_connector(
ssl_context = ssl_util.get_default_no_verify_context()
connector = aiohttp.TCPConnector(
family=family,
family=socket.AddressFamily(family),
enable_cleanup_closed=ENABLE_CLEANUP_CLOSED,
ssl=ssl_context,
limit=MAXIMUM_CONNECTIONS,