Skip to content

Commit ef12d23

Browse files
Eclips4hugovk
andauthored
[3.12] gh-117928: Bump the minimum Sphinx version to 6.2.1 (GH-117853) (#118321)
Co-authored-by: Hugo van Kemenade <[email protected]>
1 parent db47460 commit ef12d23

File tree

6 files changed

+24
-40
lines changed

6 files changed

+24
-40
lines changed

.github/workflows/reusable-docs.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ jobs:
7474
- name: 'Set up Python'
7575
uses: actions/setup-python@v5
7676
with:
77-
python-version: '3.11' # known to work with Sphinx 4.2
77+
python-version: '3.12' # known to work with Sphinx 6.2.1
7878
cache: 'pip'
7979
cache-dependency-path: 'Doc/requirements-oldest-sphinx.txt'
8080
- name: 'Install build dependencies'

Doc/conf.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -283,8 +283,8 @@
283283
'languages': ['ja', 'fr', 'zh_TW', 'zh_CN'], 'builders': ['man', 'text'],
284284
}
285285

286-
# Avoid a warning with Sphinx >= 2.0
287-
master_doc = 'contents'
286+
# Avoid a warning with Sphinx >= 4.0
287+
root_doc = 'contents'
288288

289289
# Allow translation of index directives
290290
gettext_additional_targets = [

Doc/requirements-oldest-sphinx.txt

+19-19
Original file line numberDiff line numberDiff line change
@@ -7,29 +7,29 @@ blurb
77
python-docs-theme>=2022.1
88

99
# Generated from:
10-
# pip install "Sphinx~=4.2.0"
10+
# pip install "Sphinx~=6.2.1"
1111
# pip freeze
1212
#
13-
# Sphinx 4.2 comes from ``needs_sphinx = '4.2'`` in ``Doc/conf.py``.
13+
# Sphinx 6.2.1 comes from ``needs_sphinx = '6.2.1'`` in ``Doc/conf.py``.
1414

15-
alabaster==0.7.13
16-
Babel==2.13.0
17-
certifi==2023.7.22
18-
charset-normalizer==3.3.0
19-
docutils==0.17.1
20-
idna==3.4
15+
alabaster==0.7.16
16+
Babel==2.14.0
17+
certifi==2024.2.2
18+
charset-normalizer==3.3.2
19+
docutils==0.19
20+
idna==3.7
2121
imagesize==1.4.1
22-
Jinja2==3.1.2
23-
MarkupSafe==2.1.3
24-
packaging==23.2
25-
Pygments==2.16.1
22+
Jinja2==3.1.3
23+
MarkupSafe==2.1.5
24+
packaging==24.0
25+
Pygments==2.17.2
2626
requests==2.31.0
2727
snowballstemmer==2.2.0
28-
Sphinx==4.2.0
29-
sphinxcontrib-applehelp==1.0.4
30-
sphinxcontrib-devhelp==1.0.2
31-
sphinxcontrib-htmlhelp==2.0.1
28+
Sphinx==6.2.1
29+
sphinxcontrib-applehelp==1.0.8
30+
sphinxcontrib-devhelp==1.0.6
31+
sphinxcontrib-htmlhelp==2.0.5
3232
sphinxcontrib-jsmath==1.0.1
33-
sphinxcontrib-qthelp==1.0.3
34-
sphinxcontrib-serializinghtml==1.1.5
35-
urllib3==2.0.7
33+
sphinxcontrib-qthelp==1.0.7
34+
sphinxcontrib-serializinghtml==1.1.10
35+
urllib3==2.2.1

Doc/tools/extensions/c_annotations.py

-11
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919
"""
2020

2121
from os import path
22-
import docutils
2322
from docutils import nodes
2423
from docutils.parsers.rst import directives
2524
from docutils.parsers.rst import Directive
@@ -40,16 +39,6 @@
4039
}
4140

4241

43-
# Monkeypatch nodes.Node.findall for forwards compatability
44-
# This patch can be dropped when the minimum Sphinx version is 4.4.0
45-
# or the minimum Docutils version is 0.18.1.
46-
if docutils.__version_info__ < (0, 18, 1):
47-
def findall(self, *args, **kwargs):
48-
return iter(self.traverse(*args, **kwargs))
49-
50-
nodes.Node.findall = findall
51-
52-
5342
class RCEntry:
5443
def __init__(self, name):
5544
self.name = name

Doc/tools/extensions/pyspecific.py

+1-7
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,7 @@
2727
from sphinx.util import logging
2828
from sphinx.util.docutils import SphinxDirective
2929
from sphinx.writers.text import TextWriter, TextTranslator
30-
31-
try:
32-
# Sphinx 6+
33-
from sphinx.util.display import status_iterator
34-
except ImportError:
35-
# Deprecated in Sphinx 6.1, will be removed in Sphinx 8
36-
from sphinx.util import status_iterator
30+
from sphinx.util.display import status_iterator
3731

3832

3933
ISSUE_URI = 'https://bugs.python.org/issue?@action=redirect&bpo=%s'
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
The minimum Sphinx version required for the documentation is now 6.2.1.

0 commit comments

Comments
 (0)