Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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.

Reviewed-by: Mauro Carvalho Chehab <mchehab@kernel.org>
Link: https://lore.kernel.org/r/874jgs47fq.fsf@meer.lwn.net
Signed-off-by: Jonathan Corbet <corbet@lwn.net>

+7 -29
+1 -1
Documentation/conf.py
··· 47 47 # -- General configuration ------------------------------------------------ 48 48 49 49 # If your documentation needs a minimal Sphinx version, state it here. 50 - needs_sphinx = '1.7' 50 + needs_sphinx = '2.4.4' 51 51 52 52 # Add any Sphinx extension module names here, as strings. They can be 53 53 # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
+1 -1
Documentation/doc-guide/sphinx.rst
··· 28 28 ============== 29 29 30 30 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. 32 32 33 33 There's a script that checks for the Sphinx requirements. Please see 34 34 :ref:`sphinx-pre-install` for further details.
+1 -1
Documentation/process/changes.rst
··· 58 58 iptables 1.4.2 iptables -V 59 59 openssl & libcrypto 1.0.0 openssl version 60 60 bc 1.06.95 bc --version 61 - Sphinx\ [#f1]_ 1.7 sphinx-build --version 61 + Sphinx\ [#f1]_ 2.4.4 sphinx-build --version 62 62 cpio any cpio --version 63 63 GNU tar 1.28 tar --version 64 64 gtags (optional) 6.6.5 gtags --version
+1 -5
Documentation/sphinx/automarkup.py
··· 7 7 from docutils import nodes 8 8 import sphinx 9 9 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 15 11 import re 16 12 from itertools import chain 17 13
+1 -5
Documentation/sphinx/cdomain.py
··· 127 127 128 128 # Handle easy Sphinx 3.1+ simple new tags: :c:expr and .. c:namespace:: 129 129 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) 135 131 136 132 return dict( 137 133 version = __version__,
+1 -7
Documentation/sphinx/kfigure.py
··· 61 61 from sphinx.util.nodes import clean_astext 62 62 import kernellog 63 63 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 71 65 72 66 __version__ = '1.0.0' 73 67
+1 -9
scripts/sphinx-pre-install
··· 32 32 my $activate_cmd; 33 33 my $min_version; 34 34 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"; 37 36 my $latest_avail_ver; 38 37 39 38 # ··· 790 791 791 792 # Version is OK. Nothing to do. 792 793 if ($cur_version && ($cur_version ge $rec_version)) { 793 - if ($cur_version lt $min_pdf_version) { 794 - print "note: If you want pdf, you need at least Sphinx $min_pdf_version.\n"; 795 - } 796 794 return; 797 795 }; 798 796 ··· 837 841 printf "\nNeed to activate Sphinx (version $latest_avail_ver) on virtualenv with:\n"; 838 842 printf "\t. $activate_cmd\n"; 839 843 deactivate_help(); 840 - 841 - if ($latest_avail_ver lt $min_pdf_version) { 842 - print "note: If you want pdf, you need at least Sphinx $min_pdf_version.\n"; 843 - } 844 844 845 845 return; 846 846 }