summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKirill Podoprigora <kirill.bast9@mail.ru>2024-04-26 14:18:58 (GMT)
committerGitHub <noreply@github.com>2024-04-26 14:18:58 (GMT)
commitef12d239faeaca55d65702d04d8fa4cb4b4e52c7 (patch)
treefdd17d3330e306d8bb0885ca695e9b09aea044fe
parentdb474606f752a3990117c38875554a793a203a2c (diff)
downloadcpython-ef12d239faeaca55d65702d04d8fa4cb4b4e52c7.zip
cpython-ef12d239faeaca55d65702d04d8fa4cb4b4e52c7.tar.gz
cpython-ef12d239faeaca55d65702d04d8fa4cb4b4e52c7.tar.bz2
[3.12] gh-117928: Bump the minimum Sphinx version to 6.2.1 (GH-117853) (#118321)
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
-rw-r--r--.github/workflows/reusable-docs.yml2
-rw-r--r--Doc/conf.py4
-rw-r--r--Doc/requirements-oldest-sphinx.txt38
-rw-r--r--Doc/tools/extensions/c_annotations.py11
-rw-r--r--Doc/tools/extensions/pyspecific.py8
-rw-r--r--Misc/NEWS.d/next/Documentation/2024-04-25-22-12-20.gh-issue-117928.LKdTno.rst1
6 files changed, 24 insertions, 40 deletions
diff --git a/.github/workflows/reusable-docs.yml b/.github/workflows/reusable-docs.yml
index cea8f93..9e26d78 100644
--- a/.github/workflows/reusable-docs.yml
+++ b/.github/workflows/reusable-docs.yml
@@ -74,7 +74,7 @@ jobs:
- name: 'Set up Python'
uses: actions/setup-python@v5
with:
- python-version: '3.11' # known to work with Sphinx 4.2
+ python-version: '3.12' # known to work with Sphinx 6.2.1
cache: 'pip'
cache-dependency-path: 'Doc/requirements-oldest-sphinx.txt'
- name: 'Install build dependencies'
diff --git a/Doc/conf.py b/Doc/conf.py
index 6bc130d..784d84c 100644
--- a/Doc/conf.py
+++ b/Doc/conf.py
@@ -283,8 +283,8 @@ smartquotes_excludes = {
'languages': ['ja', 'fr', 'zh_TW', 'zh_CN'], 'builders': ['man', 'text'],
}
-# Avoid a warning with Sphinx >= 2.0
-master_doc = 'contents'
+# Avoid a warning with Sphinx >= 4.0
+root_doc = 'contents'
# Allow translation of index directives
gettext_additional_targets = [
diff --git a/Doc/requirements-oldest-sphinx.txt b/Doc/requirements-oldest-sphinx.txt
index 597341d..9a5f4f3 100644
--- a/Doc/requirements-oldest-sphinx.txt
+++ b/Doc/requirements-oldest-sphinx.txt
@@ -7,29 +7,29 @@ blurb
python-docs-theme>=2022.1
# Generated from:
-# pip install "Sphinx~=4.2.0"
+# pip install "Sphinx~=6.2.1"
# pip freeze
#
-# Sphinx 4.2 comes from ``needs_sphinx = '4.2'`` in ``Doc/conf.py``.
+# Sphinx 6.2.1 comes from ``needs_sphinx = '6.2.1'`` in ``Doc/conf.py``.
-alabaster==0.7.13
-Babel==2.13.0
-certifi==2023.7.22
-charset-normalizer==3.3.0
-docutils==0.17.1
-idna==3.4
+alabaster==0.7.16
+Babel==2.14.0
+certifi==2024.2.2
+charset-normalizer==3.3.2
+docutils==0.19
+idna==3.7
imagesize==1.4.1
-Jinja2==3.1.2
-MarkupSafe==2.1.3
-packaging==23.2
-Pygments==2.16.1
+Jinja2==3.1.3
+MarkupSafe==2.1.5
+packaging==24.0
+Pygments==2.17.2
requests==2.31.0
snowballstemmer==2.2.0
-Sphinx==4.2.0
-sphinxcontrib-applehelp==1.0.4
-sphinxcontrib-devhelp==1.0.2
-sphinxcontrib-htmlhelp==2.0.1
+Sphinx==6.2.1
+sphinxcontrib-applehelp==1.0.8
+sphinxcontrib-devhelp==1.0.6
+sphinxcontrib-htmlhelp==2.0.5
sphinxcontrib-jsmath==1.0.1
-sphinxcontrib-qthelp==1.0.3
-sphinxcontrib-serializinghtml==1.1.5
-urllib3==2.0.7
+sphinxcontrib-qthelp==1.0.7
+sphinxcontrib-serializinghtml==1.1.10
+urllib3==2.2.1
diff --git a/Doc/tools/extensions/c_annotations.py b/Doc/tools/extensions/c_annotations.py
index 7ddeea5..7916b17 100644
--- a/Doc/tools/extensions/c_annotations.py
+++ b/Doc/tools/extensions/c_annotations.py
@@ -19,7 +19,6 @@
"""
from os import path
-import docutils
from docutils import nodes
from docutils.parsers.rst import directives
from docutils.parsers.rst import Directive
@@ -40,16 +39,6 @@ REST_ROLE_MAP = {
}
-# 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
diff --git a/Doc/tools/extensions/pyspecific.py b/Doc/tools/extensions/pyspecific.py
index 8ce0df0..47a245f 100644
--- a/Doc/tools/extensions/pyspecific.py
+++ b/Doc/tools/extensions/pyspecific.py
@@ -27,13 +27,7 @@ from sphinx.locale import _ as sphinx_gettext
from sphinx.util import logging
from sphinx.util.docutils import SphinxDirective
from sphinx.writers.text import TextWriter, TextTranslator
-
-try:
- # Sphinx 6+
- from sphinx.util.display import status_iterator
-except ImportError:
- # Deprecated in Sphinx 6.1, will be removed in Sphinx 8
- from sphinx.util import status_iterator
+from sphinx.util.display import status_iterator
ISSUE_URI = 'https://bugs.python.org/issue?@action=redirect&bpo=%s'
diff --git a/Misc/NEWS.d/next/Documentation/2024-04-25-22-12-20.gh-issue-117928.LKdTno.rst b/Misc/NEWS.d/next/Documentation/2024-04-25-22-12-20.gh-issue-117928.LKdTno.rst
new file mode 100644
index 0000000..c8a2a6b
--- /dev/null
+++ b/Misc/NEWS.d/next/Documentation/2024-04-25-22-12-20.gh-issue-117928.LKdTno.rst
@@ -0,0 +1 @@
+The minimum Sphinx version required for the documentation is now 6.2.1.