From 35821e7c77ef00c3b9f53dc09844ba6ef7fd98f3 Mon Sep 17 00:00:00 2001 From: Gilles Peskine Date: Tue, 23 Dec 2025 12:44:59 +0100 Subject: [PATCH] Switch from config_history to config_macros Switch from the `config_history` module to the new module `config_macros`. No behavior change. Signed-off-by: Gilles Peskine --- scripts/generate_config_checks.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/scripts/generate_config_checks.py b/scripts/generate_config_checks.py index bae93c3662..bf8889f32b 100755 --- a/scripts/generate_config_checks.py +++ b/scripts/generate_config_checks.py @@ -8,7 +8,7 @@ from typing import Iterator import framework_scripts_path # pylint: disable=unused-import from mbedtls_framework.config_checks_generator import * \ #pylint: disable=wildcard-import,unused-wildcard-import -from mbedtls_framework import config_history +from mbedtls_framework import config_macros class CryptoInternal(SubprojectInternal): SUBPROJECT = 'TF-PSA-Crypto' @@ -23,17 +23,17 @@ ALWAYS_ENABLED_SINCE_4_0 = frozenset([ def checkers_for_removed_options() -> Iterator[Checker]: """Discover removed options. Yield corresponding checkers.""" - history = config_history.ConfigHistory() - old_public = history.options('mbedtls', '3.6') - new_public = history.options('mbedtls', '4.0') - crypto_public = history.options('tfpsacrypto', '1.0') - crypto_internal = history.internal('tfpsacrypto', '1.0') + previous_major = config_macros.History('mbedtls', '3.6') + this_major = config_macros.History('mbedtls', '4.0') + old_public = previous_major.options() + new_public = this_major.options() + crypto = config_macros.History('tfpsacrypto', '1.0') for option in sorted(old_public - new_public): if option in ALWAYS_ENABLED_SINCE_4_0: continue - if option in crypto_public: + if option in crypto.options(): yield CryptoOption(option) - elif option in crypto_internal: + elif option in crypto.internal(): yield CryptoInternal(option) else: yield Removed(option, 'Mbed TLS 4.0')