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

@Secrus Secrus 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/

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

Secrus commented Apr 21, 2026

Copy link
Copy Markdown
Contributor Author

@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

hugovk commented Apr 21, 2026

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
Secrus force-pushed the sphinx-9 branch 3 times, most recently from 842b11d to cef97cb Compare April 22, 2026 08:21
@Secrus Secrus changed the title Infra: bump Sphinx to >=9.1, limit docutils to <0.22 Infra: bump Sphinx to >8.1, limit docutils to <0.22 Apr 22, 2026
@Secrus

Secrus commented Apr 22, 2026

Copy link
Copy Markdown
Contributor Author

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
Secrus force-pushed the sphinx-9 branch 4 times, most recently from 77b6167 to c9ffc7f Compare July 24, 2026 08:45
@Secrus Secrus changed the title Infra: bump Sphinx to >8.1, limit docutils to <0.22 Infra: bump Sphinx to 9.0+, limit docutils to <0.22 Jul 24, 2026

@hugovk hugovk 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 thread requirements.txt
Sphinx >= 5.1.1, != 6.1.0, != 6.1.1, < 8.1.0
docutils >= 0.19.0
Sphinx > 9.0
docutils >= 0.19.0, < 0.22

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.

Only the upper bound is important here, Sphinx already sets docutils>=0.21,<0.23:

Suggested change
docutils >= 0.19.0, < 0.22
docutils < 0.22

And include a comment on why we need an upper bound? Something like pending sphinx-doc/sphinx#14455.

Comment thread requirements.txt
# See https://github.com/sphinx-doc/sphinx/pull/11100
Sphinx >= 5.1.1, != 6.1.0, != 6.1.1, < 8.1.0
docutils >= 0.19.0
Sphinx > 9.0

@hugovk hugovk Jul 24, 2026

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.

I think we can do Sphinx 8.2 or greater?

Suggested change
Sphinx > 9.0
Sphinx >= 8.2

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

Labels

infra Core 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