Skip to content

Infra: bump Sphinx to 9.0+, limit docutils to <0.22 - #4926

Draft
Secrus wants to merge 1 commit into
python:mainfrom
Secrus:sphinx-9
Draft

Infra: bump Sphinx to 9.0+, limit docutils to <0.22#4926
Secrus wants to merge 1 commit into
python:mainfrom
Secrus:sphinx-9

Conversation

@Secrus

@SecrusSecrus commented Apr 18, 2026

Copy link
Copy Markdown
Contributor

Blocked by: #4908, #4906
Closes: #4087

Bump Sphinx to 9.0+ (9.2 at the moment). docutils is upper-limited because of build errors listed in #4924.

The mv in dirhtml step in the Makefile is no longer needed, since the 404 page builds as 404.html.


📚 Documentation preview 📚: https://pep-previews--4926.org.readthedocs.build/

@hugovkhugovk added the infra Core infrastructure for building and rendering PEPs label Apr 18, 2026
@Secrus

Copy link
Copy Markdown
ContributorAuthor

@hugovk, since there is only one PEP left on the #4087 list, could you please review the proposed change? I am mostly interested in knowing what the policy for older Sphinx versions is, and whether I should go with a lower base for the version range.

@hugovk

Copy link
Copy Markdown
Member

Let's not set a higher version than needed, but if we have a good reason for bumping it, I think that's fine.

Something to note, Sphinx does drop older Python sooner than many projects. For example, Sphinx 9.1.0 requires Python 3.12 or newer.

But then people writing PEPs are targeting changes in 3.15 and soon 3.16 :)

@Secrus
Secrusforce-pushed the sphinx-9 branch 3 times, most recently from 842b11d to cef97cbCompareApril 22, 2026 08:21
@SecrusSecrus changed the title Infra: bump Sphinx to >=9.1, limit docutils to <0.22Infra: bump Sphinx to >8.1, limit docutils to <0.22Apr 22, 2026
@Secrus

Copy link
Copy Markdown
ContributorAuthor

Ok, I have set the Sphinx requirement to > 8.1 to prevent the errors we were fixing. That seems like a reasonable middle ground.

@Secrus
Secrusforce-pushed the sphinx-9 branch 4 times, most recently from 77b6167 to c9ffc7fCompareJuly 24, 2026 08:45
@SecrusSecrus changed the title Infra: bump Sphinx to >8.1, limit docutils to <0.22Infra: bump Sphinx to 9.0+, limit docutils to <0.22Jul 24, 2026

@hugovkhugovk left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

RTD:

Index file is not present in HTML output directory Your documentation did not generate an index.html at its root directory. This is required for documentation serving at the root URL for this version.

Try this in pep_html_builder.py:

 name = DirectoryHTMLBuilder.name
get_target_uri = DirectoryHTMLBuilder.get_target_uri
- get_outfilename = DirectoryHTMLBuilder.get_outfilename+ get_output_path = DirectoryHTMLBuilder.get_output_path

Related to sphinx-doc/sphinx#13045.

Comment threadrequirements.txt Outdated
Comment threadrequirements.txt Outdated
@Secrus

Copy link
Copy Markdown
ContributorAuthor

@hugovk looks like the upgrade to sphinx >= 8.2 would force us to drop Python 3.10 support. Is that ok? I could make a separate PR for that.

@hugovk

Copy link
Copy Markdown
Member

Yep, fine to drop 3.10, it's EOL in a few months.

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

Labels

infraCore infrastructure for building and rendering PEPs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Infra: Fix footnote warnings and allow Sphinx 8.1+

2 participants

@Secrus@hugovk