fix: update Config.read() signature (overrides, tags)#202
Open
kimbyungnam wants to merge 2 commits intosphinx-contrib:mainfrom
Open
fix: update Config.read() signature (overrides, tags)#202kimbyungnam wants to merge 2 commits intosphinx-contrib:mainfrom
kimbyungnam wants to merge 2 commits intosphinx-contrib:mainfrom
Conversation
Sphinx>=9 Config.read() now expects keyword args; update calls to use overrides=... and provide Tags() to keep config loading consistent. Fixes sphinx-contrib#201.
for more information, see https://pre-commit.ci
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Purpose
This PR fixes an incompatibility with newer Sphinx versions (≥ 9) when using
sphinx-multiversionon Python 3.11+.Starting from Sphinx 8.2.0, Python 3.11+ is required.
sphinx-multiversionofficially supports Python 8–12, but it currently does not restrict the Sphinx versionAs a result, when users run
sphinx-multiversionon Python 3.11 or newer, Sphinx 9+ is automatically installedIn Sphinx 9, the signature of
Config.read()requires keyword arguments:However,
sphinx-multiversionwas still calling it using the old positional-style API, causing runtime errors when used with Sphinx ≥ 9 (see #201).Resolves #201
Solution Sketch
This PR updates all calls to
Config.read()to:Tags()instance explicitlyThe parameter names (
overrides,tags) are consistent across Sphinx 7 through 9, so using keyword arguments is safe and compatible across Python 3.8–3.12