Skip to content

Commit

Permalink
gh-104818: Require Sphinx 6.2 to build the doc
Browse files Browse the repository at this point in the history
  • Loading branch information
vstinner committed May 23, 2023
1 parent 08b4eb8 commit d6f3eaa
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 25 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/doc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ jobs:
- name: 'Set up Python'
uses: actions/setup-python@v4
with:
python-version: '3.11' # known to work with Sphinx 3.2
python-version: '3.11' # known to work with Sphinx 6.2.1
cache: 'pip'
cache-dependency-path: 'Doc/requirements-oldest-sphinx.txt'
- name: 'Install build dependencies'
Expand Down
2 changes: 1 addition & 1 deletion Doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
highlight_language = 'python3'

# Minimum version of sphinx required
needs_sphinx = '3.2'
needs_sphinx = '6.2'

# Ignore any .rst files in the includes/ directory;
# they're embedded in pages but not rendered individually.
Expand Down
21 changes: 9 additions & 12 deletions Doc/requirements-oldest-sphinx.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,32 +7,29 @@ blurb
python-docs-theme>=2022.1

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

Sphinx==3.2.1
alabaster==0.7.13
Babel==2.12.1
certifi==2022.12.7
certifi==2023.5.7
charset-normalizer==3.1.0
colorama==0.4.6
docutils==0.16
docutils==0.19
idna==3.4
imagesize==1.4.1
Jinja2==2.11.3
MarkupSafe==1.1.1
Jinja2==3.1.2
MarkupSafe==2.1.2
packaging==23.1
Pygments==2.15.1
requests==2.29.0
requests==2.31.0
snowballstemmer==2.2.0
Sphinx==6.2.1
sphinxcontrib-applehelp==1.0.4
sphinxcontrib-devhelp==1.0.2
sphinxcontrib-htmlhelp==2.0.1
sphinxcontrib-jsmath==1.0.1
sphinxcontrib-qthelp==1.0.3
sphinxcontrib-serializinghtml==1.1.5
urllib3==1.26.15
urllib3==2.0.2
2 changes: 1 addition & 1 deletion Doc/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
# Sphinx version is pinned so that new versions that introduce new warnings
# won't suddenly cause build failures. Updating the version is fine as long
# as no warnings are raised by doing so.
sphinx==4.5.0
sphinx==6.2.1

blurb

Expand Down
10 changes: 0 additions & 10 deletions Doc/tools/extensions/c_annotations.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,16 +42,6 @@
}


# Monkeypatch nodes.Node.findall for forwards compatability
# This patch can be dropped when the minimum Sphinx version is 4.4.0
# or the minimum Docutils version is 0.18.1.
if docutils.__version_info__ < (0, 18, 1):
def findall(self, *args, **kwargs):
return iter(self.traverse(*args, **kwargs))

nodes.Node.findall = findall


class RCEntry:
def __init__(self, name):
self.name = name
Expand Down
3 changes: 3 additions & 0 deletions Doc/whatsnew/3.13.rst
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,9 @@ that may require changes to your code.
Build Changes
=============

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


C API Changes
=============
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Sphinx 6.2 or newer is now required to build the Python documentation. Patch
by Victor Stinner.

0 comments on commit d6f3eaa

Please sign in to comment.