Skip to content

Commit c508dfa

Browse files
committed
add support for sphinx 9.0
1 parent de4eec2 commit c508dfa

File tree

5 files changed

+187
-135
lines changed

5 files changed

+187
-135
lines changed

.github/workflows/tests.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,12 @@ jobs:
1414
matrix:
1515
os: [ ubuntu-latest ]
1616
python-version: [ "3.10", "3.11", "3.12", "3.13", "3.14" ]
17-
sphinx-version: [ "8.1", "8.2" ]
17+
sphinx-version: [ "8.1", "8.2", "9.0" ]
1818
exclude:
1919
- python-version: "3.10"
2020
sphinx-version: "8.2"
21+
- python-version: "3.10"
22+
sphinx-version: "9.0"
2123

2224
name: Python ${{ matrix.python-version }}, Sphinx ${{ matrix.sphinx-version }}
2325
steps:

.readthedocs.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ build:
2121
- asdf install uv 0.9.2
2222
- asdf global uv 0.9.2
2323
install:
24-
- uv sync
24+
- uv sync --group dev --group rtd
2525
pre_build:
2626
- ./fetch_swagger.sh
2727
- uv run generate-schema.py

docs/conf.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
"""Standard Sphinx configuration module."""
22

3+
from importlib.util import find_spec
4+
35
# Configuration file for the Sphinx documentation builder.
46
#
57
# For the full list of built-in configuration values, see the documentation:
@@ -18,12 +20,14 @@
1820
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration
1921

2022
extensions = [
21-
"sphinx_rtd_theme",
2223
"sphinxcontrib.spelling",
2324
"structured_tutorials.sphinx",
2425
"sphinx_inline_tabs",
2526
]
26-
html_theme = "sphinx_rtd_theme"
27+
28+
if find_spec("sphinx_rtd_theme") is not None:
29+
extensions.append("sphinx_rtd_theme")
30+
html_theme = "sphinx_rtd_theme"
2731

2832
DOC_ROOT = Path(__file__).parent
2933
structured_tutorials_root = DOC_ROOT / "tutorials"

pyproject.toml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ dependencies = [
1414
"jinja2>=3.1.6",
1515
"pydantic>=2.11.4",
1616
"pyyaml>=6.0.2",
17-
"sphinx>=8.2.0;python_version>='3.11'",
17+
"sphinx>=8.1.0;python_version>='3.11'",
1818
"sphinx~=8.1.0;python_version<'3.11'",
1919
"sphinx-inline-tabs>=2025",
2020
"termcolor>=3.2.0",
@@ -122,6 +122,7 @@ conflicts = [
122122
{ group = "Sphinx8.2" },
123123
{ group = "Sphinx9.0" },
124124
],
125+
[ { group = "Sphinx9.0" }, { group = "rtd" } ]
125126
]
126127

127128
[dependency-groups]
@@ -134,14 +135,15 @@ dev = [
134135
"pytest-random-order>=1.1.1",
135136
"pytest-subprocess>=1.5.3",
136137
"ruff>=0.11.10",
137-
"sphinx-rtd-theme>=3.0.2",
138138
"sphinxcontrib-spelling>=8.0.1",
139139
"types-colorama>=0.4.15.20250801",
140140
"types-docutils>=0.21.0.20250604",
141141
"types-pyyaml>=6.0.12.20250516",
142142
]
143+
rtd = [
144+
"sphinx-rtd-theme>=3.0.2",
145+
]
143146

144-
"Sphinx8.1" = [ "Sphinx~=8.1.0;python_version<'3.11'" ]
147+
"Sphinx8.1" = [ "Sphinx~=8.1.0" ]
145148
"Sphinx8.2" = [ "Sphinx~=8.2.0;python_version>='3.11'" ]
146-
# Not working b/c of RTD theme ATM
147-
#"Sphinx9.0" = [ "Sphinx~=9.0.0;python_version>='3.11'" ]
149+
"Sphinx9.0" = [ "Sphinx~=9.0.0;python_version>='3.11'" ]

0 commit comments

Comments
 (0)