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
47# -- General configuration ------------------------------------------------47# -- General configuration ------------------------------------------------
48 48
49# If your documentation needs a minimal Sphinx version, state it here.49# If your documentation needs a minimal Sphinx version, state it here.
50needs_sphinx = '1.7'50needs_sphinx = '2.4.4'
51 51
52# Add any Sphinx extension module names here, as strings. They can be52# Add any Sphinx extension module names here, as strings. They can be
53# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom53# 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
28==============28==============
29 29
30The ReST markups currently used by the Documentation/ files are meant to be30The ReST markups currently used by the Documentation/ files are meant to be
31built with ``Sphinx`` version 1.7 or higher.31built with ``Sphinx`` version 2.4.4 or higher.
32 32
33There's a script that checks for the Sphinx requirements. Please see33There's a script that checks for the Sphinx requirements. Please see
34:ref:`sphinx-pre-install` for further details.34: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
58iptables 1.4.2 iptables -V58iptables 1.4.2 iptables -V
59openssl & libcrypto 1.0.0 openssl version59openssl & libcrypto 1.0.0 openssl version
60bc 1.06.95 bc --version60bc 1.06.95 bc --version
61Sphinx\ [#f1]_ 1.7 sphinx-build --version61Sphinx\ [#f1]_ 2.4.4 sphinx-build --version
62cpio any cpio --version62cpio any cpio --version
63GNU tar 1.28 tar --version63GNU tar 1.28 tar --version
64gtags (optional) 6.6.5 gtags --version64gtags (optional) 6.6.5 gtags --version
Documentation/sphinx/automarkup.py+1−5
@@ -7,11 +7,7 @@ · 6 unmodified lines
7from docutils import nodes7from docutils import nodes
8import sphinx8import sphinx
9from sphinx import addnodes9from sphinx import addnodes
10if sphinx.version_info[0] < 2 or \10from sphinx.errors import NoUri
11 sphinx.version_info[0] == 2 and sphinx.version_info[1] < 1:
12 from sphinx.environment import NoUri
13else:
14 from sphinx.errors import NoUri
15import re11import re
16from itertools import chain12from itertools import chain
17 13
Documentation/sphinx/cdomain.py+1−5
@@ -127,11 +127,7 @@ def setup(app): · 126 unmodified lines
127 127
128 # Handle easy Sphinx 3.1+ simple new tags: :c:expr and .. c:namespace::128 # Handle easy Sphinx 3.1+ simple new tags: :c:expr and .. c:namespace::
129 app.connect('source-read', c_markups)129 app.connect('source-read', c_markups)
130 130 app.add_domain(CDomain, override=True)
131 if (major == 1 and minor < 8):
132 app.override_domain(CDomain)
133 else:
134 app.add_domain(CDomain, override=True)
135 131
136 return dict(132 return dict(
137 version = __version__,133 version = __version__,
Documentation/sphinx/kfigure.py+1−7
@@ -61,13 +61,7 @@ import sphinx · 60 unmodified lines
61from sphinx.util.nodes import clean_astext61from sphinx.util.nodes import clean_astext
62import kernellog62import kernellog
63 63
64# Get Sphinx version64Figure = images.Figure
65major, minor, patch = sphinx.version_info[:3]
66if major == 1 and minor > 3:
67 # patches.Figure only landed in Sphinx 1.4
68 from sphinx.directives.patches import Figure # pylint: disable=C0413
69else:
70 Figure = images.Figure
71 65
72__version__ = '1.0.0'66__version__ = '1.0.0'
73 67
scripts/sphinx-pre-install+1−9
@@ -32,8 +32,7 @@ my $python_cmd = ""; · 31 unmodified lines
32my $activate_cmd;32my $activate_cmd;
33my $min_version;33my $min_version;
34my $cur_version;34my $cur_version;
35my $rec_version = "1.7.9"; # PDF won't build here35my $rec_version = "3.4.3";
36my $min_pdf_version = "2.4.4"; # Min version where pdf builds
37my $latest_avail_ver;36my $latest_avail_ver;
38 37
39#38#
@@ -791,9 +790,6 @@ sub recommend_sphinx_version($) · 751 unmodified lines
791 790
792 # Version is OK. Nothing to do.791 # Version is OK. Nothing to do.
793 if ($cur_version && ($cur_version ge $rec_version)) {792 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 }
797 return;793 return;
798 };794 };
799 795
@@ -842,10 +838,6 @@ sub recommend_sphinx_version($) · 42 unmodified lines
842 printf "\t. $activate_cmd\n";838 printf "\t. $activate_cmd\n";
843 deactivate_help();839 deactivate_help();
844 840
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
849 return;841 return;
850 }842 }
851 843