Skip to content

Commit

Permalink
Remvove deprecated core constants (home-assistant#131803)
Browse files Browse the repository at this point in the history
  • Loading branch information
edenhaus authored Nov 28, 2024
1 parent 28ec827 commit be81fd8
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 26 deletions.
9 changes: 0 additions & 9 deletions homeassistant/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,6 @@
)
from .helpers.deprecation import (
DeferredDeprecatedAlias,
DeprecatedConstantEnum,
EnumWithDeprecatedMembers,
all_with_deprecated_constants,
check_if_deprecated_constant,
Expand Down Expand Up @@ -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
Expand Down
17 changes: 0 additions & 17 deletions tests/test_core.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,6 @@
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")
Expand Down Expand Up @@ -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")
Expand Down

0 comments on commit be81fd8

Please sign in to comment.