Resolve Python Logger warnings

Signed-off-by: Emmanuel Ferdman <emmanuelferdman@gmail.com>
This commit is contained in:
Emmanuel Ferdman 2025-05-14 10:55:23 -07:00
parent fd28576bcc
commit 0f6d71ac09
No known key found for this signature in database
GPG key ID: 0CF84597DD87A9FF
2 changed files with 3 additions and 3 deletions

View file

@ -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:

View file

@ -24,7 +24,7 @@ if _last_build_times.exists():
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."
)