mirror of
https://github.com/home-assistant/core.git
synced 2025-07-16 09:47:13 +00:00
Remove async-timeout as core dependency (#100912)
This commit is contained in:
parent
4df14b2625
commit
bd7a86a0a6
@ -8,7 +8,6 @@ import dataclasses
|
|||||||
import logging
|
import logging
|
||||||
from typing import Any, Protocol
|
from typing import Any, Protocol
|
||||||
|
|
||||||
import async_timeout
|
|
||||||
import voluptuous as vol
|
import voluptuous as vol
|
||||||
import yarl
|
import yarl
|
||||||
|
|
||||||
@ -74,7 +73,7 @@ class WaitingAddonManager(AddonManager):
|
|||||||
|
|
||||||
async def async_wait_until_addon_state(self, *states: AddonState) -> None:
|
async def async_wait_until_addon_state(self, *states: AddonState) -> None:
|
||||||
"""Poll an addon's info until it is in a specific state."""
|
"""Poll an addon's info until it is in a specific state."""
|
||||||
async with async_timeout.timeout(ADDON_INFO_POLL_TIMEOUT):
|
async with asyncio.timeout(ADDON_INFO_POLL_TIMEOUT):
|
||||||
while True:
|
while True:
|
||||||
try:
|
try:
|
||||||
info = await self.async_get_addon_info()
|
info = await self.async_get_addon_info()
|
||||||
|
@ -9,7 +9,6 @@ from functools import cached_property
|
|||||||
import logging
|
import logging
|
||||||
from typing import TypeVar
|
from typing import TypeVar
|
||||||
|
|
||||||
import async_timeout
|
|
||||||
from pyrainbird.async_client import (
|
from pyrainbird.async_client import (
|
||||||
AsyncRainbirdController,
|
AsyncRainbirdController,
|
||||||
RainbirdApiException,
|
RainbirdApiException,
|
||||||
@ -140,7 +139,7 @@ class RainbirdScheduleUpdateCoordinator(DataUpdateCoordinator[Schedule]):
|
|||||||
async def _async_update_data(self) -> Schedule:
|
async def _async_update_data(self) -> Schedule:
|
||||||
"""Fetch data from Rain Bird device."""
|
"""Fetch data from Rain Bird device."""
|
||||||
try:
|
try:
|
||||||
async with async_timeout.timeout(TIMEOUT_SECONDS):
|
async with asyncio.timeout(TIMEOUT_SECONDS):
|
||||||
return await self._controller.get_schedule()
|
return await self._controller.get_schedule()
|
||||||
except RainbirdApiException as err:
|
except RainbirdApiException as err:
|
||||||
raise UpdateFailed(f"Error communicating with Device: {err}") from err
|
raise UpdateFailed(f"Error communicating with Device: {err}") from err
|
||||||
|
@ -2,7 +2,6 @@ aiodiscover==1.5.1
|
|||||||
aiohttp==3.8.5
|
aiohttp==3.8.5
|
||||||
aiohttp_cors==0.7.0
|
aiohttp_cors==0.7.0
|
||||||
astral==2.2
|
astral==2.2
|
||||||
async-timeout==4.0.3
|
|
||||||
async-upnp-client==0.36.0
|
async-upnp-client==0.36.0
|
||||||
atomicwrites-homeassistant==1.4.1
|
atomicwrites-homeassistant==1.4.1
|
||||||
attrs==23.1.0
|
attrs==23.1.0
|
||||||
|
@ -25,7 +25,6 @@ requires-python = ">=3.11.0"
|
|||||||
dependencies = [
|
dependencies = [
|
||||||
"aiohttp==3.8.5",
|
"aiohttp==3.8.5",
|
||||||
"astral==2.2",
|
"astral==2.2",
|
||||||
"async-timeout==4.0.3",
|
|
||||||
"attrs==23.1.0",
|
"attrs==23.1.0",
|
||||||
"atomicwrites-homeassistant==1.4.1",
|
"atomicwrites-homeassistant==1.4.1",
|
||||||
"awesomeversion==23.8.0",
|
"awesomeversion==23.8.0",
|
||||||
|
@ -3,7 +3,6 @@
|
|||||||
# Home Assistant Core
|
# Home Assistant Core
|
||||||
aiohttp==3.8.5
|
aiohttp==3.8.5
|
||||||
astral==2.2
|
astral==2.2
|
||||||
async-timeout==4.0.3
|
|
||||||
attrs==23.1.0
|
attrs==23.1.0
|
||||||
atomicwrites-homeassistant==1.4.1
|
atomicwrites-homeassistant==1.4.1
|
||||||
awesomeversion==23.8.0
|
awesomeversion==23.8.0
|
||||||
|
Loading…
x
Reference in New Issue
Block a user