Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 6f19c6a

Browse filesBrowse files
[3.12] GH-125722: Increase minimum supported Sphinx to 8.1.3 (GH-128922) (#129038)
(cherry picked from commit d46b577) Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
1 parent 22c1d89 commit 6f19c6a
Copy full SHA for 6f19c6a

File tree

Expand file treeCollapse file tree

7 files changed

+14
-100
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

7 files changed

+14
-100
lines changed
Open diff view settings
Collapse file

‎.github/workflows/reusable-docs.yml‎

Copy file name to clipboardExpand all lines: .github/workflows/reusable-docs.yml
-20Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -73,26 +73,6 @@ jobs:
7373
--fail-if-improved \
7474
--fail-if-new-news-nit
7575
76-
# This build doesn't use problem matchers or check annotations
77-
build_doc_oldest_supported_sphinx:
78-
name: 'Docs (Oldest Sphinx)'
79-
runs-on: ubuntu-latest
80-
timeout-minutes: 60
81-
steps:
82-
- uses: actions/checkout@v4
83-
with:
84-
persist-credentials: false
85-
- name: 'Set up Python'
86-
uses: actions/setup-python@v5
87-
with:
88-
python-version: '3.13' # known to work with Sphinx 7.2.6
89-
cache: 'pip'
90-
cache-dependency-path: 'Doc/requirements-oldest-sphinx.txt'
91-
- name: 'Install build dependencies'
92-
run: make -C Doc/ venv REQUIREMENTS="requirements-oldest-sphinx.txt"
93-
- name: 'Build HTML documentation'
94-
run: make -C Doc/ SPHINXOPTS="-q" SPHINXERRORHANDLING="-W --keep-going" html
95-
9676
# Run "doctest" on HEAD as new syntax doesn't exist in the latest stable release
9777
doctest:
9878
name: 'Doctest'
Collapse file

‎Doc/conf.py‎

Copy file name to clipboardExpand all lines: Doc/conf.py
+4-25Lines changed: 4 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,6 @@
99
import importlib
1010
import os
1111
import sys
12-
import time
13-
14-
import sphinx
1512

1613
# Make our custom extensions available to Sphinx
1714
sys.path.append(os.path.abspath('tools/extensions'))
@@ -61,10 +58,7 @@
6158

6259
# General substitutions.
6360
project = 'Python'
64-
if sphinx.version_info[:2] >= (8, 1):
65-
copyright = "2001-%Y, Python Software Foundation"
66-
else:
67-
copyright = f"2001-{time.strftime('%Y')}, Python Software Foundation"
61+
copyright = "2001-%Y, Python Software Foundation"
6862

6963
# We look for the Include/patchlevel.h file in the current Python source tree
7064
# and replace the values accordingly.
@@ -85,7 +79,8 @@
8579
highlight_language = 'python3'
8680

8781
# Minimum version of sphinx required
88-
needs_sphinx = '7.2.6'
82+
# Keep this version in sync with ``Doc/requirements.txt``.
83+
needs_sphinx = '8.1.3'
8984

9085
# Create table of contents entries for domain objects (e.g. functions, classes,
9186
# attributes, etc.). Default is True.
@@ -350,13 +345,7 @@
350345

351346
# This 'Last updated on:' timestamp is inserted at the bottom of every page.
352347
html_last_updated_fmt = '%b %d, %Y (%H:%M UTC)'
353-
if sphinx.version_info[:2] >= (8, 1):
354-
html_last_updated_use_utc = True
355-
else:
356-
html_time = int(os.environ.get('SOURCE_DATE_EPOCH', time.time()))
357-
html_last_updated_fmt = time.strftime(
358-
html_last_updated_fmt, time.gmtime(html_time)
359-
)
348+
html_last_updated_use_utc = True
360349

361350
# Path to find HTML templates to override theme
362351
templates_path = ['tools/templates']
@@ -594,16 +583,6 @@
594583
}
595584
extlinks_detect_hardcoded_links = True
596585

597-
if sphinx.version_info[:2] < (8, 1):
598-
# Sphinx 8.1 has in-built CVE and CWE roles.
599-
extlinks |= {
600-
"cve": (
601-
"https://www.cve.org/CVERecord?id=CVE-%s",
602-
"CVE-%s",
603-
),
604-
"cwe": ("https://cwe.mitre.org/data/definitions/%s.html", "CWE-%s"),
605-
}
606-
607586
# Options for c_annotations extension
608587
# -----------------------------------
609588

Collapse file

‎Doc/constraints.txt‎

Copy file name to clipboardExpand all lines: Doc/constraints.txt
+6-8Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,12 @@ packaging<25
1313
Pygments<3
1414
requests<3
1515
snowballstemmer<3
16-
# keep lower-bounds until Sphinx 8.1 is released
17-
# https://github.com/sphinx-doc/sphinx/pull/12756
18-
sphinxcontrib-applehelp>=1.0.7,<3
19-
sphinxcontrib-devhelp>=1.0.6,<3
20-
sphinxcontrib-htmlhelp>=2.0.6,<3
21-
sphinxcontrib-jsmath>=1.0.1,<2
22-
sphinxcontrib-qthelp>=1.0.6,<3
23-
sphinxcontrib-serializinghtml>=1.1.9,<3
16+
sphinxcontrib-applehelp<3
17+
sphinxcontrib-devhelp<3
18+
sphinxcontrib-htmlhelp<3
19+
sphinxcontrib-jsmath<2
20+
sphinxcontrib-qthelp<3
21+
sphinxcontrib-serializinghtml<3
2422

2523
# Direct dependencies of Jinja2 (Jinja is a dependency of Sphinx, see above)
2624
MarkupSafe<3
Collapse file

‎Doc/requirements-oldest-sphinx.txt‎

Copy file name to clipboardExpand all lines: Doc/requirements-oldest-sphinx.txt
-35Lines changed: 0 additions & 35 deletions
This file was deleted.
Collapse file

‎Doc/requirements.txt‎

Copy file name to clipboardExpand all lines: Doc/requirements.txt
+2-1Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,10 @@
33
# Note that when updating this file, you will likely also have to update
44
# the Doc/constraints.txt file.
55

6-
# Sphinx version is pinned so that new versions that introduce new warnings
6+
# The 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+
# Keep this version in sync with ``Doc/conf.py``.
910
sphinx~=8.1.0
1011

1112
blurb
Collapse file

‎Doc/tools/extensions/c_annotations.py‎

Copy file name to clipboardExpand all lines: Doc/tools/extensions/c_annotations.py
-11Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
from pathlib import Path
1717
from typing import TYPE_CHECKING
1818

19-
import sphinx
2019
from docutils import nodes
2120
from docutils.statemachine import StringList
2221
from sphinx import addnodes
@@ -285,16 +284,6 @@ def setup(app: Sphinx) -> ExtensionMetadata:
285284
app.connect("builder-inited", init_annotations)
286285
app.connect("doctree-read", add_annotations)
287286

288-
if sphinx.version_info[:2] < (7, 2):
289-
from docutils.parsers.rst import directives
290-
from sphinx.domains.c import CObject
291-
292-
# monkey-patch C object...
293-
CObject.option_spec |= {
294-
"no-index-entry": directives.flag,
295-
"no-contents-entry": directives.flag,
296-
}
297-
298287
return {
299288
"version": "1.0",
300289
"parallel_read_safe": True,
Collapse file
+2Lines changed: 2 additions & 0 deletions
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
Require Sphinx 8.1.3 or later to build the Python documentation. Patch by
2+
Adam Turner.

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.