Compare commits

...

1 Commits

Author SHA1 Message Date
Erik
680a881732 Deprecate support for local installation of dependencies 2026-04-14 10:16:33 +02:00
3 changed files with 29 additions and 9 deletions

View File

@@ -54,6 +54,7 @@ from homeassistant.helpers.target import (
)
from homeassistant.helpers.template import async_load_custom_templates
from homeassistant.helpers.typing import ConfigType
from homeassistant.util.package import is_virtual_env
# The scene integration will do a late import of scene
# so we want to make sure its loaded with the component
@@ -417,7 +418,7 @@ async def async_setup(hass: HomeAssistant, config: ConfigType) -> bool: # noqa:
installation_type = info["installation_type"][15:]
if installation_type in {"Core", "Container"}:
deprecated_method = installation_type == "Core"
core_installation = installation_type == "Core"
bit32 = _is_32_bit()
arch = info["arch"]
if bit32 and installation_type == "Container":
@@ -433,12 +434,14 @@ async def async_setup(hass: HomeAssistant, config: ConfigType) -> bool: # noqa:
translation_placeholders={"arch": arch},
)
deprecated_architecture = bit32 and installation_type != "Container"
if deprecated_method or deprecated_architecture:
if core_installation or deprecated_architecture:
issue_id = "deprecated"
if deprecated_method:
if core_installation:
issue_id += "_method"
if deprecated_architecture:
issue_id += "_architecture"
if core_installation and not is_virtual_env():
issue_id += "_local_deps"
ir.async_create_issue(
hass,
DOMAIN,

View File

@@ -113,6 +113,14 @@
"description": "This system is using the {installation_type} installation type, and 32-bit hardware (`{arch}`), both of which have been deprecated and will no longer be supported after the release of Home Assistant 2025.12.",
"title": "Deprecation notice"
},
"deprecated_method_architecture_local_deps": {
"description": "This system is using the {installation_type} installation type outside a virtual environment, and 32-bit hardware (`{arch}`), both of which have been deprecated and will no longer be supported after the release of Home Assistant 2025.12.",
"title": "Deprecation notice"
},
"deprecated_method_local_deps": {
"description": "This system is using the {installation_type} installation type outside a virtual environment, which has been unsupported since Home Assistant 2025.12 and will not work after the release of Home Assistant 2026.11. To continue receiving updates and support, migrate to a supported installation method.",
"title": "Deprecation notice: Installation method"
},
"deprecated_os_aarch64": {
"description": "This system is running on a 32-bit operating system (`armv7`), which has been deprecated and will no longer receive updates after the release of Home Assistant 2025.12. To continue using Home Assistant on this hardware, you will need to install a 64-bit operating system. Please refer to our [installation guide]({installation_guide}).",
"title": "[%key:component::homeassistant::issues::deprecated_architecture::title%]"

View File

@@ -642,13 +642,18 @@ async def test_reload_all(
@pytest.mark.parametrize(
("arch", "bit_32", "expected_issue"),
("arch", "bit_32", "venv", "expected_issue"),
[
("i386", True, "deprecated_method_architecture"),
("armhf", True, "deprecated_method_architecture"),
("armv7", True, "deprecated_method_architecture"),
("aarch64", False, "deprecated_method"),
("generic-x86-64", False, "deprecated_method"),
("i386", True, False, "deprecated_method_architecture_local_deps"),
("armhf", True, False, "deprecated_method_architecture_local_deps"),
("armv7", True, False, "deprecated_method_architecture_local_deps"),
("aarch64", False, False, "deprecated_method_local_deps"),
("generic-x86-64", False, False, "deprecated_method_local_deps"),
("i386", True, True, "deprecated_method_architecture"),
("armhf", True, True, "deprecated_method_architecture"),
("armv7", True, True, "deprecated_method_architecture"),
("aarch64", False, True, "deprecated_method"),
("generic-x86-64", False, True, "deprecated_method"),
],
)
async def test_deprecated_installation_issue_core(
@@ -656,6 +661,7 @@ async def test_deprecated_installation_issue_core(
issue_registry: ir.IssueRegistry,
arch: str,
bit_32: bool,
venv: bool,
expected_issue: str,
) -> None:
"""Test deprecated installation issue."""
@@ -667,6 +673,9 @@ async def test_deprecated_installation_issue_core(
"arch": arch,
},
),
patch(
"homeassistant.components.homeassistant.is_virtual_env", return_value=venv
),
patch(
"homeassistant.components.homeassistant._is_32_bit",
return_value=bit_32,