From 3905adde8922315729f5c6cc5f18b05d14d1ce10 Mon Sep 17 00:00:00 2001 From: Fabio Bonelli Date: Sun, 22 Nov 2026 10:37:22 +0000 Subject: [PATCH] chore: build the site with Sphinx 9 Sphinx 8.2.3 has had no release since March 2025. Sphinx 9 passes stylesheets as objects instead of strings, and the Press theme, with no release since March 2024, fails on every page when it prints them. The layout now renders them with css_tag, which works on both versions. The deprecation warning filter goes away because its class no longer exists in Sphinx 9 and the theme no longer reaches the API it warned about. --- _templates/layout.html | 10 ++++++++++ conf.py | 4 ---- pyproject.toml | 2 +- uv.lock | 30 +++++++++++++++--------------- 4 files changed, 26 insertions(+), 20 deletions(-) diff --git a/_templates/layout.html b/_templates/layout.html index 79c6bd0c..9eb4cdf1 100644 --- a/_templates/layout.html +++ b/_templates/layout.html @@ -20,6 +20,16 @@ {%- endif %} {% endblock %} +{#- The theme prints each css_files entry as a string, which Sphinx 9 + no longer allows. css_tag renders the stylesheet objects Sphinx + passes instead. -#} + +{% block css %} +{%- for css in css_files %} +{{ css_tag(css) }} +{%- endfor %} +{%- endblock %} + {% block footer %}