From nobody Sun Dec 14 01:49:02 2025 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id DFBD21DEFEA; Wed, 29 Jan 2025 16:09:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1738167000; cv=none; b=fH6l47qs8qhfeOLTK5QGcpZRjwb4uKDWUWMx2trtinLvx8zlqIOm2WVaT/xOYt3v00HtumI+LsnOWptogxFa4R8+PUyK/DPenRFZwojlzA7xQ92r4dWOGX2G6/+XtQ0x/efKC8sAy1oCjzfEkq0E8QROu4Ai4ue3eoYt++szMEI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1738167000; c=relaxed/simple; bh=5OUVA+DifT9fiAR1a4XwZcggsOOvHcxKgnNy11VXdK4=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=iKervcdhoMx4Ob5l8E1FGNvsCcABgxk0+6acREZyHwEQ7VqSGm+DdRkzBgHaucmJH5XISb2nOTXpv/bJ5EQyBCts0MRlihXIl83FgQ/RS09ZFMcy7StN/tlG9EUzxI45EwqENjxYtTucqseN3c/wyQlnMsZdAvNsmd+Y7WVT1fw= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=t/BH31fY; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="t/BH31fY" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7A013C4CEE5; Wed, 29 Jan 2025 16:09:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1738166999; bh=5OUVA+DifT9fiAR1a4XwZcggsOOvHcxKgnNy11VXdK4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=t/BH31fY6T3i68shjEYcsDRGT6Q9RY0aMsPVsDG83pYDdQ57/spyDPw7F26YLrLHk NeJeaMlou4ZJPc0d/EMio/iDvqnM5mkwU7MJVWK14vRM8rOyF7LKS0aK1APQnlNLbu Dg1NZlB081L/mz9kjXYaPZvf94Kx3boS0r5dIh8xaEhxtNA92hd7E5qM1h8R85oE3M 9q3ABVFQQ+939NxrAVoN5EegaOkvIm60jaW44fAe6Hp8E9hGd3w957hXQGfUCY12z8 LO0MDoh7Jw5Z2GWxm8yCM68bISxcKvHrulHHqFUbkffFuZKkeupm+3qWXhvgtyfc0O S5RePaysWQPyQ== Received: from mchehab by mail.kernel.org with local (Exim 4.98) (envelope-from ) id 1tdAdZ-00000004PEK-1eS9; Wed, 29 Jan 2025 17:09:57 +0100 From: Mauro Carvalho Chehab To: Linux Doc Mailing List , "Jonathan Corbet" Cc: Mauro Carvalho Chehab , "Mauro Carvalho Chehab" , linux-kernel@vger.kernel.org, Akira Yokosawa Subject: [RFC 1/6] scripts/get_abi.py: make it backward-compatible with Python 3.6 Date: Wed, 29 Jan 2025 17:09:32 +0100 Message-ID: <6d74360f8cdabeb0bf628a6e870d10e134f396f0.1738166451.git.mchehab+huawei@kernel.org> X-Mailer: git-send-email 2.48.1 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: Mauro Carvalho Chehab Content-Type: text/plain; charset="utf-8" Despite being introduced on Python 3.6, the original implementation was too limited: it doesn't accept anything but the argument. Even on python 3.10.12, support was still limited, as more complex operations cause SyntaxError: Exception occurred: File ".../linux/Documentation/sphinx/kernel_abi.py", line 48, in from get_abi import AbiParser File ".../linux/scripts/get_abi.py", line 525 msg +=3D f"{part}\n{"-" * len(part)}\n\n" ^ SyntaxError: f-string: expecting '}' Replace f-strings by normal string concatenation when it doesn't work on Python 3.6. Reported-by: Akira Yokosawa Signed-off-by: Mauro Carvalho Chehab Tested-by: Akira Yokosawa --- scripts/get_abi.py | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/scripts/get_abi.py b/scripts/get_abi.py index 543bed397c8c..e6e94f721fff 100755 --- a/scripts/get_abi.py +++ b/scripts/get_abi.py @@ -522,7 +522,7 @@ class AbiParser: =20 if cur_part and cur_part !=3D part: part =3D cur_part - msg +=3D f"{part}\n{"-" * len(part)}\n\n" + msg +=3D part + "\n"+ "-" * len(part) +"\n\n" =20 msg +=3D f".. _{key}:\n\n" =20 @@ -546,7 +546,7 @@ class AbiParser: msg +=3D f"Defined on file :ref:`{base} <{ref[1]}>`\n\= n" =20 if wtype =3D=3D "File": - msg +=3D f"{names[0]}\n{"-" * len(names[0])}\n\n" + msg +=3D names[0] +"\n" + "-" * len(names[0]) +"\n\n" =20 desc =3D v.get("description") if not desc and wtype !=3D "File": @@ -570,7 +570,8 @@ class AbiParser: =20 users =3D v.get("users") if users and users.strip(" \t\n"): - msg +=3D f"Users:\n\t{users.strip("\n").replace('\n', '\n\= t')}\n\n" + users =3D users.strip("\n").replace('\n', '\n\t') + msg +=3D f"Users:\n\t{users}\n\n" =20 ln =3D v.get("line_no", 1) =20 @@ -596,7 +597,9 @@ class AbiParser: elif len(lines) =3D=3D 1: f.append(f"{fname}:{lines[0]}") else: - f.append(f"{fname} lines {", ".join(str(x) for x in li= nes)}") + m =3D fname + "lines " + m +=3D ", ".join(str(x) for x in lines) + f.append(m) =20 self.log.warning("%s is defined %d times: %s", what, len(f), "= ; ".join(f)) =20 @@ -644,10 +647,11 @@ class AbiParser: if users: print(f"Users:\t\t\t{users}") =20 - print(f"Defined on file{'s'[:len(files) ^ 1]}:\t{", ".= join(files)}") + print("Defined on file(s):\t" + ", ".join(files)) =20 if desc: - print(f"\n{desc.strip("\n")}\n") + desc =3D desc.strip("\n") + print(f"\n{desc}\n") =20 if not found_keys: print(f"Regular expression /{expr}/ not found.") --=20 2.48.1 From nobody Sun Dec 14 01:49:02 2025 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id DF781156678; Wed, 29 Jan 2025 16:09:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1738167000; cv=none; b=diUukx9sIr3pMEbnSrzgHpAyL9BPeJEtuX7Cr+PIuVL+DuYA/kCDvggcmimmZ/IXGGTQhfZOm3GlpwhwKxASgjpdjY7EKnPSbPmCcYzGUbGJAGTR+Cvh/B/v0+QgL3GBiqKdtfQWzhHNBg+dbJv1tgRvmTMLbSA1Zds7fEBqMp0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1738167000; c=relaxed/simple; bh=++AiKNwTafg/Tu0+drHLEGe7eiAgM2dK0o+PygwO6Zg=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=LySTZ2mh8J/Z+0i2SABG9QmtwLqhGDufWI653lPB7kNUkNgW4rVui33kT/G8eJQUw4X+cODluDhYO0gnRFewrTMwL6sng2/tPEjB1bLA+xMcoRCuwrePRBBRuizyBKsHT/ux7bmUpaK5gKEuV+j2tLJrK/PYu3gmbJJ5l/2+F5k= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=Y0Tke49c; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="Y0Tke49c" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6D79FC4CED1; Wed, 29 Jan 2025 16:09:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1738166999; bh=++AiKNwTafg/Tu0+drHLEGe7eiAgM2dK0o+PygwO6Zg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Y0Tke49cG/vCSdZhfqV54X6czvmVpLlobJ1Kal6aBMIeaE7NeVLSp6YsQivW8gRFG 6rptErsY0WKtUeDwAh2QnE02c9fzjca5Z/f4fdsumLj1nEzX3NbQw1/wqug/iaOMTj eleyG9TZiFaxX4+wX/u7rURtbuzmYtjuigYqMEoxPk0Gs7hrg+z4WIU9kJvKklhhas gq07+EBKZFW8zo0nDTnrTOV5jbAqB9yS39DMzXBhBe8MDRS6/vyyLW4GVTU5H5T1DV qP3kHlw8ehy3YX+jiba/34dmj6pk/27XWQ+SRPOGsg9b24umHrg4O7EyQmjbs5z6DM GnNfBhbC8EPhw== Received: from mchehab by mail.kernel.org with local (Exim 4.98) (envelope-from ) id 1tdAdZ-00000004PEO-1lRC; Wed, 29 Jan 2025 17:09:57 +0100 From: Mauro Carvalho Chehab To: Linux Doc Mailing List , "Jonathan Corbet" Cc: Mauro Carvalho Chehab , "Mauro Carvalho Chehab" , Akira Yokosawa , Vegard Nossum , linux-kernel@vger.kernel.org Subject: [RFC 2/6] docs: extensions: don't use utf-8 syntax for descriptions Date: Wed, 29 Jan 2025 17:09:33 +0100 Message-ID: X-Mailer: git-send-email 2.48.1 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: Mauro Carvalho Chehab Content-Type: text/plain; charset="utf-8" None of the descriptions at the Sphinx extensions are using non-ascii characters, so no need to place them under u""" notation. Also, according with: https://docs.python.org/3/deprecations/pending-removal-in-3.16.html the 'u' format code is scheduled to be removed in Python 3.16. So, let's just use """. Signed-off-by: Mauro Carvalho Chehab --- Documentation/sphinx/cdomain.py | 4 ++-- Documentation/sphinx/kernel_abi.py | 6 +++--- Documentation/sphinx/kernel_feat.py | 4 ++-- Documentation/sphinx/kernel_include.py | 4 ++-- Documentation/sphinx/kfigure.py | 10 +++++----- Documentation/sphinx/load_config.py | 2 +- Documentation/sphinx/maintainers_include.py | 4 ++-- Documentation/sphinx/rstFlatTable.py | 10 +++++----- 8 files changed, 22 insertions(+), 22 deletions(-) diff --git a/Documentation/sphinx/cdomain.py b/Documentation/sphinx/cdomain= .py index e6959af25402..6596fd00663f 100644 --- a/Documentation/sphinx/cdomain.py +++ b/Documentation/sphinx/cdomain.py @@ -1,6 +1,6 @@ # -*- coding: utf-8; mode: python -*- # pylint: disable=3DW0141,C0113,C0103,C0325 -u""" +""" cdomain ~~~~~~~ =20 @@ -145,7 +145,7 @@ class CObject(Base_CObject): } =20 def handle_func_like_macro(self, sig, signode): - u"""Handles signatures of function-like macros. + """Handles signatures of function-like macros. =20 If the objtype is 'function' and the signature ``sig`` is a function-like macro, the name of the macro is returned. Otherwise diff --git a/Documentation/sphinx/kernel_abi.py b/Documentation/sphinx/kern= el_abi.py index 379a877b75f9..9d45ad5d7b7e 100644 --- a/Documentation/sphinx/kernel_abi.py +++ b/Documentation/sphinx/kernel_abi.py @@ -2,7 +2,7 @@ # coding=3Dutf-8 # SPDX-License-Identifier: GPL-2.0 # -u""" +""" kernel-abi ~~~~~~~~~~ =20 @@ -55,7 +55,7 @@ path =3D os.path.join(srctree, "Documentation/ABI") _kernel_abi =3D None =20 def get_kernel_abi(): - u""" + """ Initialize kernel_abi global var, if not initialized yet. =20 This is needed to avoid warnings during Sphinx module initialization. @@ -81,7 +81,7 @@ def setup(app): =20 =20 class KernelCmd(Directive): - u"""KernelABI (``kernel-abi``) directive""" + """KernelABI (``kernel-abi``) directive""" =20 required_arguments =3D 1 optional_arguments =3D 3 diff --git a/Documentation/sphinx/kernel_feat.py b/Documentation/sphinx/ker= nel_feat.py index 03ace5f01b5c..e3a51867f27b 100644 --- a/Documentation/sphinx/kernel_feat.py +++ b/Documentation/sphinx/kernel_feat.py @@ -1,7 +1,7 @@ # coding=3Dutf-8 # SPDX-License-Identifier: GPL-2.0 # -u""" +""" kernel-feat ~~~~~~~~~~~ =20 @@ -56,7 +56,7 @@ def setup(app): =20 class KernelFeat(Directive): =20 - u"""KernelFeat (``kernel-feat``) directive""" + """KernelFeat (``kernel-feat``) directive""" =20 required_arguments =3D 1 optional_arguments =3D 2 diff --git a/Documentation/sphinx/kernel_include.py b/Documentation/sphinx/= kernel_include.py index 638762442336..8db176045bc5 100755 --- a/Documentation/sphinx/kernel_include.py +++ b/Documentation/sphinx/kernel_include.py @@ -2,7 +2,7 @@ # -*- coding: utf-8; mode: python -*- # pylint: disable=3DR0903, C0330, R0914, R0912, E0401 =20 -u""" +""" kernel-include ~~~~~~~~~~~~~~ =20 @@ -56,7 +56,7 @@ def setup(app): class KernelInclude(Include): # =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D =20 - u"""KernelInclude (``kernel-include``) directive""" + """KernelInclude (``kernel-include``) directive""" =20 def run(self): env =3D self.state.document.settings.env diff --git a/Documentation/sphinx/kfigure.py b/Documentation/sphinx/kfigure= .py index 383f9a695b08..f1a7f13c9c60 100644 --- a/Documentation/sphinx/kfigure.py +++ b/Documentation/sphinx/kfigure.py @@ -1,6 +1,6 @@ # -*- coding: utf-8; mode: python -*- # pylint: disable=3DC0103, R0903, R0912, R0915 -u""" +""" scalable figure and image handling ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ =20 @@ -165,7 +165,7 @@ def setup(app): =20 =20 def setupTools(app): - u""" + """ Check available build tools and log some *verbose* messages. =20 This function is called once, when the builder is initiated. @@ -445,7 +445,7 @@ class kernel_image(nodes.image): pass =20 class KernelImage(images.Image): - u"""KernelImage directive + """KernelImage directive =20 Earns everything from ``.. image::`` directive, except *remote URI* and *glob* pattern. The KernelImage wraps a image node into a @@ -481,7 +481,7 @@ class kernel_figure(nodes.figure): """Node for ``kernel-figure`` directive.""" =20 class KernelFigure(Figure): - u"""KernelImage directive + """KernelImage directive =20 Earns everything from ``.. figure::`` directive, except *remote URI* a= nd *glob* pattern. The KernelFigure wraps a figure node into a kernel_fi= gure @@ -557,7 +557,7 @@ class kernel_render(nodes.General, nodes.Inline, nodes.= Element): pass =20 class KernelRender(Figure): - u"""KernelRender directive + """KernelRender directive =20 Render content by external tool. Has all the options known from the *figure* directive, plus option ``caption``. If ``caption`` has a diff --git a/Documentation/sphinx/load_config.py b/Documentation/sphinx/loa= d_config.py index 8b416bfd75ac..ec50e1ee5223 100644 --- a/Documentation/sphinx/load_config.py +++ b/Documentation/sphinx/load_config.py @@ -9,7 +9,7 @@ from sphinx.util.osutil import fs_encoding def loadConfig(namespace): # ------------------------------------------------------------------------= ------ =20 - u"""Load an additional configuration file into *namespace*. + """Load an additional configuration file into *namespace*. =20 The name of the configuration file is taken from the environment ``SPHINX_CONF``. The external configuration file extends (or overwrite= s) the diff --git a/Documentation/sphinx/maintainers_include.py b/Documentation/sp= hinx/maintainers_include.py index dcad0fff4723..d31cff867436 100755 --- a/Documentation/sphinx/maintainers_include.py +++ b/Documentation/sphinx/maintainers_include.py @@ -3,7 +3,7 @@ # -*- coding: utf-8; mode: python -*- # pylint: disable=3DR0903, C0330, R0914, R0912, E0401 =20 -u""" +""" maintainers-include ~~~~~~~~~~~~~~~~~~~ =20 @@ -37,7 +37,7 @@ def setup(app): ) =20 class MaintainersInclude(Include): - u"""MaintainersInclude (``maintainers-include``) directive""" + """MaintainersInclude (``maintainers-include``) directive""" required_arguments =3D 0 =20 def parse_maintainers(self, path): diff --git a/Documentation/sphinx/rstFlatTable.py b/Documentation/sphinx/rs= tFlatTable.py index 16bea0632555..180fbb50c337 100755 --- a/Documentation/sphinx/rstFlatTable.py +++ b/Documentation/sphinx/rstFlatTable.py @@ -2,7 +2,7 @@ # -*- coding: utf-8; mode: python -*- # pylint: disable=3DC0330, R0903, R0912 =20 -u""" +""" flat-table ~~~~~~~~~~ =20 @@ -99,7 +99,7 @@ class colSpan(nodes.General, nodes.Element): pass # pylin= t: disable=3DC0103,C0321 class FlatTable(Table): # =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D =20 - u"""FlatTable (``flat-table``) directive""" + """FlatTable (``flat-table``) directive""" =20 option_spec =3D { 'name': directives.unchanged @@ -135,7 +135,7 @@ class FlatTable(Table): class ListTableBuilder(object): # =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D =20 - u"""Builds a table from a double-stage list""" + """Builds a table from a double-stage list""" =20 def __init__(self, directive): self.directive =3D directive @@ -212,7 +212,7 @@ class ListTableBuilder(object): raise SystemMessagePropagation(error) =20 def parseFlatTableNode(self, node): - u"""parses the node from a :py:class:`FlatTable` directive's body"= "" + """parses the node from a :py:class:`FlatTable` directive's body""" =20 if len(node) !=3D 1 or not isinstance(node[0], nodes.bullet_list): self.raiseError( @@ -225,7 +225,7 @@ class ListTableBuilder(object): self.roundOffTableDefinition() =20 def roundOffTableDefinition(self): - u"""Round off the table definition. + """Round off the table definition. =20 This method rounds off the table definition in :py:member:`rows`. =20 --=20 2.48.1 From nobody Sun Dec 14 01:49:02 2025 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id DFA811DEFD6; Wed, 29 Jan 2025 16:09:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1738167000; cv=none; b=DEH9GVp2sQGNjoVaOPYpqpyqorcEXfx9LN2sEPEei9IwxiWiVNE8EIRiHqqmEy6U1mDdu3haMSqq7bAmM1sP8m5Tw36Xslab6du+m/VgQW0uBnl/KlHVwnmMWrOARewl4yfsEAiyHAs1TVR9/Xpn6G6TZiFCRaDFB2UYsqx5jwE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1738167000; c=relaxed/simple; bh=GrjMjuoBldG0YBxJhhKh6xKhPGHktjhoxv5+WyCxFXo=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=qUPYHwJDTItBqgmV90vDbQ17XuOl032F2S2pGxPlu0iI3bpzDqfgqV58ssNA/WZVOSFJhQGLH4SMukxvtvAmWbwf6JBPy7HKmYBfZNReO8TU6umdYDSdIaYj2qAQDvW2TlFF4I4EADncoYjpc/iMRq3irg8kbE/7FKzY5H+xwhQ= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=mjA+ZtGu; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="mjA+ZtGu" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6F304C4CED3; Wed, 29 Jan 2025 16:09:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1738166999; bh=GrjMjuoBldG0YBxJhhKh6xKhPGHktjhoxv5+WyCxFXo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=mjA+ZtGuPSLlwIHm4vTZ+NmhNhpJczu8vHLjr81KsC6KbUTkU2MufBJSbj7UnTNra vnh2EPuqWhrNW0EK/RR2vd0Wr/QulxBN7slt5FQ7PvnfZ1dXluSpW2cf1thwRp6eg6 JrjX9no43DYnznHQXiOAQ6tkegAYQ608a3oj1OwWc6GoqbIuhFLZADtaXP52EeS2WT D5IEwIGMZa7TYT53PsfKt8sjr9I2OdPSLVhHZfMN+pnsHmBaLK8wyIQ40KEm41r6q1 aYUmHCzYRn5awHfXt5PcyDXXF98YaB/ROSKr9ZUCf7dAex0sdOpzWAf4lf10Lo9bvV 22ARUVsehJrrg== Received: from mchehab by mail.kernel.org with local (Exim 4.98) (envelope-from ) id 1tdAdZ-00000004PES-1sJO; Wed, 29 Jan 2025 17:09:57 +0100 From: Mauro Carvalho Chehab To: Linux Doc Mailing List , "Jonathan Corbet" Cc: Mauro Carvalho Chehab , "Mauro Carvalho Chehab" , linux-kernel@vger.kernel.org Subject: [RFC 3/6] docs: automarkup: drop legacy support Date: Wed, 29 Jan 2025 17:09:34 +0100 Message-ID: <748e0f011eb9be114737851094ad3a3406412244.1738166451.git.mchehab+huawei@kernel.org> X-Mailer: git-send-email 2.48.1 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: Mauro Carvalho Chehab Content-Type: text/plain; charset="utf-8" Python 2 is already EOL for quite some time. Drop support for it. Also, the minimal Sphinx version is now 3.4.3. So, we can drop support for Sphinx < 3. Signed-off-by: Mauro Carvalho Chehab --- Documentation/sphinx/automarkup.py | 32 +++++++----------------------- 1 file changed, 7 insertions(+), 25 deletions(-) diff --git a/Documentation/sphinx/automarkup.py b/Documentation/sphinx/auto= markup.py index 03bb7020f5cb..ecf54d22e9dc 100644 --- a/Documentation/sphinx/automarkup.py +++ b/Documentation/sphinx/automarkup.py @@ -13,14 +13,6 @@ from itertools import chain =20 from kernel_abi import get_kernel_abi =20 -# -# Python 2 lacks re.ASCII... -# -try: - ascii_p3 =3D re.ASCII -except AttributeError: - ascii_p3 =3D 0 - # # Regex nastiness. Of course. # Try to identify "function()" that's not already marked up some @@ -28,22 +20,22 @@ except AttributeError: # :c:func: block (i.e. ":c:func:`mmap()`s" flakes out), so the last # bit tries to restrict matches to things that won't create trouble. # -RE_function =3D re.compile(r'\b(([a-zA-Z_]\w+)\(\))', flags=3Dascii_p3) +RE_function =3D re.compile(r'\b(([a-zA-Z_]\w+)\(\))', flags=3Dre.ASCII) =20 # # Sphinx 2 uses the same :c:type role for struct, union, enum and typedef # RE_generic_type =3D re.compile(r'\b(struct|union|enum|typedef)\s+([a-zA-Z_= ]\w+)', - flags=3Dascii_p3) + flags=3Dre.ASCII) =20 # # Sphinx 3 uses a different C role for each one of struct, union, enum and # typedef # -RE_struct =3D re.compile(r'\b(struct)\s+([a-zA-Z_]\w+)', flags=3Dascii_p3) -RE_union =3D re.compile(r'\b(union)\s+([a-zA-Z_]\w+)', flags=3Dascii_p3) -RE_enum =3D re.compile(r'\b(enum)\s+([a-zA-Z_]\w+)', flags=3Dascii_p3) -RE_typedef =3D re.compile(r'\b(typedef)\s+([a-zA-Z_]\w+)', flags=3Dascii_p= 3) +RE_struct =3D re.compile(r'\b(struct)\s+([a-zA-Z_]\w+)', flags=3Dre.ASCII) +RE_union =3D re.compile(r'\b(union)\s+([a-zA-Z_]\w+)', flags=3Dre.ASCII) +RE_enum =3D re.compile(r'\b(enum)\s+([a-zA-Z_]\w+)', flags=3Dre.ASCII) +RE_typedef =3D re.compile(r'\b(typedef)\s+([a-zA-Z_]\w+)', flags=3Dre.ASCI= I) =20 # # Detects a reference to a documentation page of the form Documentation/..= . with @@ -87,13 +79,8 @@ def markup_refs(docname, app, node): # # Associate each regex with the function that will markup its matches # - markup_func_sphinx2 =3D {RE_doc: markup_doc_ref, - RE_abi_file: markup_abi_file_ref, - RE_abi_symbol: markup_abi_ref, - RE_function: markup_c_ref, - RE_generic_type: markup_c_ref} =20 - markup_func_sphinx3 =3D {RE_doc: markup_doc_ref, + markup_func =3D {RE_doc: markup_doc_ref, RE_abi_file: markup_abi_file_ref, RE_abi_symbol: markup_abi_ref, RE_function: markup_func_ref_sphinx3, @@ -103,11 +90,6 @@ def markup_refs(docname, app, node): RE_typedef: markup_c_ref, RE_git: markup_git} =20 - if sphinx.version_info[0] >=3D 3: - markup_func =3D markup_func_sphinx3 - else: - markup_func =3D markup_func_sphinx2 - match_iterators =3D [regex.finditer(t) for regex in markup_func] # # Sort all references by the starting position in text --=20 2.48.1 From nobody Sun Dec 14 01:49:02 2025 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6BDF01DF749; Wed, 29 Jan 2025 16:10:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1738167000; cv=none; b=gMnj1QTeO/K/rXWP2oJEUDNlveggC7ODZWddipSzHz1hZx4IiL1kMRgq7M5M2vvFTeWyiSH7uEDHhITIVTI+qogBYUY2rlHkDWQgcjFgcPb72xaudATTVwYSWpgvT6XmV7NxERR4D5EVSbd8U/IEg9S6546DMWN5TOeJ4eOJbcM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1738167000; c=relaxed/simple; bh=JR+LoyWBONX0t+AvCP4BfO6EcwJt+jCG4HP5PgBpHDE=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=CTdy/ROZykJ3+bTgpe2r+hfcj7VgSutbVnksszMkMWGvQ8qXo/ZZbiFGhUkojYxhvCZYGRfGnPTkYzGWhLhltFlx8YkSQHFztxtkQwUpcqMcjLCxSGNGbxA5f0VaObiOaCPs+tVfKaLPDEzdxV8skfATUOmb10ckPr4qg/dUgS8= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=l9cZqgMj; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="l9cZqgMj" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6F4E1C4AF09; Wed, 29 Jan 2025 16:09:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1738166999; bh=JR+LoyWBONX0t+AvCP4BfO6EcwJt+jCG4HP5PgBpHDE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=l9cZqgMjUvaZpPlH8lTzAZvTP+z9CAciq4DnspSLcwW2QEUz0DekMpmPrIAXbtW5d O6HtYqtnuXlmLMOnpdGgTHqkRiVEkdXVS4vNmdkrOr7m+DUx2IY/Xpe5gjn1CvTjod hC3yj3LJSvVb/eQs84eXbPGDSxYXsm2lphv6CeLT+1R51wMKHQttfDr5ymPiVfR7VI IDF3jrs0pNGUQa0F42GJ65BoyIUpxASqDDZ7W3f/o0cjokqD3btp9ADYxEcTQKkOvD mcD/fF8GwLFCMwfab5sY0u47/8W7U1jc9Mf9RFGL33Kui8bSgP8aw2gwgGemF4jB+P EDZ8lcUzJvckg== Received: from mchehab by mail.kernel.org with local (Exim 4.98) (envelope-from ) id 1tdAdZ-00000004PEW-1zNR; Wed, 29 Jan 2025 17:09:57 +0100 From: Mauro Carvalho Chehab To: Linux Doc Mailing List , "Jonathan Corbet" Cc: Mauro Carvalho Chehab , "Mauro Carvalho Chehab" , Randy Dunlap , Vegard Nossum , linux-kernel@vger.kernel.org Subject: [RFC 4/6] scripts/kernel-doc: drop Sphinx version check Date: Wed, 29 Jan 2025 17:09:35 +0100 Message-ID: <622e92a09daa6b4ecfa124c6c4232c1d970c3abe.1738166451.git.mchehab+huawei@kernel.org> X-Mailer: git-send-email 2.48.1 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: Mauro Carvalho Chehab Content-Type: text/plain; charset="utf-8" As the current minimal supported Sphinx version is 3.4.3, drop support for older versions. Signed-off-by: Mauro Carvalho Chehab --- Documentation/sphinx/cdomain.py | 3 - Documentation/sphinx/kerneldoc.py | 5 -- scripts/kernel-doc | 129 ++++-------------------------- 3 files changed, 16 insertions(+), 121 deletions(-) diff --git a/Documentation/sphinx/cdomain.py b/Documentation/sphinx/cdomain= .py index 6596fd00663f..e8ea80d4324c 100644 --- a/Documentation/sphinx/cdomain.py +++ b/Documentation/sphinx/cdomain.py @@ -45,9 +45,6 @@ import re =20 __version__ =3D '1.1' =20 -# Get Sphinx version -major, minor, patch =3D sphinx.version_info[:3] - # Namespace to be prepended to the full name namespace =3D None =20 diff --git a/Documentation/sphinx/kerneldoc.py b/Documentation/sphinx/kerne= ldoc.py index be5b8fbf373f..39ddae6ae7dd 100644 --- a/Documentation/sphinx/kerneldoc.py +++ b/Documentation/sphinx/kerneldoc.py @@ -62,11 +62,6 @@ class KernelDocDirective(Directive): env =3D self.state.document.settings.env cmd =3D [env.config.kerneldoc_bin, '-rst', '-enable-lineno'] =20 - # Pass the version string to kernel-doc, as it needs to use a diff= erent - # dialect, depending what the C domain supports for each specific - # Sphinx versions - cmd +=3D ['-sphinx-version', sphinx.__version__] - filename =3D env.config.kerneldoc_srctree + '/' + self.arguments[0] export_file_patterns =3D [] =20 diff --git a/scripts/kernel-doc b/scripts/kernel-doc index 4ee843d3600e..84242c117ab9 100755 --- a/scripts/kernel-doc +++ b/scripts/kernel-doc @@ -26,7 +26,7 @@ kernel-doc - Print formatted kernel documentation to stdo= ut =20 kernel-doc [-h] [-v] [-Werror] [-Wall] [-Wreturn] [-Wshort-desc[ription]]= [-Wcontents-before-sections] [ -man | - -rst [-sphinx-version VERSION] [-enable-lineno] | + -rst [-enable-lineno] | -none ] [ @@ -130,7 +130,6 @@ if ($#ARGV =3D=3D -1) { } =20 my $kernelversion; -my ($sphinx_major, $sphinx_minor, $sphinx_patch); =20 my $dohighlight =3D ""; =20 @@ -347,23 +346,6 @@ while ($ARGV[0] =3D~ m/^--?(.*)/) { $enable_lineno =3D 1; } elsif ($cmd eq 'show-not-found') { $show_not_found =3D 1; # A no-op but don't fail - } elsif ($cmd eq "sphinx-version") { - my $ver_string =3D shift @ARGV; - if ($ver_string =3D~ m/^(\d+)(\.\d+)?(\.\d+)?/) { - $sphinx_major =3D $1; - if (defined($2)) { - $sphinx_minor =3D substr($2,1); - } else { - $sphinx_minor =3D 0; - } - if (defined($3)) { - $sphinx_patch =3D substr($3,1) - } else { - $sphinx_patch =3D 0; - } - } else { - die "Sphinx version should either major.minor or major.minor.p= atch format\n"; - } } else { # Unknown argument pod2usage( @@ -387,8 +369,6 @@ while ($ARGV[0] =3D~ m/^--?(.*)/) { =20 # continue execution near EOF; =20 -# The C domain dialect changed on Sphinx 3. So, we need to check the -# version in order to produce the right tags. sub findprog($) { foreach(split(/:/, $ENV{PATH})) { @@ -396,42 +376,6 @@ sub findprog($) } } =20 -sub get_sphinx_version() -{ - my $ver; - - my $cmd =3D "sphinx-build"; - if (!findprog($cmd)) { - my $cmd =3D "sphinx-build3"; - if (!findprog($cmd)) { - $sphinx_major =3D 1; - $sphinx_minor =3D 2; - $sphinx_patch =3D 0; - printf STDERR "Warning: Sphinx version not found. Using defaul= t (Sphinx version %d.%d.%d)\n", - $sphinx_major, $sphinx_minor, $sphinx_patch; - return; - } - } - - open IN, "$cmd --version 2>&1 |"; - while () { - if (m/^\s*sphinx-build\s+([\d]+)\.([\d\.]+)(\+\/[\da-f]+)?$/) { - $sphinx_major =3D $1; - $sphinx_minor =3D $2; - $sphinx_patch =3D $3; - last; - } - # Sphinx 1.2.x uses a different format - if (m/^\s*Sphinx.*\s+([\d]+)\.([\d\.]+)$/) { - $sphinx_major =3D $1; - $sphinx_minor =3D $2; - $sphinx_patch =3D $3; - last; - } - } - close IN; -} - # get kernel version from env sub get_kernel_version() { my $version =3D 'unknown kernel version'; @@ -859,9 +803,10 @@ sub output_function_rst(%) { $signature .=3D ")"; } =20 - if ($sphinx_major < 3) { + if ($args{'typedef'} || $args{'functiontype'} eq "") { + print ".. c:macro:: ". $args{'function'} . "\n\n"; + if ($args{'typedef'}) { - print ".. c:type:: ". $args{'function'} . "\n\n"; print_lineno($declaration_start_line); print " **Typedef**: "; $lineprefix =3D ""; @@ -869,25 +814,10 @@ sub output_function_rst(%) { print "\n\n**Syntax**\n\n"; print " ``$signature``\n\n"; } else { - print ".. c:function:: $signature\n\n"; + print "``$signature``\n\n"; } } else { - if ($args{'typedef'} || $args{'functiontype'} eq "") { - print ".. c:macro:: ". $args{'function'} . "\n\n"; - - if ($args{'typedef'}) { - print_lineno($declaration_start_line); - print " **Typedef**: "; - $lineprefix =3D ""; - output_highlight_rst($args{'purpose'}); - print "\n\n**Syntax**\n\n"; - print " ``$signature``\n\n"; - } else { - print "``$signature``\n\n"; - } - } else { - print ".. c:function:: $signature\n\n"; - } + print ".. c:function:: $signature\n\n"; } =20 if (!$args{'typedef'}) { @@ -955,13 +885,9 @@ sub output_enum_rst(%) { my $count; my $outer; =20 - if ($sphinx_major < 3) { - my $name =3D "enum " . $args{'enum'}; - print "\n\n.. c:type:: " . $name . "\n\n"; - } else { - my $name =3D $args{'enum'}; - print "\n\n.. c:enum:: " . $name . "\n\n"; - } + my $name =3D $args{'enum'}; + print "\n\n.. c:enum:: " . $name . "\n\n"; + print_lineno($declaration_start_line); $lineprefix =3D " "; output_highlight_rst($args{'purpose'}); @@ -992,11 +918,8 @@ sub output_typedef_rst(%) { my $oldprefix =3D $lineprefix; my $name; =20 - if ($sphinx_major < 3) { - $name =3D "typedef " . $args{'typedef'}; - } else { - $name =3D $args{'typedef'}; - } + $name =3D $args{'typedef'}; + print "\n\n.. c:type:: " . $name . "\n\n"; print_lineno($declaration_start_line); $lineprefix =3D " "; @@ -1012,17 +935,13 @@ sub output_struct_rst(%) { my ($parameter); my $oldprefix =3D $lineprefix; =20 - if ($sphinx_major < 3) { - my $name =3D $args{'type'} . " " . $args{'struct'}; - print "\n\n.. c:type:: " . $name . "\n\n"; + my $name =3D $args{'struct'}; + if ($args{'type'} eq 'union') { + print "\n\n.. c:union:: " . $name . "\n\n"; } else { - my $name =3D $args{'struct'}; - if ($args{'type'} eq 'union') { - print "\n\n.. c:union:: " . $name . "\n\n"; - } else { - print "\n\n.. c:struct:: " . $name . "\n\n"; - } + print "\n\n.. c:struct:: " . $name . "\n\n"; } + print_lineno($declaration_start_line); $lineprefix =3D " "; output_highlight_rst($args{'purpose'}); @@ -2387,11 +2306,6 @@ sub process_file($) { close IN_FILE; } =20 - -if ($output_mode eq "rst") { - get_sphinx_version() if (!$sphinx_major); -} - $kernelversion =3D get_kernel_version(); =20 # generate a sequence of code that will splice in highlighting information @@ -2471,17 +2385,6 @@ Do not output documentation, only warnings. =20 =3Dhead3 reStructuredText only =20 -=3Dover 8 - -=3Ditem -sphinx-version VERSION - -Use the ReST C domain dialect compatible with a specific Sphinx Version. - -If not specified, kernel-doc will auto-detect using the sphinx-build versi= on -found on PATH. - -=3Dback - =3Dhead2 Output selection (mutually exclusive): =20 =3Dover 8 --=20 2.48.1 From nobody Sun Dec 14 01:49:02 2025 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id DFB7B1DEFE3; Wed, 29 Jan 2025 16:09:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1738167000; cv=none; b=nbaecTZQ0aId2wgb2rZL5oYYGOkS4b5834K+gRoNTQ9STatcCttUBRYZ4kPUo5kTv3rZZ5Bh+INPJz1igWe8/Kn8o+DQsJ3DAPGbqqMU7GbQdvmvLWZm3EzKZgsSSx06za/cHF3gmY1nAtlD4am+OoCsYXA8Q0Yl5nx9PcuKrvc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1738167000; c=relaxed/simple; bh=srHijyQOosizcjglctE3PuWbAhpV+PjxpF0lhRZID9Q=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=WeLAV9XWoLuT2nTtAB1zA4pD+vXILnZne8Ee1upRvjSMrBNaxolXpfvWgnakH98kpNqCtimeHGKzdOyqedPi4vZmIiIqLGBPShh5rQA/VTtVBlbCZzaSeyxMTojmgWKz/XH3GMjcUUvyOSYvQF9QDzcAB5/PTAj1gro+42yH8Lw= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=JpXDgiA+; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="JpXDgiA+" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7C2D0C4AF0B; Wed, 29 Jan 2025 16:09:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1738166999; bh=srHijyQOosizcjglctE3PuWbAhpV+PjxpF0lhRZID9Q=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=JpXDgiA+T8LR2BKVRZW2oMMY4WtYjN76lw64PNv5n4QmvKlV7HLwsRdHfJCDGJQKc 0NGi5dBMFcXpvCVwekXycs/FhSiW6/f47N6ucXjcrIBdWPr6kYEtxO5vwzTWMIld5W E3GiX5NTuiE1wPKDbd1K9HNNnCTRK3le7C/J54WEN6YrnnH4wCkc6YCStA1SmLWsPR LTqo8KbADxOipWMdIB98i5R6etlzvSKTLesDZN2fs846lAQRZRkeFey8SUuEbISiDe CdxBt6huuwAlvqqrQU6NVLiWFXNtAjqAWHr4L4M7yIM6AOIjEw0bn/CCWYkZ/+SIOX 5m9q5Uc63s3DA== Received: from mchehab by mail.kernel.org with local (Exim 4.98) (envelope-from ) id 1tdAdZ-00000004PEa-26En; Wed, 29 Jan 2025 17:09:57 +0100 From: Mauro Carvalho Chehab To: Linux Doc Mailing List , "Jonathan Corbet" Cc: Mauro Carvalho Chehab , "Mauro Carvalho Chehab" , linux-kernel@vger.kernel.org, workflows@vger.kernel.org Subject: [RFC 5/6] docs: changes: update Sphinx minimal version to 3.4.3 Date: Wed, 29 Jan 2025 17:09:36 +0100 Message-ID: <0285c3815208649148b32b3842e1c18975ef5c71.1738166451.git.mchehab+huawei@kernel.org> X-Mailer: git-send-email 2.48.1 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: Mauro Carvalho Chehab Content-Type: text/plain; charset="utf-8" Doing that allows us to get rid of all backward-compatible code. Signed-off-by: Mauro Carvalho Chehab --- Documentation/conf.py | 2 +- Documentation/process/changes.rst | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Documentation/conf.py b/Documentation/conf.py index 0c2205d536b3..3dad1f90b098 100644 --- a/Documentation/conf.py +++ b/Documentation/conf.py @@ -47,7 +47,7 @@ from load_config import loadConfig # -- General configuration ------------------------------------------------ =20 # If your documentation needs a minimal Sphinx version, state it here. -needs_sphinx =3D '2.4.4' +needs_sphinx =3D '3.4.3' =20 # Add any Sphinx extension module names here, as strings. They can be # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom diff --git a/Documentation/process/changes.rst b/Documentation/process/chan= ges.rst index 82b5e378eebf..012d2b715c2a 100644 --- a/Documentation/process/changes.rst +++ b/Documentation/process/changes.rst @@ -58,7 +58,7 @@ 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 cpio any cpio --version GNU tar 1.28 tar --version gtags (optional) 6.6.5 gtags --version --=20 2.48.1 From nobody Sun Dec 14 01:49:02 2025 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6BE821DF74C; Wed, 29 Jan 2025 16:10:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1738167000; cv=none; b=L8AkgjwvbrCivGw58sC4yRGtbnT0FtMDsHvITx//GjpjCSS9T8PbH+RZuDFYOAJSx18b+YfQunD+b/iJGnyC8O76kcCTINwqcBSFeCfDUw1bq5v04OhVq3/J2HhImc+QO2xvvX0h1NHhZoIvEuBRuA2k8FFNIQ1oCaOYHvQkeuU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1738167000; c=relaxed/simple; bh=XNbr+IccoK+0jjezkRlZo49SoJU9y1tjRGSuQ5BcT58=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=tguA6zFl60woCmKPNbRUwjkC4CdNDkRAHw5RDG+mNEeXYzX12IPZ6RMQKfZ4iVlg7fbqTSyGKVo+kKFvxppxfdc/5zjbWvHoAuFZWInjXRVCzY6VQe9fmECcn5dQvO9dZhNCn5IRsyC29hPxCMr3hAs2larkCYro7jvwyImS2OA= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=O38Wu9sW; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="O38Wu9sW" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 75AA6C4CEE1; Wed, 29 Jan 2025 16:09:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1738166999; bh=XNbr+IccoK+0jjezkRlZo49SoJU9y1tjRGSuQ5BcT58=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=O38Wu9sWgOem2OCQrpLhWjALZEquajhJhEE33mhMhF7IbPpPMKdcGyVt5HVN76JLD 6og7IerKvpKVTFw8+Rw3SMgNWgf9HiURCHuqwsSsDgY/UrOp9X7v0f3NCqmZfc1USD iVcCFSXKta37Ta9VDAWP4DTEBrOwP2UNAN50XbUFhfWXkVmyeuwM8ZmdJHQ+mRn0+m 637Kokt/XnwNfO0gDJ39N+0xNUXyzlNeS2Q1Mw0fjb/HDenFkUgC7ajWZZ+1GnLc5F YnN72yZ6gUZkF0GBpgefUbYNNA3z4gED/ToEd3UzYa6NE07nYXUMgXLXIQOHX745Y6 5J8abAxEt55FA== Received: from mchehab by mail.kernel.org with local (Exim 4.98) (envelope-from ) id 1tdAdZ-00000004PEe-2DV3; Wed, 29 Jan 2025 17:09:57 +0100 From: Mauro Carvalho Chehab To: Linux Doc Mailing List , "Jonathan Corbet" Cc: Mauro Carvalho Chehab , "Mauro Carvalho Chehab" , Bill Wendling , Justin Stitt , Nathan Chancellor , Nick Desaulniers , bpf@vger.kernel.org, linux-kernel@vger.kernel.org, llvm@lists.linux.dev, workflows@vger.kernel.org Subject: [RFC 6/6] doc: changes: update Python minimal version Date: Wed, 29 Jan 2025 17:09:37 +0100 Message-ID: X-Mailer: git-send-email 2.48.1 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: Mauro Carvalho Chehab Content-Type: text/plain; charset="utf-8" The current minimal version doesn't match what we have currently at the Kernel: $ vermin -v $(git ls-files *.py) ... Minimum required versions: 3.10 Incompatible versions: 2 Those are the Python scripts requiring versions higher than current minimal= (3.5): !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/power/cpupower/bindings/python/test_raw_pylibcpu= power.py !2, 3.9 tools/testing/selftests/net/rds/test.py !2, 3.9 tools/net/ynl/ethtool.py !2, 3.9 tools/net/ynl/cli.py !2, 3.9 scripts/checktransupdate.py !2, 3.8 tools/testing/selftests/tc-testing/plugin-lib/nsPlugin= .py !2, 3.8 tools/testing/selftests/hid/tests/base.py !2, 3.7 tools/testing/selftests/turbostat/smi_aperf_mperf.py !2, 3.7 tools/testing/selftests/turbostat/defcolumns.py !2, 3.7 tools/testing/selftests/turbostat/added_perf_counters.= py !2, 3.7 tools/testing/selftests/hid/tests/conftest.py !2, 3.7 tools/testing/kunit/qemu_config.py !2, 3.7 tools/testing/kunit/kunit_tool_test.py !2, 3.7 tools/testing/kunit/kunit.py !2, 3.7 tools/testing/kunit/kunit_parser.py !2, 3.7 tools/testing/kunit/kunit_kernel.py !2, 3.7 tools/testing/kunit/kunit_json.py !2, 3.7 tools/testing/kunit/kunit_config.py !2, 3.7 tools/perf/scripts/python/gecko.py !2, 3.7 scripts/rust_is_available_test.py !2, 3.7 scripts/bpf_doc.py !2, 3.6 tools/writeback/wb_monitor.py !2, 3.6 tools/workqueue/wq_monitor.py !2, 3.6 tools/workqueue/wq_dump.py !2, 3.6 tools/usb/p9_fwd.py !2, 3.6 tools/tracing/rtla/sample/timerlat_load.py !2, 3.6 tools/testing/selftests/net/openvswitch/ovs-dpctl.py !2, 3.6 tools/testing/selftests/net/nl_netdev.py !2, 3.6 tools/testing/selftests/net/lib/py/ynl.py !2, 3.6 tools/testing/selftests/net/lib/py/utils.py !2, 3.6 tools/testing/selftests/net/lib/py/nsim.py !2, 3.6 tools/testing/selftests/net/lib/py/netns.py !2, 3.6 tools/testing/selftests/net/lib/py/ksft.py !2, 3.6 tools/testing/selftests/kselftest/ksft.py !2, 3.6 tools/testing/selftests/hid/tests/test_tablet.py !2, 3.6 tools/testing/selftests/hid/tests/test_sony.py !2, 3.6 tools/testing/selftests/hid/tests/test_multitouch.py !2, 3.6 tools/testing/selftests/hid/tests/test_mouse.py !2, 3.6 tools/testing/selftests/hid/tests/base_gamepad.py !2, 3.6 tools/testing/selftests/hid/tests/base_device.py !2, 3.6 tools/testing/selftests/drivers/net/stats.py !2, 3.6 tools/testing/selftests/drivers/net/shaper.py !2, 3.6 tools/testing/selftests/drivers/net/queues.py !2, 3.6 tools/testing/selftests/drivers/net/ping.py !2, 3.6 tools/testing/selftests/drivers/net/lib/py/remote_ssh.= py !2, 3.6 tools/testing/selftests/drivers/net/lib/py/load.py !2, 3.6 tools/testing/selftests/drivers/net/lib/py/__init__.py !2, 3.6 tools/testing/selftests/drivers/net/lib/py/env.py !2, 3.6 tools/testing/selftests/drivers/net/hw/rss_ctx.py !2, 3.6 tools/testing/selftests/drivers/net/hw/pp_alloc_fail.py !2, 3.6 tools/testing/selftests/drivers/net/hw/nic_performance= .py !2, 3.6 tools/testing/selftests/drivers/net/hw/nic_link_layer.= py !2, 3.6 tools/testing/selftests/drivers/net/hw/lib/py/linkconf= ig.py !2, 3.6 tools/testing/selftests/drivers/net/hw/lib/py/__init__= .py !2, 3.6 tools/testing/selftests/drivers/net/hw/devmem.py !2, 3.6 tools/testing/selftests/drivers/net/hw/devlink_port_sp= lit.py !2, 3.6 tools/testing/selftests/drivers/net/hw/csum.py !2, 3.6 tools/testing/selftests/devices/probe/test_discoverabl= e_devices.py !2, 3.6 tools/testing/selftests/bpf/test_bpftool_synctypes.py !2, 3.6 tools/testing/selftests/bpf/generate_udp_fragments.py !2, 3.6 tools/testing/kunit/run_checks.py !2, 3.6 tools/testing/kunit/kunit_printer.py !2, 3.6 tools/sched_ext/scx_show_state.py !2, 3.6 tools/perf/tests/shell/lib/perf_metric_validation.py !2, 3.6 tools/perf/tests/shell/lib/perf_json_output_lint.py !2, 3.6 tools/perf/scripts/python/parallel-perf.py !2, 3.6 tools/perf/scripts/python/flamegraph.py !2, 3.6 tools/perf/scripts/python/arm-cs-trace-disasm.py !2, 3.6 tools/perf/pmu-events/models.py !2, 3.6 tools/perf/pmu-events/metric_test.py !2, 3.6 tools/perf/pmu-events/metric.py !2, 3.6 tools/perf/pmu-events/jevents.py !2, 3.6 tools/net/ynl/ynl-gen-rst.py !2, 3.6 tools/net/ynl/ynl-gen-c.py !2, 3.6 tools/net/ynl/lib/ynl.py !2, 3.6 tools/net/ynl/lib/nlspec.py !2, 3.6 tools/crypto/tcrypt/tcrypt_speed_compare.py !2, 3.6 tools/cgroup/iocost_monitor.py !2, 3.6 tools/cgroup/iocost_coef_gen.py !2, 3.6 scripts/make_fit.py !2, 3.6 scripts/macro_checker.py !2, 3.6 scripts/get_abi.py !2, 3.6 scripts/generate_rust_analyzer.py !2, 3.6 scripts/gdb/linux/timerlist.py !2, 3.6 scripts/gdb/linux/pgtable.py !2, 3.6 scripts/clang-tools/run-clang-tools.py !2, 3.6 Documentation/sphinx/automarkup.py Even if we exclude tools/net/sunrpc/xdrgen/, the minimal version is Python 3.9. Update process/changes to reflect the current minimal version required to run Python scripts outside tools. Signed-off-by: Mauro Carvalho Chehab --- Documentation/process/changes.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Documentation/process/changes.rst b/Documentation/process/chan= ges.rst index 012d2b715c2a..e12aa044e09a 100644 --- a/Documentation/process/changes.rst +++ b/Documentation/process/changes.rst @@ -63,7 +63,7 @@ cpio any cpio --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 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D =20 --=20 2.48.1