mirror of
https://github.com/home-assistant/core.git
synced 2025-04-19 14:57:52 +00:00
Switch to using fast cached_property implementation in propcache (#127339)
This commit is contained in:
parent
58f786f6d0
commit
0f29fd3e10
8
.github/workflows/wheels.yml
vendored
8
.github/workflows/wheels.yml
vendored
@ -219,7 +219,7 @@ jobs:
|
||||
wheels-key: ${{ secrets.WHEELS_KEY }}
|
||||
env-file: true
|
||||
apk: "bluez-dev;libffi-dev;openssl-dev;glib-dev;eudev-dev;libxml2-dev;libxslt-dev;libpng-dev;libjpeg-turbo-dev;tiff-dev;cups-dev;gmp-dev;mpfr-dev;mpc1-dev;ffmpeg-dev;gammu-dev;yaml-dev;openblas-dev;fftw-dev;lapack-dev;gfortran;blas-dev;eigen-dev;freetype-dev;glew-dev;harfbuzz-dev;hdf5-dev;libdc1394-dev;libtbb-dev;mesa-dev;openexr-dev;openjpeg-dev;uchardet-dev"
|
||||
skip-binary: aiohttp;charset-normalizer;grpcio;multidict;SQLAlchemy;protobuf;pydantic;pymicro-vad;yarl
|
||||
skip-binary: aiohttp;charset-normalizer;grpcio;multidict;SQLAlchemy;propcache;protobuf;pydantic;pymicro-vad;yarl
|
||||
constraints: "homeassistant/package_constraints.txt"
|
||||
requirements-diff: "requirements_diff.txt"
|
||||
requirements: "requirements_old-cython.txt"
|
||||
@ -234,7 +234,7 @@ jobs:
|
||||
wheels-key: ${{ secrets.WHEELS_KEY }}
|
||||
env-file: true
|
||||
apk: "bluez-dev;libffi-dev;openssl-dev;glib-dev;eudev-dev;libxml2-dev;libxslt-dev;libpng-dev;libjpeg-turbo-dev;tiff-dev;cups-dev;gmp-dev;mpfr-dev;mpc1-dev;ffmpeg-dev;gammu-dev;yaml-dev;openblas-dev;fftw-dev;lapack-dev;gfortran;blas-dev;eigen-dev;freetype-dev;glew-dev;harfbuzz-dev;hdf5-dev;libdc1394-dev;libtbb-dev;mesa-dev;openexr-dev;openjpeg-dev;uchardet-dev;nasm"
|
||||
skip-binary: aiohttp;charset-normalizer;grpcio;multidict;SQLAlchemy;protobuf;pydantic;pymicro-vad;yarl
|
||||
skip-binary: aiohttp;charset-normalizer;grpcio;multidict;SQLAlchemy;propcache;protobuf;pydantic;pymicro-vad;yarl
|
||||
constraints: "homeassistant/package_constraints.txt"
|
||||
requirements-diff: "requirements_diff.txt"
|
||||
requirements: "requirements_all.txtaa"
|
||||
@ -248,7 +248,7 @@ jobs:
|
||||
wheels-key: ${{ secrets.WHEELS_KEY }}
|
||||
env-file: true
|
||||
apk: "bluez-dev;libffi-dev;openssl-dev;glib-dev;eudev-dev;libxml2-dev;libxslt-dev;libpng-dev;libjpeg-turbo-dev;tiff-dev;cups-dev;gmp-dev;mpfr-dev;mpc1-dev;ffmpeg-dev;gammu-dev;yaml-dev;openblas-dev;fftw-dev;lapack-dev;gfortran;blas-dev;eigen-dev;freetype-dev;glew-dev;harfbuzz-dev;hdf5-dev;libdc1394-dev;libtbb-dev;mesa-dev;openexr-dev;openjpeg-dev;uchardet-dev;nasm"
|
||||
skip-binary: aiohttp;charset-normalizer;grpcio;multidict;SQLAlchemy;protobuf;pydantic;pymicro-vad;yarl
|
||||
skip-binary: aiohttp;charset-normalizer;grpcio;multidict;SQLAlchemy;propcache;protobuf;pydantic;pymicro-vad;yarl
|
||||
constraints: "homeassistant/package_constraints.txt"
|
||||
requirements-diff: "requirements_diff.txt"
|
||||
requirements: "requirements_all.txtab"
|
||||
@ -262,7 +262,7 @@ jobs:
|
||||
wheels-key: ${{ secrets.WHEELS_KEY }}
|
||||
env-file: true
|
||||
apk: "bluez-dev;libffi-dev;openssl-dev;glib-dev;eudev-dev;libxml2-dev;libxslt-dev;libpng-dev;libjpeg-turbo-dev;tiff-dev;cups-dev;gmp-dev;mpfr-dev;mpc1-dev;ffmpeg-dev;gammu-dev;yaml-dev;openblas-dev;fftw-dev;lapack-dev;gfortran;blas-dev;eigen-dev;freetype-dev;glew-dev;harfbuzz-dev;hdf5-dev;libdc1394-dev;libtbb-dev;mesa-dev;openexr-dev;openjpeg-dev;uchardet-dev;nasm"
|
||||
skip-binary: aiohttp;charset-normalizer;grpcio;multidict;SQLAlchemy;protobuf;pydantic;pymicro-vad;yarl
|
||||
skip-binary: aiohttp;charset-normalizer;grpcio;multidict;SQLAlchemy;propcache;protobuf;pydantic;pymicro-vad;yarl
|
||||
constraints: "homeassistant/package_constraints.txt"
|
||||
requirements-diff: "requirements_diff.txt"
|
||||
requirements: "requirements_all.txtac"
|
||||
|
@ -3,7 +3,6 @@
|
||||
from __future__ import annotations
|
||||
|
||||
from datetime import datetime, timedelta
|
||||
from functools import cached_property
|
||||
import secrets
|
||||
from typing import Any, NamedTuple
|
||||
import uuid
|
||||
@ -11,6 +10,7 @@ import uuid
|
||||
import attr
|
||||
from attr import Attribute
|
||||
from attr.setters import validate
|
||||
from propcache import cached_property
|
||||
|
||||
from homeassistant.const import __version__
|
||||
from homeassistant.data_entry_flow import FlowResult
|
||||
|
@ -1,7 +1,8 @@
|
||||
"""Airgradient Update platform."""
|
||||
|
||||
from datetime import timedelta
|
||||
from functools import cached_property
|
||||
|
||||
from propcache import cached_property
|
||||
|
||||
from homeassistant.components.update import UpdateDeviceClass, UpdateEntity
|
||||
from homeassistant.core import HomeAssistant
|
||||
|
@ -3,10 +3,11 @@
|
||||
from __future__ import annotations
|
||||
|
||||
from datetime import timedelta
|
||||
from functools import cached_property, partial
|
||||
from functools import partial
|
||||
import logging
|
||||
from typing import Any, Final, final
|
||||
|
||||
from propcache import cached_property
|
||||
import voluptuous as vol
|
||||
|
||||
from homeassistant.config_entries import ConfigEntry
|
||||
|
@ -6,10 +6,11 @@ from abc import ABC, abstractmethod
|
||||
import asyncio
|
||||
from collections.abc import Callable, Mapping
|
||||
from dataclasses import dataclass
|
||||
from functools import cached_property, partial
|
||||
from functools import partial
|
||||
import logging
|
||||
from typing import Any, Protocol, cast
|
||||
|
||||
from propcache import cached_property
|
||||
import voluptuous as vol
|
||||
|
||||
from homeassistant.components import websocket_api
|
||||
|
@ -4,10 +4,11 @@ from __future__ import annotations
|
||||
|
||||
from datetime import timedelta
|
||||
from enum import StrEnum
|
||||
from functools import cached_property, partial
|
||||
from functools import partial
|
||||
import logging
|
||||
from typing import Literal, final
|
||||
|
||||
from propcache import cached_property
|
||||
import voluptuous as vol
|
||||
|
||||
from homeassistant.config_entries import ConfigEntry
|
||||
|
@ -4,10 +4,10 @@ from __future__ import annotations
|
||||
|
||||
from datetime import timedelta
|
||||
from enum import StrEnum
|
||||
from functools import cached_property
|
||||
import logging
|
||||
from typing import final
|
||||
|
||||
from propcache import cached_property
|
||||
import voluptuous as vol
|
||||
|
||||
from homeassistant.config_entries import ConfigEntry
|
||||
|
@ -9,7 +9,7 @@ from contextlib import suppress
|
||||
from dataclasses import asdict
|
||||
from datetime import datetime, timedelta
|
||||
from enum import IntFlag
|
||||
from functools import cached_property, partial
|
||||
from functools import partial
|
||||
import logging
|
||||
import os
|
||||
from random import SystemRandom
|
||||
@ -18,6 +18,7 @@ from typing import Any, Final, final
|
||||
|
||||
from aiohttp import hdrs, web
|
||||
import attr
|
||||
from propcache import cached_property
|
||||
import voluptuous as vol
|
||||
|
||||
from homeassistant.components import websocket_api
|
||||
|
@ -5,10 +5,10 @@ from __future__ import annotations
|
||||
import asyncio
|
||||
from datetime import timedelta
|
||||
import functools as ft
|
||||
from functools import cached_property
|
||||
import logging
|
||||
from typing import Any, Literal, final
|
||||
|
||||
from propcache import cached_property
|
||||
import voluptuous as vol
|
||||
|
||||
from homeassistant.config_entries import ConfigEntry
|
||||
|
@ -6,10 +6,10 @@ from collections.abc import Callable
|
||||
from datetime import timedelta
|
||||
from enum import IntFlag, StrEnum
|
||||
import functools as ft
|
||||
from functools import cached_property
|
||||
import logging
|
||||
from typing import Any, final
|
||||
|
||||
from propcache import cached_property
|
||||
import voluptuous as vol
|
||||
|
||||
from homeassistant.config_entries import ConfigEntry
|
||||
|
@ -3,10 +3,10 @@
|
||||
from __future__ import annotations
|
||||
|
||||
from datetime import date, timedelta
|
||||
from functools import cached_property
|
||||
import logging
|
||||
from typing import final
|
||||
|
||||
from propcache import cached_property
|
||||
import voluptuous as vol
|
||||
|
||||
from homeassistant.config_entries import ConfigEntry
|
||||
|
@ -3,10 +3,10 @@
|
||||
from __future__ import annotations
|
||||
|
||||
from datetime import UTC, datetime, timedelta
|
||||
from functools import cached_property
|
||||
import logging
|
||||
from typing import final
|
||||
|
||||
from propcache import cached_property
|
||||
import voluptuous as vol
|
||||
|
||||
from homeassistant.config_entries import ConfigEntry
|
||||
|
@ -3,9 +3,10 @@
|
||||
from __future__ import annotations
|
||||
|
||||
import asyncio
|
||||
from functools import cached_property
|
||||
from typing import final
|
||||
|
||||
from propcache import cached_property
|
||||
|
||||
from homeassistant.components import zone
|
||||
from homeassistant.config_entries import ConfigEntry
|
||||
from homeassistant.const import (
|
||||
|
@ -5,12 +5,12 @@ from __future__ import annotations
|
||||
import asyncio
|
||||
from collections.abc import Callable, Coroutine, Sequence
|
||||
from datetime import datetime, timedelta
|
||||
from functools import cached_property
|
||||
import hashlib
|
||||
from types import ModuleType
|
||||
from typing import Any, Final, Protocol, final
|
||||
|
||||
import attr
|
||||
from propcache import cached_property
|
||||
import voluptuous as vol
|
||||
|
||||
from homeassistant import util
|
||||
|
@ -7,7 +7,6 @@ from collections.abc import Callable, Coroutine
|
||||
from dataclasses import dataclass
|
||||
from enum import StrEnum
|
||||
import functools
|
||||
from functools import cached_property
|
||||
from typing import Any, cast
|
||||
|
||||
from async_upnp_client.aiohttp import AiohttpSessionRequester
|
||||
@ -17,6 +16,7 @@ from async_upnp_client.const import NotificationSubType
|
||||
from async_upnp_client.exceptions import UpnpActionError, UpnpConnectionError, UpnpError
|
||||
from async_upnp_client.profiles.dlna import ContentDirectoryErrorCode, DmsDevice
|
||||
from didl_lite import didl_lite
|
||||
from propcache import cached_property
|
||||
|
||||
from homeassistant.components import ssdp
|
||||
from homeassistant.components.media_player import BrowseError, MediaClass
|
||||
|
@ -4,7 +4,6 @@ from __future__ import annotations
|
||||
|
||||
from collections import defaultdict
|
||||
from dataclasses import dataclass
|
||||
from functools import cached_property
|
||||
from http import HTTPStatus
|
||||
import logging
|
||||
from typing import Any
|
||||
@ -16,6 +15,7 @@ from doorbirdpy import (
|
||||
DoorBirdScheduleEntryOutput,
|
||||
DoorBirdScheduleEntrySchedule,
|
||||
)
|
||||
from propcache import cached_property
|
||||
|
||||
from homeassistant.const import ATTR_ENTITY_ID
|
||||
from homeassistant.core import HomeAssistant
|
||||
|
@ -5,10 +5,11 @@ from __future__ import annotations
|
||||
from dataclasses import asdict, dataclass
|
||||
from datetime import datetime, timedelta
|
||||
from enum import StrEnum
|
||||
from functools import cached_property
|
||||
import logging
|
||||
from typing import Any, Self, final
|
||||
|
||||
from propcache import cached_property
|
||||
|
||||
from homeassistant.config_entries import ConfigEntry
|
||||
from homeassistant.core import HomeAssistant
|
||||
from homeassistant.helpers import config_validation as cv
|
||||
|
@ -6,11 +6,11 @@ import asyncio
|
||||
from datetime import timedelta
|
||||
from enum import IntFlag
|
||||
import functools as ft
|
||||
from functools import cached_property
|
||||
import logging
|
||||
import math
|
||||
from typing import Any, final
|
||||
|
||||
from propcache import cached_property
|
||||
import voluptuous as vol
|
||||
|
||||
from homeassistant.config_entries import ConfigEntry
|
||||
|
@ -3,11 +3,11 @@
|
||||
from __future__ import annotations
|
||||
|
||||
import asyncio
|
||||
from functools import cached_property
|
||||
import re
|
||||
|
||||
from haffmpeg.core import HAFFmpeg
|
||||
from haffmpeg.tools import IMAGE_JPEG, FFVersion, ImageFrame
|
||||
from propcache import cached_property
|
||||
import voluptuous as vol
|
||||
|
||||
from homeassistant.const import (
|
||||
|
@ -4,12 +4,12 @@ from __future__ import annotations
|
||||
|
||||
from collections import namedtuple
|
||||
from datetime import timedelta
|
||||
from functools import cached_property
|
||||
import logging
|
||||
from typing import Any
|
||||
|
||||
from fints.client import FinTS3PinTanClient
|
||||
from fints.models import SEPAAccount
|
||||
from propcache import cached_property
|
||||
import voluptuous as vol
|
||||
|
||||
from homeassistant.components.sensor import (
|
||||
|
@ -3,7 +3,7 @@
|
||||
from __future__ import annotations
|
||||
|
||||
from collections.abc import Callable, Iterator
|
||||
from functools import cached_property, lru_cache, partial
|
||||
from functools import lru_cache, partial
|
||||
import logging
|
||||
import os
|
||||
import pathlib
|
||||
@ -11,6 +11,7 @@ from typing import Any, TypedDict
|
||||
|
||||
from aiohttp import hdrs, web, web_urldispatcher
|
||||
import jinja2
|
||||
from propcache import cached_property
|
||||
import voluptuous as vol
|
||||
from yarl import URL
|
||||
|
||||
|
@ -3,10 +3,11 @@
|
||||
from __future__ import annotations
|
||||
|
||||
from datetime import timedelta
|
||||
from functools import cached_property
|
||||
import logging
|
||||
from typing import Any, final
|
||||
|
||||
from propcache import cached_property
|
||||
|
||||
from homeassistant.config_entries import ConfigEntry
|
||||
from homeassistant.const import ATTR_LATITUDE, ATTR_LONGITUDE
|
||||
from homeassistant.core import HomeAssistant
|
||||
|
@ -2,7 +2,6 @@
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from functools import cached_property
|
||||
import logging
|
||||
from typing import Any, Final
|
||||
|
||||
@ -17,6 +16,7 @@ from aiohomekit.model.characteristics import (
|
||||
)
|
||||
from aiohomekit.model.services import Service, ServicesTypes
|
||||
from aiohomekit.utils import clamp_enum_to_char
|
||||
from propcache import cached_property
|
||||
|
||||
from homeassistant.components.climate import (
|
||||
ATTR_HVAC_MODE,
|
||||
|
@ -2,11 +2,11 @@
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from functools import cached_property
|
||||
from typing import Any
|
||||
|
||||
from aiohomekit.model.characteristics import CharacteristicsTypes
|
||||
from aiohomekit.model.services import Service, ServicesTypes
|
||||
from propcache import cached_property
|
||||
|
||||
from homeassistant.components.cover import (
|
||||
ATTR_POSITION,
|
||||
|
@ -2,11 +2,11 @@
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from functools import cached_property
|
||||
from typing import Any
|
||||
|
||||
from aiohomekit.model.characteristics import CharacteristicsTypes
|
||||
from aiohomekit.model.services import Service, ServicesTypes
|
||||
from propcache import cached_property
|
||||
|
||||
from homeassistant.components.fan import (
|
||||
DIRECTION_FORWARD,
|
||||
|
@ -2,11 +2,11 @@
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from functools import cached_property
|
||||
from typing import Any
|
||||
|
||||
from aiohomekit.model.characteristics import CharacteristicsTypes
|
||||
from aiohomekit.model.services import Service, ServicesTypes
|
||||
from propcache import cached_property
|
||||
|
||||
from homeassistant.components.humidifier import (
|
||||
DEFAULT_MAX_HUMIDITY,
|
||||
|
@ -2,11 +2,11 @@
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from functools import cached_property
|
||||
from typing import Any
|
||||
|
||||
from aiohomekit.model.characteristics import CharacteristicsTypes
|
||||
from aiohomekit.model.services import Service, ServicesTypes
|
||||
from propcache import cached_property
|
||||
|
||||
from homeassistant.components.light import (
|
||||
ATTR_BRIGHTNESS,
|
||||
|
@ -4,10 +4,11 @@ from __future__ import annotations
|
||||
|
||||
from datetime import timedelta
|
||||
from enum import StrEnum
|
||||
from functools import cached_property, partial
|
||||
from functools import partial
|
||||
import logging
|
||||
from typing import Any, final
|
||||
|
||||
from propcache import cached_property
|
||||
import voluptuous as vol
|
||||
|
||||
from homeassistant.config_entries import ConfigEntry
|
||||
|
@ -7,13 +7,13 @@ import collections
|
||||
from contextlib import suppress
|
||||
from dataclasses import dataclass
|
||||
from datetime import datetime, timedelta
|
||||
from functools import cached_property
|
||||
import logging
|
||||
from random import SystemRandom
|
||||
from typing import Final, final
|
||||
|
||||
from aiohttp import hdrs, web
|
||||
import httpx
|
||||
from propcache import cached_property
|
||||
|
||||
from homeassistant.components.http import KEY_AUTHENTICATED, KEY_HASS, HomeAssistantView
|
||||
from homeassistant.config_entries import ConfigEntry
|
||||
|
@ -6,11 +6,11 @@ import asyncio
|
||||
from collections.abc import Callable
|
||||
from dataclasses import dataclass
|
||||
from enum import StrEnum
|
||||
from functools import cached_property
|
||||
import logging
|
||||
import time
|
||||
from typing import Any
|
||||
|
||||
from propcache import cached_property
|
||||
import voluptuous as vol
|
||||
|
||||
from homeassistant.const import ATTR_DEVICE_ID, ATTR_ID, ATTR_NAME
|
||||
|
@ -3,10 +3,11 @@
|
||||
from __future__ import annotations
|
||||
|
||||
from datetime import timedelta
|
||||
from functools import cached_property
|
||||
import logging
|
||||
from typing import final
|
||||
|
||||
from propcache import cached_property
|
||||
|
||||
from homeassistant.config_entries import ConfigEntry
|
||||
from homeassistant.core import HomeAssistant
|
||||
from homeassistant.helpers import config_validation as cv
|
||||
|
@ -6,7 +6,7 @@ import asyncio
|
||||
from collections.abc import Callable
|
||||
from datetime import timedelta
|
||||
from enum import IntEnum
|
||||
from functools import cached_property, partial
|
||||
from functools import partial
|
||||
from math import floor, log10
|
||||
from typing import Any, cast
|
||||
|
||||
@ -21,6 +21,7 @@ from aiolifx.aiolifx import (
|
||||
from aiolifx.connection import LIFXConnection
|
||||
from aiolifx_themes.themes import ThemeLibrary, ThemePainter
|
||||
from awesomeversion import AwesomeVersion
|
||||
from propcache import cached_property
|
||||
|
||||
from homeassistant.const import (
|
||||
SIGNAL_STRENGTH_DECIBELS,
|
||||
|
@ -7,11 +7,11 @@ import csv
|
||||
import dataclasses
|
||||
from datetime import timedelta
|
||||
from enum import IntFlag, StrEnum
|
||||
from functools import cached_property
|
||||
import logging
|
||||
import os
|
||||
from typing import Any, Self, cast, final
|
||||
|
||||
from propcache import cached_property
|
||||
import voluptuous as vol
|
||||
|
||||
from homeassistant.config_entries import ConfigEntry
|
||||
|
@ -5,11 +5,11 @@ from __future__ import annotations
|
||||
from datetime import timedelta
|
||||
from enum import IntFlag
|
||||
import functools as ft
|
||||
from functools import cached_property
|
||||
import logging
|
||||
import re
|
||||
from typing import TYPE_CHECKING, Any, final
|
||||
|
||||
from propcache import cached_property
|
||||
import voluptuous as vol
|
||||
|
||||
from homeassistant.config_entries import ConfigEntry
|
||||
|
@ -4,9 +4,9 @@ from __future__ import annotations
|
||||
|
||||
from collections.abc import Callable, Mapping
|
||||
from dataclasses import dataclass
|
||||
from functools import cached_property
|
||||
from typing import TYPE_CHECKING, Any, Final, NamedTuple, cast
|
||||
|
||||
from propcache import cached_property
|
||||
from sqlalchemy.engine.row import Row
|
||||
|
||||
from homeassistant.components.recorder.filters import Filters
|
||||
|
@ -4,7 +4,6 @@ from __future__ import annotations
|
||||
|
||||
from collections.abc import Callable
|
||||
from dataclasses import dataclass
|
||||
from functools import cached_property
|
||||
import logging
|
||||
from typing import TYPE_CHECKING, Any, cast
|
||||
|
||||
@ -12,6 +11,7 @@ from chip.clusters import Objects as clusters
|
||||
from chip.clusters.Objects import ClusterAttributeDescriptor, NullValue
|
||||
from matter_server.common.helpers.util import create_attribute_path
|
||||
from matter_server.common.models import EventType, ServerInfoMessage
|
||||
from propcache import cached_property
|
||||
|
||||
from homeassistant.core import callback
|
||||
from homeassistant.helpers.device_registry import DeviceInfo
|
||||
|
@ -9,7 +9,7 @@ from contextlib import suppress
|
||||
import datetime as dt
|
||||
from enum import StrEnum
|
||||
import functools as ft
|
||||
from functools import cached_property, lru_cache
|
||||
from functools import lru_cache
|
||||
import hashlib
|
||||
from http import HTTPStatus
|
||||
import logging
|
||||
@ -21,6 +21,7 @@ import aiohttp
|
||||
from aiohttp import web
|
||||
from aiohttp.hdrs import CACHE_CONTROL, CONTENT_TYPE
|
||||
from aiohttp.typedefs import LooseHeaders
|
||||
from propcache import cached_property
|
||||
import voluptuous as vol
|
||||
from yarl import URL
|
||||
|
||||
|
@ -6,13 +6,13 @@ import asyncio
|
||||
from collections import defaultdict
|
||||
from collections.abc import Callable, Iterable
|
||||
from datetime import date, timedelta
|
||||
from functools import cached_property
|
||||
from typing import Any
|
||||
|
||||
from nibe.coil import Coil, CoilData
|
||||
from nibe.connection import Connection
|
||||
from nibe.exceptions import CoilNotFoundException, ReadException
|
||||
from nibe.heatpump import HeatPump, Series
|
||||
from propcache import cached_property
|
||||
|
||||
from homeassistant.config_entries import ConfigEntry
|
||||
from homeassistant.core import CALLBACK_TYPE, HomeAssistant, callback
|
||||
|
@ -4,10 +4,11 @@ from __future__ import annotations
|
||||
|
||||
from datetime import timedelta
|
||||
from enum import IntFlag
|
||||
from functools import cached_property, partial
|
||||
from functools import partial
|
||||
import logging
|
||||
from typing import Any, final, override
|
||||
|
||||
from propcache import cached_property
|
||||
import voluptuous as vol
|
||||
|
||||
import homeassistant.components.persistent_notification as pn
|
||||
|
@ -6,11 +6,11 @@ from collections.abc import Callable
|
||||
from contextlib import suppress
|
||||
import dataclasses
|
||||
from datetime import timedelta
|
||||
from functools import cached_property
|
||||
import logging
|
||||
from math import ceil, floor
|
||||
from typing import TYPE_CHECKING, Any, Self, final
|
||||
|
||||
from propcache import cached_property
|
||||
import voluptuous as vol
|
||||
|
||||
from homeassistant.config_entries import ConfigEntry
|
||||
|
@ -3,9 +3,9 @@
|
||||
from __future__ import annotations
|
||||
|
||||
from asyncio import sleep
|
||||
from functools import cached_property
|
||||
from typing import Any, cast
|
||||
|
||||
from propcache import cached_property
|
||||
from pyoverkiz.enums import OverkizCommand, OverkizCommandParam, OverkizState
|
||||
|
||||
from homeassistant.components.climate import (
|
||||
|
@ -5,10 +5,10 @@ from __future__ import annotations
|
||||
import asyncio
|
||||
from dataclasses import dataclass
|
||||
import datetime
|
||||
from functools import cached_property
|
||||
import logging
|
||||
|
||||
import aiohttp
|
||||
from propcache import cached_property
|
||||
from pyrainbird.async_client import (
|
||||
AsyncRainbirdController,
|
||||
RainbirdApiException,
|
||||
|
@ -7,7 +7,6 @@ from collections.abc import Callable, Iterable
|
||||
from concurrent.futures import CancelledError
|
||||
import contextlib
|
||||
from datetime import datetime, timedelta
|
||||
from functools import cached_property
|
||||
import logging
|
||||
import queue
|
||||
import sqlite3
|
||||
@ -15,6 +14,7 @@ import threading
|
||||
import time
|
||||
from typing import TYPE_CHECKING, Any, cast
|
||||
|
||||
from propcache import cached_property
|
||||
import psutil_home_assistant as ha_psutil
|
||||
from sqlalchemy import create_engine, event as sqlalchemy_event, exc, select, update
|
||||
from sqlalchemy.engine import Engine
|
||||
|
@ -3,10 +3,10 @@
|
||||
from __future__ import annotations
|
||||
|
||||
from datetime import datetime
|
||||
from functools import cached_property
|
||||
import logging
|
||||
from typing import TYPE_CHECKING, Any
|
||||
|
||||
from propcache import cached_property
|
||||
from sqlalchemy.engine.row import Row
|
||||
|
||||
from homeassistant.const import (
|
||||
|
@ -6,10 +6,10 @@ from collections.abc import Iterable
|
||||
from datetime import timedelta
|
||||
from enum import IntFlag
|
||||
import functools as ft
|
||||
from functools import cached_property
|
||||
import logging
|
||||
from typing import Any, final
|
||||
|
||||
from propcache import cached_property
|
||||
import voluptuous as vol
|
||||
|
||||
from homeassistant.config_entries import ConfigEntry
|
||||
|
@ -4,9 +4,9 @@ from __future__ import annotations
|
||||
|
||||
import asyncio
|
||||
from datetime import timedelta
|
||||
from functools import cached_property
|
||||
import logging
|
||||
|
||||
from propcache import cached_property
|
||||
from roborock import HomeDataRoom
|
||||
from roborock.code_mappings import RoborockCategory
|
||||
from roborock.containers import DeviceData, HomeDataDevice, HomeDataProduct, NetworkInfo
|
||||
|
@ -5,10 +5,10 @@ from __future__ import annotations
|
||||
from abc import ABC, abstractmethod
|
||||
import asyncio
|
||||
from dataclasses import dataclass
|
||||
from functools import cached_property
|
||||
import logging
|
||||
from typing import TYPE_CHECKING, Any, cast
|
||||
|
||||
from propcache import cached_property
|
||||
import voluptuous as vol
|
||||
|
||||
from homeassistant.components import websocket_api
|
||||
|
@ -3,10 +3,10 @@
|
||||
from __future__ import annotations
|
||||
|
||||
from datetime import timedelta
|
||||
from functools import cached_property
|
||||
import logging
|
||||
from typing import Any, final
|
||||
|
||||
from propcache import cached_property
|
||||
import voluptuous as vol
|
||||
|
||||
from homeassistant.config_entries import ConfigEntry
|
||||
|
@ -8,11 +8,13 @@ from contextlib import suppress
|
||||
from dataclasses import dataclass
|
||||
from datetime import UTC, date, datetime, timedelta
|
||||
from decimal import Decimal, InvalidOperation as DecimalInvalidOperation
|
||||
from functools import cached_property, partial
|
||||
from functools import partial
|
||||
import logging
|
||||
from math import ceil, floor, isfinite, log10
|
||||
from typing import Any, Final, Self, cast, final, override
|
||||
|
||||
from propcache import cached_property
|
||||
|
||||
from homeassistant.config_entries import ConfigEntry
|
||||
from homeassistant.const import ( # noqa: F401
|
||||
_DEPRECATED_DEVICE_CLASS_AQI,
|
||||
|
@ -6,7 +6,6 @@ import asyncio
|
||||
from collections.abc import Callable, Coroutine
|
||||
from dataclasses import dataclass
|
||||
from datetime import timedelta
|
||||
from functools import cached_property
|
||||
from typing import Any, cast
|
||||
|
||||
from aioshelly.ble import async_ensure_ble_enabled, async_stop_scanner
|
||||
@ -14,6 +13,7 @@ from aioshelly.block_device import BlockDevice, BlockUpdateType
|
||||
from aioshelly.const import MODEL_NAMES, MODEL_VALVE
|
||||
from aioshelly.exceptions import DeviceConnectionError, InvalidAuthError, RpcCallError
|
||||
from aioshelly.rpc_device import RpcDevice, RpcUpdateType
|
||||
from propcache import cached_property
|
||||
|
||||
from homeassistant.config_entries import ConfigEntry, ConfigEntryState
|
||||
from homeassistant.const import (
|
||||
|
@ -3,10 +3,11 @@
|
||||
from __future__ import annotations
|
||||
|
||||
from datetime import timedelta
|
||||
from functools import cached_property, partial
|
||||
from functools import partial
|
||||
import logging
|
||||
from typing import Any, TypedDict, cast, final
|
||||
|
||||
from propcache import cached_property
|
||||
import voluptuous as vol
|
||||
|
||||
from homeassistant.config_entries import ConfigEntry
|
||||
|
@ -4,9 +4,10 @@ from __future__ import annotations
|
||||
|
||||
from datetime import timedelta
|
||||
from enum import StrEnum
|
||||
from functools import cached_property, partial
|
||||
from functools import partial
|
||||
import logging
|
||||
|
||||
from propcache import cached_property
|
||||
import voluptuous as vol
|
||||
|
||||
from homeassistant.config_entries import ConfigEntry
|
||||
|
@ -4,11 +4,11 @@ from __future__ import annotations
|
||||
|
||||
from collections.abc import Callable, Mapping
|
||||
import contextlib
|
||||
from functools import cached_property
|
||||
import itertools
|
||||
import logging
|
||||
from typing import Any
|
||||
|
||||
from propcache import cached_property
|
||||
import voluptuous as vol
|
||||
|
||||
from homeassistant.const import (
|
||||
|
@ -5,11 +5,11 @@ from __future__ import annotations
|
||||
from dataclasses import asdict, dataclass
|
||||
from datetime import timedelta
|
||||
from enum import StrEnum
|
||||
from functools import cached_property
|
||||
import logging
|
||||
import re
|
||||
from typing import Any, final
|
||||
|
||||
from propcache import cached_property
|
||||
import voluptuous as vol
|
||||
|
||||
from homeassistant.config_entries import ConfigEntry
|
||||
|
@ -5,10 +5,10 @@ from __future__ import annotations
|
||||
from asyncio import Event, Task, wait
|
||||
import dataclasses
|
||||
from datetime import datetime
|
||||
from functools import cached_property
|
||||
import logging
|
||||
from typing import Any, cast
|
||||
|
||||
from propcache import cached_property
|
||||
from python_otbr_api import tlv_parser
|
||||
from python_otbr_api.tlv_parser import MeshcopTLVType
|
||||
|
||||
|
@ -3,10 +3,10 @@
|
||||
from __future__ import annotations
|
||||
|
||||
from datetime import time, timedelta
|
||||
from functools import cached_property
|
||||
import logging
|
||||
from typing import final
|
||||
|
||||
from propcache import cached_property
|
||||
import voluptuous as vol
|
||||
|
||||
from homeassistant.config_entries import ConfigEntry
|
||||
|
@ -5,10 +5,10 @@ from __future__ import annotations
|
||||
from collections.abc import Callable, Iterable
|
||||
import dataclasses
|
||||
import datetime
|
||||
from functools import cached_property
|
||||
import logging
|
||||
from typing import Any, final
|
||||
|
||||
from propcache import cached_property
|
||||
import voluptuous as vol
|
||||
|
||||
from homeassistant.components import frontend, websocket_api
|
||||
|
@ -5,7 +5,7 @@ from __future__ import annotations
|
||||
import asyncio
|
||||
from collections.abc import Mapping
|
||||
from datetime import datetime
|
||||
from functools import cached_property, partial
|
||||
from functools import partial
|
||||
import hashlib
|
||||
from http import HTTPStatus
|
||||
import io
|
||||
@ -20,6 +20,7 @@ from typing import Any, Final, TypedDict, final
|
||||
from aiohttp import web
|
||||
import mutagen
|
||||
from mutagen.id3 import ID3, TextFrame as ID3Text
|
||||
from propcache import cached_property
|
||||
import voluptuous as vol
|
||||
|
||||
from homeassistant.components import ffmpeg, websocket_api
|
||||
|
@ -5,7 +5,6 @@ from __future__ import annotations
|
||||
from collections.abc import Callable, Mapping
|
||||
from dataclasses import dataclass
|
||||
from datetime import timedelta
|
||||
from functools import cached_property
|
||||
import logging
|
||||
from typing import Any
|
||||
|
||||
@ -17,6 +16,7 @@ from aiounifi.models.api import ApiItemT
|
||||
from aiounifi.models.client import Client
|
||||
from aiounifi.models.device import Device
|
||||
from aiounifi.models.event import Event, EventKey
|
||||
from propcache import cached_property
|
||||
|
||||
from homeassistant.components.device_tracker import (
|
||||
DOMAIN as DEVICE_TRACKER_DOMAIN,
|
||||
|
@ -4,11 +4,12 @@ from __future__ import annotations
|
||||
|
||||
from datetime import timedelta
|
||||
from enum import StrEnum
|
||||
from functools import cached_property, lru_cache
|
||||
from functools import lru_cache
|
||||
import logging
|
||||
from typing import Any, Final, final
|
||||
|
||||
from awesomeversion import AwesomeVersion, AwesomeVersionCompareException
|
||||
from propcache import cached_property
|
||||
import voluptuous as vol
|
||||
|
||||
from homeassistant.components import websocket_api
|
||||
|
@ -4,10 +4,11 @@ from __future__ import annotations
|
||||
|
||||
from datetime import timedelta
|
||||
from enum import IntFlag
|
||||
from functools import cached_property, partial
|
||||
from functools import partial
|
||||
import logging
|
||||
from typing import Any
|
||||
|
||||
from propcache import cached_property
|
||||
import voluptuous as vol
|
||||
|
||||
from homeassistant.config_entries import ConfigEntry
|
||||
|
@ -5,10 +5,10 @@ from __future__ import annotations
|
||||
from datetime import timedelta
|
||||
from enum import IntFlag
|
||||
import functools as ft
|
||||
from functools import cached_property
|
||||
import logging
|
||||
from typing import Any, final
|
||||
|
||||
from propcache import cached_property
|
||||
import voluptuous as vol
|
||||
|
||||
from homeassistant.config_entries import ConfigEntry
|
||||
|
@ -6,10 +6,11 @@ import abc
|
||||
from collections.abc import Callable, Iterable
|
||||
from contextlib import suppress
|
||||
from datetime import timedelta
|
||||
from functools import cached_property, partial
|
||||
from functools import partial
|
||||
import logging
|
||||
from typing import Any, Final, Generic, Literal, Required, TypedDict, cast, final
|
||||
|
||||
from propcache import cached_property
|
||||
from typing_extensions import TypeVar
|
||||
import voluptuous as vol
|
||||
|
||||
|
@ -4,10 +4,11 @@ from __future__ import annotations
|
||||
|
||||
import asyncio
|
||||
from collections.abc import Callable
|
||||
from functools import cached_property, partial
|
||||
from functools import partial
|
||||
import logging
|
||||
from typing import Any
|
||||
|
||||
from propcache import cached_property
|
||||
from zha.mixins import LogMixin
|
||||
|
||||
from homeassistant.const import ATTR_MANUFACTURER, ATTR_MODEL, ATTR_NAME, EntityCategory
|
||||
|
@ -23,7 +23,6 @@ from dataclasses import dataclass
|
||||
import datetime
|
||||
import enum
|
||||
import functools
|
||||
from functools import cached_property
|
||||
import inspect
|
||||
import logging
|
||||
import os
|
||||
@ -45,6 +44,7 @@ from typing import (
|
||||
)
|
||||
from urllib.parse import urlparse
|
||||
|
||||
from propcache import cached_property
|
||||
from typing_extensions import TypeVar
|
||||
import voluptuous as vol
|
||||
import yarl
|
||||
|
@ -7,9 +7,10 @@ from collections.abc import Iterable
|
||||
import dataclasses
|
||||
from dataclasses import dataclass, field
|
||||
from datetime import datetime
|
||||
from functools import cached_property
|
||||
from typing import Any, Literal, TypedDict
|
||||
|
||||
from propcache import cached_property
|
||||
|
||||
from homeassistant.core import HomeAssistant, callback
|
||||
from homeassistant.util.dt import utc_from_timestamp, utcnow
|
||||
from homeassistant.util.event_type import EventType
|
||||
|
@ -6,12 +6,13 @@ from collections import defaultdict
|
||||
from collections.abc import Mapping
|
||||
from datetime import datetime
|
||||
from enum import StrEnum
|
||||
from functools import cached_property, lru_cache, partial
|
||||
from functools import lru_cache, partial
|
||||
import logging
|
||||
import time
|
||||
from typing import TYPE_CHECKING, Any, Literal, TypedDict
|
||||
|
||||
import attr
|
||||
from propcache import cached_property
|
||||
from yarl import URL
|
||||
|
||||
from homeassistant.const import EVENT_HOMEASSISTANT_STARTED, EVENT_HOMEASSISTANT_STOP
|
||||
|
@ -9,7 +9,6 @@ from collections.abc import Callable, Coroutine, Iterable, Mapping
|
||||
import dataclasses
|
||||
from enum import Enum, IntFlag, auto
|
||||
import functools as ft
|
||||
from functools import cached_property
|
||||
import logging
|
||||
import math
|
||||
from operator import attrgetter
|
||||
@ -19,6 +18,7 @@ import time
|
||||
from types import FunctionType
|
||||
from typing import TYPE_CHECKING, Any, Final, Literal, NotRequired, TypedDict, final
|
||||
|
||||
from propcache import cached_property
|
||||
import voluptuous as vol
|
||||
|
||||
from homeassistant.config import DATA_CUSTOMIZE
|
||||
|
@ -14,12 +14,12 @@ from collections import defaultdict
|
||||
from collections.abc import Callable, Container, Hashable, KeysView, Mapping
|
||||
from datetime import datetime, timedelta
|
||||
from enum import StrEnum
|
||||
from functools import cached_property
|
||||
import logging
|
||||
import time
|
||||
from typing import TYPE_CHECKING, Any, Literal, NotRequired, TypedDict
|
||||
|
||||
import attr
|
||||
from propcache import cached_property
|
||||
import voluptuous as vol
|
||||
|
||||
from homeassistant.const import (
|
||||
|
@ -6,13 +6,14 @@ import asyncio
|
||||
from collections.abc import Callable
|
||||
from dataclasses import dataclass
|
||||
import functools
|
||||
from functools import cached_property
|
||||
import linecache
|
||||
import logging
|
||||
import sys
|
||||
from types import FrameType
|
||||
from typing import Any, cast
|
||||
|
||||
from propcache import cached_property
|
||||
|
||||
from homeassistant.core import async_get_hass_or_none
|
||||
from homeassistant.exceptions import HomeAssistantError
|
||||
from homeassistant.loader import async_suggest_report_issue
|
||||
|
@ -8,11 +8,11 @@ from collections.abc import Callable, Collection, Coroutine, Iterable
|
||||
import dataclasses
|
||||
from dataclasses import dataclass, field
|
||||
from enum import Enum, StrEnum, auto
|
||||
from functools import cached_property
|
||||
from itertools import groupby
|
||||
import logging
|
||||
from typing import Any
|
||||
|
||||
from propcache import cached_property
|
||||
import voluptuous as vol
|
||||
|
||||
from homeassistant.components.homeassistant.exposed_entities import async_should_expose
|
||||
|
@ -9,13 +9,14 @@ from contextvars import ContextVar
|
||||
from copy import copy
|
||||
from dataclasses import dataclass
|
||||
from datetime import datetime, timedelta
|
||||
from functools import cached_property, partial
|
||||
from functools import partial
|
||||
import itertools
|
||||
import logging
|
||||
from types import MappingProxyType
|
||||
from typing import Any, Literal, TypedDict, cast, overload
|
||||
|
||||
import async_interrupt
|
||||
from propcache import cached_property
|
||||
import voluptuous as vol
|
||||
|
||||
from homeassistant import exceptions
|
||||
|
@ -6,7 +6,6 @@ import asyncio
|
||||
from collections.abc import Callable, Iterable, Mapping, Sequence
|
||||
from contextlib import suppress
|
||||
from copy import deepcopy
|
||||
from functools import cached_property
|
||||
import inspect
|
||||
from json import JSONDecodeError, JSONEncoder
|
||||
import logging
|
||||
@ -14,6 +13,8 @@ import os
|
||||
from pathlib import Path
|
||||
from typing import Any
|
||||
|
||||
from propcache import cached_property
|
||||
|
||||
from homeassistant.const import (
|
||||
EVENT_HOMEASSISTANT_FINAL_WRITE,
|
||||
EVENT_HOMEASSISTANT_STARTED,
|
||||
|
@ -6,7 +6,6 @@ from abc import abstractmethod
|
||||
import asyncio
|
||||
from collections.abc import Awaitable, Callable, Coroutine, Generator
|
||||
from datetime import datetime, timedelta
|
||||
from functools import cached_property
|
||||
import logging
|
||||
from random import randint
|
||||
from time import monotonic
|
||||
@ -14,6 +13,7 @@ from typing import Any, Generic, Protocol
|
||||
import urllib.error
|
||||
|
||||
import aiohttp
|
||||
from propcache import cached_property
|
||||
import requests
|
||||
from typing_extensions import TypeVar
|
||||
|
||||
|
@ -11,7 +11,6 @@ from collections.abc import Callable, Iterable
|
||||
from contextlib import suppress
|
||||
from dataclasses import dataclass
|
||||
import functools as ft
|
||||
from functools import cached_property
|
||||
import importlib
|
||||
import logging
|
||||
import os
|
||||
@ -26,6 +25,7 @@ from awesomeversion import (
|
||||
AwesomeVersionException,
|
||||
AwesomeVersionStrategy,
|
||||
)
|
||||
from propcache import cached_property
|
||||
import voluptuous as vol
|
||||
|
||||
from . import generated
|
||||
|
@ -44,6 +44,7 @@ orjson==3.10.7
|
||||
packaging>=23.1
|
||||
paho-mqtt==1.6.1
|
||||
Pillow==10.4.0
|
||||
propcache==0.1.0
|
||||
psutil-home-assistant==0.0.1
|
||||
PyJWT==2.9.0
|
||||
pymicro-vad==1.0.1
|
||||
|
@ -22,7 +22,7 @@ except ImportError:
|
||||
SafeLoader as FastestAvailableSafeLoader,
|
||||
)
|
||||
|
||||
from functools import cached_property
|
||||
from propcache import cached_property
|
||||
|
||||
from homeassistant.exceptions import HomeAssistantError
|
||||
from homeassistant.helpers.frame import report
|
||||
|
@ -55,6 +55,7 @@ dependencies = [
|
||||
# PyJWT has loose dependency. We want the latest one.
|
||||
"cryptography==43.0.1",
|
||||
"Pillow==10.4.0",
|
||||
"propcache==0.1.0",
|
||||
"pyOpenSSL==24.2.1",
|
||||
"orjson==3.10.7",
|
||||
"packaging>=23.1",
|
||||
@ -921,3 +922,7 @@ split-on-trailing-comma = false
|
||||
|
||||
[tool.ruff.lint.mccabe]
|
||||
max-complexity = 25
|
||||
|
||||
[tool.ruff.lint.pydocstyle]
|
||||
property-decorators = ["propcache.cached_property"]
|
||||
|
||||
|
@ -28,6 +28,7 @@ mashumaro==3.13.1
|
||||
PyJWT==2.9.0
|
||||
cryptography==43.0.1
|
||||
Pillow==10.4.0
|
||||
propcache==0.1.0
|
||||
pyOpenSSL==24.2.1
|
||||
orjson==3.10.7
|
||||
packaging>=23.1
|
||||
|
@ -5,13 +5,13 @@ from collections.abc import Iterable
|
||||
import dataclasses
|
||||
from datetime import timedelta
|
||||
from enum import IntFlag
|
||||
from functools import cached_property
|
||||
import logging
|
||||
import threading
|
||||
from typing import Any
|
||||
from unittest.mock import MagicMock, PropertyMock, patch
|
||||
|
||||
from freezegun.api import FrozenDateTimeFactory
|
||||
from propcache import cached_property
|
||||
import pytest
|
||||
from syrupy.assertion import SnapshotAssertion
|
||||
import voluptuous as vol
|
||||
|
@ -5,7 +5,6 @@ from __future__ import annotations
|
||||
import asyncio
|
||||
from collections.abc import Generator
|
||||
from datetime import timedelta
|
||||
from functools import cached_property
|
||||
import logging
|
||||
from typing import Any, Self
|
||||
from unittest.mock import ANY, AsyncMock, Mock, patch
|
||||
@ -968,7 +967,7 @@ async def test_as_dict(snapshot: SnapshotAssertion) -> None:
|
||||
if (
|
||||
key.startswith("__")
|
||||
or callable(func)
|
||||
or type(func) in (cached_property, property)
|
||||
or type(func).__name__ in ("cached_property", "property")
|
||||
):
|
||||
continue
|
||||
assert key in dict_repr or key in excluded_from_dict
|
||||
|
Loading…
x
Reference in New Issue
Block a user