From 0f6d71ac09960a4c854d2f97c68104e5429e4246 Mon Sep 17 00:00:00 2001 From: Emmanuel Ferdman Date: Wed, 14 May 2025 10:55:23 -0700 Subject: [PATCH] Resolve Python Logger warnings Signed-off-by: Emmanuel Ferdman --- conf.py | 4 ++-- ports/zephyr-cp/cptools/cpbuild.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/conf.py b/conf.py index 7555540174742..34436c09020e3 100644 --- a/conf.py +++ b/conf.py @@ -434,11 +434,11 @@ def generate_redirects(app): return if not isinstance(app.builder, builders.StandaloneHTMLBuilder): - logging.warn( + logging.warning( "The 'sphinxcontib-redirects' plugin is only supported " "by the 'html' builder and subclasses. Skipping..." ) - logging.warn(f"Builder is {app.builder.name} ({type(app.builder)})") + logging.warning(f"Builder is {app.builder.name} ({type(app.builder)})") return with open(path) as redirects: diff --git a/ports/zephyr-cp/cptools/cpbuild.py b/ports/zephyr-cp/cptools/cpbuild.py index 335234b8c761f..ef836b3df8af3 100644 --- a/ports/zephyr-cp/cptools/cpbuild.py +++ b/ports/zephyr-cp/cptools/cpbuild.py @@ -24,7 +24,7 @@ LAST_BUILD_TIMES = json.load(f) logger.info("Build times loaded.") else: - logger.warn( + logger.warning( "No last build times found. This is normal if you're running this for the first time." )