From e3d2a104abb7a9fb72180b201a5abcc3b35f208d Mon Sep 17 00:00:00 2001 From: Kirill Podoprigora Date: Sat, 13 Apr 2024 19:53:09 +0300 Subject: [PATCH 1/5] Regen requirements-oldest-sphinx.txt --- Doc/requirements-oldest-sphinx.txt | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/Doc/requirements-oldest-sphinx.txt b/Doc/requirements-oldest-sphinx.txt index 597341d99ffeaa..1a6eff94b019ef 100644 --- a/Doc/requirements-oldest-sphinx.txt +++ b/Doc/requirements-oldest-sphinx.txt @@ -12,24 +12,24 @@ python-docs-theme>=2022.1 # # Sphinx 4.2 comes from ``needs_sphinx = '4.2'`` in ``Doc/conf.py``. -alabaster==0.7.13 -Babel==2.13.0 -certifi==2023.7.22 -charset-normalizer==3.3.0 +alabaster==0.7.16 +Babel==2.14.0 +certifi==2024.2.2 +charset-normalizer==3.3.2 docutils==0.17.1 -idna==3.4 +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 +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 From aac94abdcbbbeb3ba5311c8c9cbda5fa46cdf5a4 Mon Sep 17 00:00:00 2001 From: Kirill Podoprigora Date: Thu, 25 Apr 2024 22:04:47 +0300 Subject: [PATCH 2/5] First try --- Doc/conf.py | 2 +- Doc/requirements-oldest-sphinx.txt | 8 ++++---- Doc/tools/extensions/c_annotations.py | 11 ----------- Doc/tools/extensions/pyspecific.py | 8 +------- 4 files changed, 6 insertions(+), 23 deletions(-) diff --git a/Doc/conf.py b/Doc/conf.py index f4c75c5758cb28..8c0a4dcff2b09b 100644 --- a/Doc/conf.py +++ b/Doc/conf.py @@ -296,7 +296,7 @@ } # Avoid a warning with Sphinx >= 2.0 -master_doc = 'contents' +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 1a6eff94b019ef..9a5f4f3676e089 100644 --- a/Doc/requirements-oldest-sphinx.txt +++ b/Doc/requirements-oldest-sphinx.txt @@ -7,16 +7,16 @@ 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.16 Babel==2.14.0 certifi==2024.2.2 charset-normalizer==3.3.2 -docutils==0.17.1 +docutils==0.19 idna==3.7 imagesize==1.4.1 Jinja2==3.1.3 @@ -25,7 +25,7 @@ packaging==24.0 Pygments==2.17.2 requests==2.31.0 snowballstemmer==2.2.0 -Sphinx==4.2.0 +Sphinx==6.2.1 sphinxcontrib-applehelp==1.0.8 sphinxcontrib-devhelp==1.0.6 sphinxcontrib-htmlhelp==2.0.5 diff --git a/Doc/tools/extensions/c_annotations.py b/Doc/tools/extensions/c_annotations.py index a8b6d8995e3f40..9e581d7184ceed 100644 --- a/Doc/tools/extensions/c_annotations.py +++ b/Doc/tools/extensions/c_annotations.py @@ -20,7 +20,6 @@ """ from os import path -import docutils from docutils import nodes from docutils.parsers.rst import directives from docutils.parsers.rst import Directive @@ -42,16 +41,6 @@ } -# Monkeypatch nodes.Node.findall for forwards compatibility -# 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 c31d67d2868144..e376bc8affb2d0 100644 --- a/Doc/tools/extensions/pyspecific.py +++ b/Doc/tools/extensions/pyspecific.py @@ -28,13 +28,7 @@ from sphinx.util.docutils import SphinxDirective from sphinx.util.nodes import split_explicit_title 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' From 0ff1abd4fbed4124b09931a730a6beb35d37ff64 Mon Sep 17 00:00:00 2001 From: Kirill Podoprigora Date: Thu, 25 Apr 2024 22:14:20 +0300 Subject: [PATCH 3/5] Add a NEWS entry --- .../Documentation/2024-04-25-22-12-20.gh-issue-117928.LKdTno.rst | 1 + 1 file changed, 1 insertion(+) create mode 100644 Misc/NEWS.d/next/Documentation/2024-04-25-22-12-20.gh-issue-117928.LKdTno.rst 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 00000000000000..c8a2a6b759bae9 --- /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. From eef33e324326cbdd89c82c1200e8fec0b3074e58 Mon Sep 17 00:00:00 2001 From: Kirill Podoprigora Date: Thu, 25 Apr 2024 23:08:46 +0300 Subject: [PATCH 4/5] Update comment Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com> --- Doc/conf.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Doc/conf.py b/Doc/conf.py index 8c0a4dcff2b09b..cf82020e2ff7eb 100644 --- a/Doc/conf.py +++ b/Doc/conf.py @@ -295,7 +295,7 @@ 'languages': ['ja', 'fr', 'zh_TW', 'zh_CN'], 'builders': ['man', 'text'], } -# Avoid a warning with Sphinx >= 2.0 +# Avoid a warning with Sphinx >= 4.0 root_doc = 'contents' # Allow translation of index directives From f4318c570ef0cd5004f7231a853a5b408e7a10a0 Mon Sep 17 00:00:00 2001 From: Kirill Podoprigora Date: Thu, 25 Apr 2024 23:10:28 +0300 Subject: [PATCH 5/5] Update workflow --- .github/workflows/reusable-docs.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/reusable-docs.yml b/.github/workflows/reusable-docs.yml index cea8f93d67b29c..9e26d7847d2bd3 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'