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.
Unified · Split
| @@ -47,7 +47,7 @@ from load_config import loadConfig · 46 unmodified lines | ||
| 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 |
| @@ -28,7 +28,7 @@ Sphinx Install · 27 unmodified lines | ||
| 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. |
| @@ -58,7 +58,7 @@ mcelog 0.6 mcelog --version · 57 unmodified lines | ||
| 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 |
| @@ -7,11 +7,7 @@ · 6 unmodified lines | ||
| 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 | |
| @@ -127,11 +127,7 @@ def setup(app): · 126 unmodified lines | ||
| 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__, |
| @@ -61,13 +61,7 @@ import sphinx · 60 unmodified lines | ||
| 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 | |
| @@ -32,8 +32,7 @@ my $python_cmd = ""; · 31 unmodified lines | ||
| 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 | # |
| @@ -791,9 +790,6 @@ sub recommend_sphinx_version($) · 751 unmodified lines | ||
| 791 | 790 | |
| 792 | 791 | # Version is OK. Nothing to do. |
| 793 | 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 | 793 | return; |
| 798 | 794 | }; |
| 799 | 795 | |
| @@ -842,10 +838,6 @@ sub recommend_sphinx_version($) · 42 unmodified lines | ||
| 842 | 838 | printf "\t. $activate_cmd\n"; |
| 843 | 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 | 841 | return; |
| 850 | 842 | } |
| 851 | 843 | |