mirror of
https://github.com/esphome/esphome.git
synced 2026-02-08 00:31:58 +00:00
[packages] Add more information and deprecation deadline for "single package" includes (#12280)
This commit is contained in:
@@ -91,7 +91,16 @@ def validate_source_shorthand(value):
|
|||||||
|
|
||||||
def deprecate_single_package(config):
|
def deprecate_single_package(config):
|
||||||
_LOGGER.warning(
|
_LOGGER.warning(
|
||||||
"Including a single package under `packages:` is deprecated. Use a list instead."
|
"""
|
||||||
|
Including a single package under `packages:`, i.e., `packages: !include mypackage.yaml` is deprecated.
|
||||||
|
This method for including packages will go away in 2026.7.0
|
||||||
|
Please use a list instead:
|
||||||
|
|
||||||
|
packages:
|
||||||
|
- !include mypackage.yaml
|
||||||
|
|
||||||
|
See https://github.com/esphome/esphome/pull/12116
|
||||||
|
"""
|
||||||
)
|
)
|
||||||
return config
|
return config
|
||||||
|
|
||||||
|
|||||||
@@ -176,10 +176,7 @@ def test_single_package(
|
|||||||
|
|
||||||
assert actual == expected
|
assert actual == expected
|
||||||
|
|
||||||
assert (
|
assert "This method for including packages will go away in 2026.7.0" in caplog.text
|
||||||
"Including a single package under `packages:` is deprecated. Use a list instead."
|
|
||||||
in caplog.text
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
def test_package_append(basic_wifi, basic_esphome):
|
def test_package_append(basic_wifi, basic_esphome):
|
||||||
|
|||||||
Reference in New Issue
Block a user