lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <87ikjyx3k8.fsf@trenco.lwn.net>
Date: Fri, 11 Jul 2025 07:25:11 -0600
From: Jonathan Corbet <corbet@....net>
To: Mauro Carvalho Chehab <mchehab+huawei@...nel.org>, Linux Doc Mailing
 List <linux-doc@...r.kernel.org>
Cc: Mauro Carvalho Chehab <mchehab+huawei@...nel.org>, Akira Yokosawa
 <akiyks@...il.com>, Mauro Carvalho Chehab <mchehab+huawei@...nel.org>,
 linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/2] docs: kernel-doc: emit warnings for ancient
 versions of Python

Mauro Carvalho Chehab <mchehab+huawei@...nel.org> writes:

> Kernel-doc requires at least version 3.6 to run, as it uses f-string.
> Yet, Kernel build currently calls kernel-doc with -none on some places.
> Better not to bail out when older versions are found.
>
> Versions of Python prior to 3.7 do not guarantee to remember the insertion
> order of dicts; since kernel-doc depends on that guarantee, running with
> such older versions could result in output with reordered sections.
>
> Check Python version when called via command line.
>
> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@...nel.org>
> ---
>  scripts/kernel-doc.py | 10 ++++++++++
>  1 file changed, 10 insertions(+)
>
> diff --git a/scripts/kernel-doc.py b/scripts/kernel-doc.py
> index 12ae66f40bd7..fc3d46ef519f 100755
> --- a/scripts/kernel-doc.py
> +++ b/scripts/kernel-doc.py
> @@ -271,6 +271,16 @@ def main():
>  
>      logger.addHandler(handler)
>  
> +    python_ver = sys.version_info[:2]
> +    if python_ver < (3,6):
> +        logger.warning("Python 3.6 or later is required by kernel-doc")

Does this really work on truly old Python versions?  I don't have an
easy way to try it, but I would expect things to fail with a syntax
error (due to the f-strings) at the import stage...?

Thanks,

jon

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ