docs: Raise the minimum Sphinx requirement to 2.4.4
Commit 31abfdda65 (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>
This commit is contained in:
@@ -7,11 +7,7 @@
|
||||
from docutils import nodes
|
||||
import sphinx
|
||||
from sphinx import addnodes
|
||||
if sphinx.version_info[0] < 2 or \
|
||||
sphinx.version_info[0] == 2 and sphinx.version_info[1] < 1:
|
||||
from sphinx.environment import NoUri
|
||||
else:
|
||||
from sphinx.errors import NoUri
|
||||
from sphinx.errors import NoUri
|
||||
import re
|
||||
from itertools import chain
|
||||
|
||||
|
||||
@@ -127,11 +127,7 @@ def setup(app):
|
||||
|
||||
# Handle easy Sphinx 3.1+ simple new tags: :c:expr and .. c:namespace::
|
||||
app.connect('source-read', c_markups)
|
||||
|
||||
if (major == 1 and minor < 8):
|
||||
app.override_domain(CDomain)
|
||||
else:
|
||||
app.add_domain(CDomain, override=True)
|
||||
app.add_domain(CDomain, override=True)
|
||||
|
||||
return dict(
|
||||
version = __version__,
|
||||
|
||||
@@ -61,13 +61,7 @@ import sphinx
|
||||
from sphinx.util.nodes import clean_astext
|
||||
import kernellog
|
||||
|
||||
# Get Sphinx version
|
||||
major, minor, patch = sphinx.version_info[:3]
|
||||
if major == 1 and minor > 3:
|
||||
# patches.Figure only landed in Sphinx 1.4
|
||||
from sphinx.directives.patches import Figure # pylint: disable=C0413
|
||||
else:
|
||||
Figure = images.Figure
|
||||
Figure = images.Figure
|
||||
|
||||
__version__ = '1.0.0'
|
||||
|
||||
|
||||
Reference in New Issue
Block a user