docs: kernel-doc: emit warnings for ancient versions of Python
authorMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Fri, 11 Jul 2025 07:27:08 +0000 (09:27 +0200)
committerJonathan Corbet <corbet@lwn.net>
Thu, 17 Jul 2025 21:29:53 +0000 (15:29 -0600)
commit7740f9dbe2a96f6e7eb138dbdcb414aa78e83c10
tree6ee1d4d644b30ae3ae1ae1eaafa8fa8986fb2023
parent2d48d3e483f5d71a9579b0f0468d27e34e1f2a4d
docs: kernel-doc: emit warnings for ancient versions of Python

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@kernel.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Link: https://lore.kernel.org/r/7d7fa3a3aa1fafa0cc9ea29c889de4c7d377dca6.1752218291.git.mchehab+huawei@kernel.org
scripts/kernel-doc.py