Skip to content

fix: update Config.read() signature (overrides, tags)#202

Open
kimbyungnam wants to merge 2 commits intosphinx-contrib:mainfrom
kimbyungnam:201
Open

fix: update Config.read() signature (overrides, tags)#202
kimbyungnam wants to merge 2 commits intosphinx-contrib:mainfrom
kimbyungnam:201

Conversation

@kimbyungnam
Copy link

Purpose

This PR fixes an incompatibility with newer Sphinx versions (≥ 9) when using sphinx-multiversion on Python 3.11+.

Starting from Sphinx 8.2.0, Python 3.11+ is required.
sphinx-multiversion officially supports Python 8–12, but it currently does not restrict the Sphinx version
As a result, when users run sphinx-multiversion on Python 3.11 or newer, Sphinx 9+ is automatically installed

In Sphinx 9, the signature of Config.read() requires keyword arguments:
However, sphinx-multiversion was 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:

  • Pass arguments explicitly as keyword arguments
  • Provide a Tags() instance explicitly

The 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

  • Avoids introducing conditional logic based on Sphinx versions
  • Maintains backward compatibility with older supported Sphinx releases
  • Fixes the issue without tightening dependency constraints
  • Aligns with the current Sphinx public API

kimbyungnam and others added 2 commits January 14, 2026 23:22
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.
@bmos
Copy link

bmos commented Feb 10, 2026

@Holzhaus

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Incompatibility with Sphinx >=9.0: Config.read() TypeError during build

2 participants

Comments