Pins sphinx<9 to fix sphinx-multiversion compatibility#5211
Pins sphinx<9 to fix sphinx-multiversion compatibility#5211AntoineRichard merged 2 commits intoisaac-sim:developfrom
Conversation
Sphinx 9.0 changed Config.read() to use keyword-only parameters, breaking sphinx-multiversion==0.2.4 which passes arguments positionally. This causes the multi-version docs build to fail with: TypeError: Config.read() takes 2 positional arguments but 3 were given Pin sphinx<9 until sphinx-multiversion is updated or replaced.
Greptile SummaryThis PR pins Confidence Score: 5/5Safe to merge — single-line constraint tightening with no logic changes. The change is a minimal, well-scoped version pin that directly addresses a documented CI breakage. No logic, API, or behavioral changes are involved, and all remaining considerations are informational. No files require special attention.
|
| Filename | Overview |
|---|---|
| docs/requirements.txt | Pins sphinx to >=7.0,<9 to keep the multi-version docs build on the 8.x line, avoiding the Sphinx 9.0 breaking API change that broke sphinx-multiversion==0.2.4. |
Flowchart
%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[CI Docs Build] --> B{Resolve sphinx version}
B -->|Before fix: sphinx>=7.0| C[Resolves to Sphinx 9.1.0]
B -->|After fix: sphinx>=7.0,<9| D[Resolves to Sphinx 8.x]
C --> E["sphinx-multiversion calls\nConfig.read(app, config, overrides)\npositionally"]
D --> F["sphinx-multiversion calls\nConfig.read(app, config, overrides)\npositionally"]
E --> G["TypeError: Config.read() takes\n2 positional arguments but 3 were given"]
F --> H["Build succeeds ✓"]
style G fill:#f66,color:#fff
style H fill:#6a6,color:#fff
Reviews (1): Last reviewed commit: "fix(docs): pin sphinx<9 to fix sphinx-mu..." | Re-trigger Greptile
There was a problem hiding this comment.
LGTM — minimal, well-scoped fix for a clear CI breakage.
What it does: Pins sphinx>=7.0,<9 to keep the docs build on the 8.x line, avoiding the Sphinx 9.0 breaking change where Config.read() switched to keyword-only parameters (breaking the positional call in sphinx-multiversion==0.2.4).
One note for the maintainers: sphinx-multiversion last released in August 2020 and appears unmaintained. This pin is the right short-term fix, but it'd be worth tracking a migration to a maintained fork (e.g., sphinx-multiversion-contrib or sphinxcontrib-versioning) before you need Sphinx 9+ features. A tracking issue would help make sure this doesn't get forgotten.
sphinx-multiversion 0.2.4 passes positional arguments to Config.read() which became keyword-only in Sphinx 9.0, breaking multi-version doc builds. This is the same fix as #5211 on develop, applied to main.
## Description Sphinx 9.0 changed `Config.read()` to use keyword-only parameters (`overrides` and `tags`), breaking `sphinx-multiversion==0.2.4` which passes arguments positionally. This causes the multi-version docs CI build to fail with: ``` TypeError: Config.read() takes 2 positional arguments but 3 were given ``` The `develop` branch has `sphinx>=7.0` with no upper bound, so CI (Python 3.12) resolves to Sphinx 9.1.0 which introduced the breaking API change. ## Fix Pin `sphinx>=7.0,<9` in `docs/requirements.txt` to keep Sphinx on the 8.x line until `sphinx-multiversion` is updated or replaced with a maintained fork. ## Type of change - [x] Bug fix (non-breaking change which fixes an issue) Co-authored-by: Kelly Guo <kellyguo11@users.noreply.github.com> Co-authored-by: Antoine RICHARD <antoiner@nvidia.com>
Description
Sphinx 9.0 changed
Config.read()to use keyword-only parameters (overridesandtags), breakingsphinx-multiversion==0.2.4which passes arguments positionally. This causes the multi-version docs CI build to fail with:The
developbranch hassphinx>=7.0with no upper bound, so CI (Python 3.12) resolves to Sphinx 9.1.0 which introduced the breaking API change.Fix
Pin
sphinx>=7.0,<9indocs/requirements.txtto keep Sphinx on the 8.x line untilsphinx-multiversionis updated or replaced with a maintained fork.Type of change