Skip to content

Commit d6f3eaa

Browse files
committed
gh-104818: Require Sphinx 6.2 to build the doc
1 parent 08b4eb8 commit d6f3eaa

File tree

7 files changed

+17
-25
lines changed

7 files changed

+17
-25
lines changed

.github/workflows/doc.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ jobs:
9393
- name: 'Set up Python'
9494
uses: actions/setup-python@v4
9595
with:
96-
python-version: '3.11' # known to work with Sphinx 3.2
96+
python-version: '3.11' # known to work with Sphinx 6.2.1
9797
cache: 'pip'
9898
cache-dependency-path: 'Doc/requirements-oldest-sphinx.txt'
9999
- name: 'Install build dependencies'

Doc/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@
6666
highlight_language = 'python3'
6767

6868
# Minimum version of sphinx required
69-
needs_sphinx = '3.2'
69+
needs_sphinx = '6.2'
7070

7171
# Ignore any .rst files in the includes/ directory;
7272
# they're embedded in pages but not rendered individually.

Doc/requirements-oldest-sphinx.txt

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -7,32 +7,29 @@ blurb
77
python-docs-theme>=2022.1
88

99
# Generated from:
10-
# pip install "Sphinx~=3.2.0" "docutils<0.17" "Jinja2<3" "MarkupSafe<2"
10+
# pip install "Sphinx~=6.2.0"
1111
# pip freeze
1212
#
13-
# Sphinx 3.2 comes from ``needs_sphinx = '3.2'`` in ``Doc/conf.py``.
14-
# Docutils<0.17, Jinja2<3, and MarkupSafe<2 are additionally specified as
15-
# Sphinx 3.2 is incompatible with newer releases of these packages.
13+
# Sphinx 6.2 comes from ``needs_sphinx = '6.2'`` in ``Doc/conf.py``.
1614

17-
Sphinx==3.2.1
1815
alabaster==0.7.13
1916
Babel==2.12.1
20-
certifi==2022.12.7
17+
certifi==2023.5.7
2118
charset-normalizer==3.1.0
22-
colorama==0.4.6
23-
docutils==0.16
19+
docutils==0.19
2420
idna==3.4
2521
imagesize==1.4.1
26-
Jinja2==2.11.3
27-
MarkupSafe==1.1.1
22+
Jinja2==3.1.2
23+
MarkupSafe==2.1.2
2824
packaging==23.1
2925
Pygments==2.15.1
30-
requests==2.29.0
26+
requests==2.31.0
3127
snowballstemmer==2.2.0
28+
Sphinx==6.2.1
3229
sphinxcontrib-applehelp==1.0.4
3330
sphinxcontrib-devhelp==1.0.2
3431
sphinxcontrib-htmlhelp==2.0.1
3532
sphinxcontrib-jsmath==1.0.1
3633
sphinxcontrib-qthelp==1.0.3
3734
sphinxcontrib-serializinghtml==1.1.5
38-
urllib3==1.26.15
35+
urllib3==2.0.2

Doc/requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
# Sphinx version is pinned so that new versions that introduce new warnings
77
# won't suddenly cause build failures. Updating the version is fine as long
88
# as no warnings are raised by doing so.
9-
sphinx==4.5.0
9+
sphinx==6.2.1
1010

1111
blurb
1212

Doc/tools/extensions/c_annotations.py

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -42,16 +42,6 @@
4242
}
4343

4444

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

Doc/whatsnew/3.13.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,9 @@ that may require changes to your code.
125125
Build Changes
126126
=============
127127

128+
* Sphinx 6.2 or newer is now required to build the Python documentation.
129+
(Contributed by Victor Stinner in :gh:`104818`.)
130+
128131

129132
C API Changes
130133
=============
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
Sphinx 6.2 or newer is now required to build the Python documentation. Patch
2+
by Victor Stinner.

0 commit comments

Comments
 (0)