Remvove deprecated core constants (#131803)
parent
28ec8272ee
commit
be81fd86d3
|
@ -84,7 +84,6 @@ from .exceptions import (
|
|||
)
|
||||
from .helpers.deprecation import (
|
||||
DeferredDeprecatedAlias,
|
||||
DeprecatedConstantEnum,
|
||||
EnumWithDeprecatedMembers,
|
||||
all_with_deprecated_constants,
|
||||
check_if_deprecated_constant,
|
||||
|
@ -177,14 +176,6 @@ class EventStateReportedData(EventStateEventData):
|
|||
old_last_reported: datetime.datetime
|
||||
|
||||
|
||||
# SOURCE_* are deprecated as of Home Assistant 2022.2, use ConfigSource instead
|
||||
_DEPRECATED_SOURCE_DISCOVERED = DeprecatedConstantEnum(
|
||||
ConfigSource.DISCOVERED, "2025.1"
|
||||
)
|
||||
_DEPRECATED_SOURCE_STORAGE = DeprecatedConstantEnum(ConfigSource.STORAGE, "2025.1")
|
||||
_DEPRECATED_SOURCE_YAML = DeprecatedConstantEnum(ConfigSource.YAML, "2025.1")
|
||||
|
||||
|
||||
def _deprecated_core_config() -> Any:
|
||||
# pylint: disable-next=import-outside-toplevel
|
||||
from . import core_config
|
||||
|
|
|
@ -68,7 +68,6 @@ from .common import (
|
|||
async_mock_service,
|
||||
help_test_all,
|
||||
import_and_test_deprecated_alias,
|
||||
import_and_test_deprecated_constant_enum,
|
||||
)
|
||||
|
||||
PST = dt_util.get_time_zone("America/Los_Angeles")
|
||||
|
@ -2980,22 +2979,6 @@ def test_all() -> None:
|
|||
help_test_all(ha)
|
||||
|
||||
|
||||
@pytest.mark.parametrize(
|
||||
("enum"),
|
||||
[
|
||||
ha.ConfigSource.DISCOVERED,
|
||||
ha.ConfigSource.YAML,
|
||||
ha.ConfigSource.STORAGE,
|
||||
],
|
||||
)
|
||||
def test_deprecated_constants(
|
||||
caplog: pytest.LogCaptureFixture,
|
||||
enum: ha.ConfigSource,
|
||||
) -> None:
|
||||
"""Test deprecated constants."""
|
||||
import_and_test_deprecated_constant_enum(caplog, ha, enum, "SOURCE_", "2025.1")
|
||||
|
||||
|
||||
def test_deprecated_config(caplog: pytest.LogCaptureFixture) -> None:
|
||||
"""Test deprecated Config class."""
|
||||
import_and_test_deprecated_alias(caplog, ha, "Config", Config, "2025.11")
|
||||
|
|
Loading…
Reference in New Issue