[core] Remove cv.only_with_esp_idf and CORE.using_esp_idf (#16681)
This commit is contained in:
1 parent
b71d445e79
commit
171ded35a5
3 files changed
-32
No files matched your search
@@ -857,16 +857,6 @@ only_on_rp2040 = only_on(PLATFORM_RP2040)
|
|||||||
only_with_arduino = only_with_framework(Framework.ARDUINO)
|
only_with_arduino = only_with_framework(Framework.ARDUINO)
|
||||||
|
|
||||||
|
|
||||||
def only_with_esp_idf(obj):
|
|
||||||
"""Deprecated: use only_on_esp32 instead."""
|
|
||||||
_LOGGER.warning(
|
|
||||||
"cv.only_with_esp_idf was deprecated in 2026.1, will change behavior in 2026.6. "
|
|
||||||
"ESP32 Arduino builds on top of ESP-IDF, so ESP-IDF features are available in both frameworks. "
|
|
||||||
"Use cv.only_on_esp32 and/or cv.only_with_arduino instead."
|
|
||||||
)
|
|
||||||
return only_with_framework(Framework.ESP_IDF)(obj)
|
|
||||||
|
|
||||||
|
|
||||||
# Adapted from:
|
# Adapted from:
|
||||||
# https://github.com/alecthomas/voluptuous/issues/115#issuecomment-144464666
|
# https://github.com/alecthomas/voluptuous/issues/115#issuecomment-144464666
|
||||||
def has_at_least_one_key(*keys):
|
def has_at_least_one_key(*keys):
|
||||||
|
|||||||
@@ -859,15 +859,6 @@ class EsphomeCore:
|
|||||||
def using_arduino(self):
|
def using_arduino(self):
|
||||||
return self.target_framework == "arduino"
|
return self.target_framework == "arduino"
|
||||||
|
|
||||||
@property
|
|
||||||
def using_esp_idf(self):
|
|
||||||
_LOGGER.warning(
|
|
||||||
"CORE.using_esp_idf was deprecated in 2026.1, will change behavior in 2026.6. "
|
|
||||||
"ESP32 Arduino builds on top of ESP-IDF, so ESP-IDF features are available in both frameworks. "
|
|
||||||
"Use CORE.is_esp32 and/or CORE.using_arduino instead."
|
|
||||||
)
|
|
||||||
return self.target_framework == "esp-idf"
|
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def using_toolchain_esp_idf(self):
|
def using_toolchain_esp_idf(self):
|
||||||
return self.toolchain == Toolchain.ESP_IDF
|
return self.toolchain == Toolchain.ESP_IDF
|
||||||
|
|||||||
@@ -693,19 +693,6 @@ def lint_esphome_h(fname, line, col, content):
|
|||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
@lint_content_find_check(
|
|
||||||
"CORE.using_esp_idf",
|
|
||||||
include=py_include,
|
|
||||||
exclude=["esphome/core/__init__.py", "script/ci-custom.py"],
|
|
||||||
)
|
|
||||||
def lint_using_esp_idf_deprecated(fname, line, col, content):
|
|
||||||
return (
|
|
||||||
f"{highlight('CORE.using_esp_idf')} is deprecated and will change behavior in 2026.6. "
|
|
||||||
"ESP32 Arduino builds on top of ESP-IDF, so ESP-IDF features are available in both frameworks. "
|
|
||||||
f"Please use {highlight('CORE.is_esp32')} and/or {highlight('CORE.using_arduino')} instead."
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
@lint_content_check(include=["*.h"], exclude=["esphome/core/entity_types.h"])
|
@lint_content_check(include=["*.h"], exclude=["esphome/core/entity_types.h"])
|
||||||
def lint_pragma_once(fname, content):
|
def lint_pragma_once(fname, content):
|
||||||
if "#pragma once" not in content:
|
if "#pragma once" not in content:
|
||||||
|
|||||||
Reference in new issue
Block a user