[core] Extend '/' in names deprecation window to 2027.7.0 (#18236)

This commit is contained in:
J. Nick Koston
2026-08-10 11:32:02 -05:00
committed by GitHub
parent 56ec21d950
commit bae7f19323
2 changed files with 3 additions and 3 deletions
+2 -2
View File
@@ -2331,13 +2331,13 @@ def _validate_no_slash(value):
the visually similar Unicode FRACTION SLASH (U+2044) character.
"""
if "/" in value:
# Remove before 2026.7.0
# Remove before 2027.7.0
new_value = value.replace("/", FRACTION_SLASH)
_LOGGER.warning(
"'%s' contains '/' which is reserved as a URL path separator. "
"Automatically replacing with '%s' (Unicode FRACTION SLASH). "
"Please update your configuration. "
"This will become an error in ESPHome 2026.7.0.",
"This will become an error in ESPHome 2027.7.0.",
value,
new_value,
)
+1 -1
View File
@@ -932,7 +932,7 @@ def test_string_no_slash__slash_replaced_with_warning(
actual = cv.string_no_slash(value)
assert actual == expected
assert "reserved as a URL path separator" in caplog.text
assert "will become an error in ESPHome 2026.7.0" in caplog.text
assert "will become an error in ESPHome 2027.7.0" in caplog.text
def test_string_no_slash__long_string_allowed() -> None: