History

docs: Raise the minimum Sphinx requirement to 2.4.4

Commit 31abfdda6527 (docs: Deprecate use of Sphinx < 2.4.x) in 6.2 added a warning that support for older versions of Sphinx would be going away. There have been no complaints, so the time has come. Raise the minimum Sphinx version to 2.4.4 and clean out some compatibility code that we no longer need.

Jonathan Corbet committed 2 years ago

Commit 3e893e11 parent 50709577 files · +7 −29Browse files

Unified · Split

7 files
  1. Documentation/conf.py +1 −1
  2. Documentation/doc-guide/sphinx.rst +1 −1
  3. Documentation/process/changes.rst +1 −1
  4. Documentation/sphinx/automarkup.py +1 −5
  5. Documentation/sphinx/cdomain.py +1 −5
  6. Documentation/sphinx/kfigure.py +1 −7
  7. scripts/sphinx-pre-install +1 −9
Documentation/conf.py+1−1
@@ -47,7 +47,7 @@ from load_config import loadConfig · 46 unmodified lines
4747 # -- General configuration ------------------------------------------------
4848
4949 # If your documentation needs a minimal Sphinx version, state it here.
50−needs_sphinx = '1.7'
50+needs_sphinx = '2.4.4'
5151
5252 # Add any Sphinx extension module names here, as strings. They can be
5353 # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
Documentation/doc-guide/sphinx.rst+1−1
@@ -28,7 +28,7 @@ Sphinx Install · 27 unmodified lines
2828 ==============
2929
3030 The ReST markups currently used by the Documentation/ files are meant to be
31−built with ``Sphinx`` version 1.7 or higher.
31+built with ``Sphinx`` version 2.4.4 or higher.
3232
3333 There's a script that checks for the Sphinx requirements. Please see
3434 :ref:`sphinx-pre-install` for further details.
Documentation/process/changes.rst+1−1
@@ -58,7 +58,7 @@ mcelog 0.6 mcelog --version · 57 unmodified lines
5858 iptables 1.4.2 iptables -V
5959 openssl & libcrypto 1.0.0 openssl version
6060 bc 1.06.95 bc --version
61−Sphinx\ [#f1]_ 1.7 sphinx-build --version
61+Sphinx\ [#f1]_ 2.4.4 sphinx-build --version
6262 cpio any cpio --version
6363 GNU tar 1.28 tar --version
6464 gtags (optional) 6.6.5 gtags --version
Documentation/sphinx/automarkup.py+1−5
@@ -7,11 +7,7 @@ · 6 unmodified lines
77 from docutils import nodes
88 import sphinx
99 from sphinx import addnodes
10−if sphinx.version_info[0] < 2 or \
11− sphinx.version_info[0] == 2 and sphinx.version_info[1] < 1:
12− from sphinx.environment import NoUri
13−else:
14− from sphinx.errors import NoUri
10+from sphinx.errors import NoUri
1511 import re
1612 from itertools import chain
1713
Documentation/sphinx/cdomain.py+1−5
@@ -127,11 +127,7 @@ def setup(app): · 126 unmodified lines
127127
128128 # Handle easy Sphinx 3.1+ simple new tags: :c:expr and .. c:namespace::
129129 app.connect('source-read', c_markups)
130−
131− if (major == 1 and minor < 8):
132− app.override_domain(CDomain)
133− else:
134− app.add_domain(CDomain, override=True)
130+ app.add_domain(CDomain, override=True)
135131
136132 return dict(
137133 version = __version__,
Documentation/sphinx/kfigure.py+1−7
@@ -61,13 +61,7 @@ import sphinx · 60 unmodified lines
6161 from sphinx.util.nodes import clean_astext
6262 import kernellog
6363
64−# Get Sphinx version
65−major, minor, patch = sphinx.version_info[:3]
66−if major == 1 and minor > 3:
67− # patches.Figure only landed in Sphinx 1.4
68− from sphinx.directives.patches import Figure # pylint: disable=C0413
69−else:
70− Figure = images.Figure
64+Figure = images.Figure
7165
7266 __version__ = '1.0.0'
7367
scripts/sphinx-pre-install+1−9
@@ -32,8 +32,7 @@ my $python_cmd = ""; · 31 unmodified lines
3232 my $activate_cmd;
3333 my $min_version;
3434 my $cur_version;
35−my $rec_version = "1.7.9"; # PDF won't build here
36−my $min_pdf_version = "2.4.4"; # Min version where pdf builds
35+my $rec_version = "3.4.3";
3736 my $latest_avail_ver;
3837
3938 #
@@ -791,9 +790,6 @@ sub recommend_sphinx_version($) · 751 unmodified lines
791790
792791 # Version is OK. Nothing to do.
793792 if ($cur_version && ($cur_version ge $rec_version)) {
794− if ($cur_version lt $min_pdf_version) {
795− print "note: If you want pdf, you need at least Sphinx $min_pdf_version.\n";
796− }
797793 return;
798794 };
799795
@@ -842,10 +838,6 @@ sub recommend_sphinx_version($) · 42 unmodified lines
842838 printf "\t. $activate_cmd\n";
843839 deactivate_help();
844840
845− if ($latest_avail_ver lt $min_pdf_version) {
846− print "note: If you want pdf, you need at least Sphinx $min_pdf_version.\n";
847− }
848−
849841 return;
850842 }
851843