Add support for newer Sphinx versions, fix up some related warnings.
Review Request #14476 — Created June 25, 2025 and submitted
This change adds support for Sphinx 8.0 to our pyproject.toml and
tox.ini files, and fleshes out the tox configuration a bit for wider
version compatibility checking.This also fixes a few warnings that were popping up when using
collect_files against Sphinx 7.4:
- The default for
collect_file_patterns
was set to a dict, but it was
used as a list. - The "rebuild" parameter for app.add_config_value() has changed from a
simple bool to a string defining when to rebuild. The string version
is supported in all our supported versions. - The comparison against Sphinx's
src_dir
warned that we should use
pathlib.Path
oros.fspath
instead of a string.
Ran tests via tox.
Summary | ID |
---|---|
1f7a7f267b6f9d697c96d33de54bfadaa59f516d |
-
-
I was curious about the rename. I guess that's your linter upset about an unused parameter? I don't think we should get in the habit of altering function signatures for that requirement, as that's going to pose problems depending on how the function is called. That should just be turned off on any linter for arguments.
-
I don't think this is safe. Sphinx 5 uses strings for
srcdir
, and a comparison between aPath(...)
and a string fails.Probably better to normalize
srcdir
to a string before entering this loop.