Commit 629ecd68 authored by Jonathan Corbet's avatar Jonathan Corbet
Browse files

Merge branch 'mauro' into docs-mw

Mauro says:

This series  increases the minimal requirements for Sphinx and Python, and
drop some backward-compatible code from Sphinx extension.

Looking at Sphinx release dates:

	Release 2.4.0 (released Feb 09, 2020)
	Release 2.4.4 (released Mar 05, 2020) (current minimal requirement)
	Release 3.4.0 (released Dec 20, 2020)
	Release 3.4.3 (released Jan 08, 2021)

	(https://www.sphinx-doc.org/en/master/changes/index.html)

And Python release dates, we have:

	Python	Release date
	3.5	2015-09-13    (current minimal requirement)
	3.6	2016-12-23
	3.7 	2018-06-27
	3.8 	2019-10-14
	3.9 	2020-10-05
	3.10	2021-10-04

	(according with https://en.wikipedia.org/w/index.php?title=History_of_Python)

The new minimal requirements are now compatible with the toolset available on Jan, 2021,
e.g.:
	- Sphinx 3.4.3;
	- Python 3.9

The new Sphinx minimal requirement allows dropping all backward-compatible code
we have at kernel-doc and at Sphinx extensions.

The new Python minimal requirement also matches the current required level for
almost  all scripts (*).

Those matches a 4-years old toolchain, which sounds a reasonable period
of time, as Python/Sphinx aren't required for the Kernel build.

(*) Except for a couple scripts inside tools that require python 3.10:

    $ vermin -v $(git ls-files '*.py')|grep 3.10
    !2, 3.10     tools/net/sunrpc/xdrgen/generators/__init__.py
    !2, 3.10     tools/net/sunrpc/xdrgen/generators/program.py
    !2, 3.10     tools/net/sunrpc/xdrgen/subcmds/source.py
    !2, 3.10     tools/net/sunrpc/xdrgen/xdr_ast.py
    !2, 3.10     tools/perf/scripts/python/mem-phys-addr.py
    !2, 3.10     tools/power/cpupower/bindings/python/test_raw_pylibcpupower.py

Such scripts aren't required for Kernel builds, so it should be OK to set minimal
python version to 3.9.
parents de61d651 089e06c3
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -47,7 +47,7 @@ from load_config import loadConfig
# -- General configuration ------------------------------------------------

# If your documentation needs a minimal Sphinx version, state it here.
needs_sphinx = '2.4.4'
needs_sphinx = '3.4.3'

# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
+2 −2
Original line number Diff line number Diff line
@@ -58,11 +58,11 @@ mcelog 0.6 mcelog --version
iptables               1.4.2            iptables -V
openssl & libcrypto    1.0.0            openssl version
bc                     1.06.95          bc --version
Sphinx\ [#f1]_         2.4.4            sphinx-build --version
Sphinx\ [#f1]_         3.4.3            sphinx-build --version
GNU tar                1.28             tar --version
gtags (optional)       6.6.5            gtags --version
mkimage (optional)     2017.01          mkimage --version
Python (optional)      3.5.x            python3 --version
Python (optional)      3.9.x            python3 --version
GNU AWK (optional)     5.1.0            gawk --version
====================== ===============  ========================================

+2 −5
Original line number Diff line number Diff line
# -*- coding: utf-8; mode: python -*-
# pylint: disable=W0141,C0113,C0103,C0325
u"""
"""
    cdomain
    ~~~~~~~

@@ -45,9 +45,6 @@ import re

__version__  = '1.1'

# Get Sphinx version
major, minor, patch = sphinx.version_info[:3]

# Namespace to be prepended to the full name
namespace = None

@@ -145,7 +142,7 @@ class CObject(Base_CObject):
    }

    def handle_func_like_macro(self, sig, signode):
        u"""Handles signatures of function-like macros.
        """Handles signatures of function-like macros.

        If the objtype is 'function' and the signature ``sig`` is a
        function-like macro, the name of the macro is returned. Otherwise
+3 −3
Original line number Diff line number Diff line
@@ -2,7 +2,7 @@
# coding=utf-8
# SPDX-License-Identifier: GPL-2.0
#
u"""
"""
    kernel-abi
    ~~~~~~~~~~

@@ -55,7 +55,7 @@ path = os.path.join(srctree, "Documentation/ABI")
_kernel_abi = None

def get_kernel_abi():
    u"""
    """
    Initialize kernel_abi global var, if not initialized yet.

    This is needed to avoid warnings during Sphinx module initialization.
@@ -81,7 +81,7 @@ def setup(app):


class KernelCmd(Directive):
    u"""KernelABI (``kernel-abi``) directive"""
    """KernelABI (``kernel-abi``) directive"""

    required_arguments = 1
    optional_arguments = 3
+2 −2
Original line number Diff line number Diff line
# coding=utf-8
# SPDX-License-Identifier: GPL-2.0
#
u"""
"""
    kernel-feat
    ~~~~~~~~~~~

@@ -56,7 +56,7 @@ def setup(app):

class KernelFeat(Directive):

    u"""KernelFeat (``kernel-feat``) directive"""
    """KernelFeat (``kernel-feat``) directive"""

    required_arguments = 1
    optional_arguments = 2
Loading