linux-doc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Mauro Carvalho Chehab <mchehab@kernel.org>
To: Jani Nikula <jani.nikula@intel.com>
Cc: Vegard Nossum <vegard.nossum@oracle.com>,
	Jonathan Corbet <corbet@lwn.net>,
	linux-doc@vger.kernel.org
Subject: Re: [PATCH 6/8] doc: kfigure.py: convert to sphinx.util.logging
Date: Tue, 6 Feb 2024 17:08:19 +0100	[thread overview]
Message-ID: <20240206170819.08f3e31a@coco.lan> (raw)
In-Reply-To: <87zfwec6m7.fsf@intel.com>

Em Tue, 06 Feb 2024 10:57:36 +0200
Jani Nikula <jani.nikula@intel.com> escreveu:

> On Mon, 05 Feb 2024, Vegard Nossum <vegard.nossum@oracle.com> wrote:
> > As of commit 3e893e16af55 ("docs: Raise the minimum Sphinx requirement
> > to 2.4.4"), we can use Sphinx's built-in logging facilities.
> >
> > Gotchas:
> > - remove first argument 'app' from all calls
> > - instead of (fmt % (args)), use (fmt, args)
> > - instead of ("<fmt>: " + str) use ("<fmt: %s>", str)  
> 
> If you're doing this, why not go directly to f-strings? IMO the above
> are inferior to it.

Hmm... f-strings require at least python 3.6. Not sure what's the current
requirement.

On a quick check wit vermin:

<snip>
$ vermin -v $(git ls-files "*.py"|grep -v tools)

!2, 3.3      Documentation/conf.py
2.6, 3.0     Documentation/networking/device_drivers/atm/cxacru-cf.py
!2, 3.6      Documentation/sphinx/automarkup.py
2.4, 3.0     Documentation/sphinx/cdomain.py
2.7, 3.1     Documentation/sphinx/kernel_abi.py
2.7, 3.1     Documentation/sphinx/kernel_feat.py
2.3, 3.0     Documentation/sphinx/kernel_include.py
2.5, 3.0     Documentation/sphinx/kerneldoc.py
~2, ~3       Documentation/sphinx/kernellog.py
!2, 3.3      Documentation/sphinx/kfigure.py
2.5, 3.0     Documentation/sphinx/load_config.py
2.3, 3.0     Documentation/sphinx/maintainers_include.py
2.3, 3.0     Documentation/sphinx/rstFlatTable.py
!2, 3.0      Documentation/sphinx/translations.py
2.0, !3      Documentation/trace/postprocess/decode_msr.py
File with incompatible versions: Documentation/trace/postprocess/decode_msr.py
2.3, 3.0     Documentation/userspace-api/media/conf_nitpick.py
!2, 3.5      drivers/gpu/drm/ci/check-patch.py
!2, 3.6      drivers/gpu/drm/ci/xfails/update-xfails.py
!2, 3.7      scripts/bpf_doc.py
!2, 3.3      scripts/checkkconfigsymbols.py
~2, ~3       scripts/gdb/linux/__init__.py
2.2, 3.0     scripts/gdb/linux/clk.py
2.5, 3.0     scripts/gdb/linux/config.py
2.7, 3.0     scripts/gdb/linux/cpus.py
2.7, 3.0     scripts/gdb/linux/device.py
2.6, 3.0     scripts/gdb/linux/dmesg.py
2.7, 3.0     scripts/gdb/linux/genpd.py
2.7, 3.0     scripts/gdb/linux/interrupts.py
2.7, 3.0     scripts/gdb/linux/lists.py
2.3, 3.0     scripts/gdb/linux/mm.py
2.6, 3.0     scripts/gdb/linux/modules.py
2.3, 3.0     scripts/gdb/linux/page_owner.py
!2, 3.6      scripts/gdb/linux/pgtable.py
2.7, 3.0     scripts/gdb/linux/proc.py
2.7, 3.0     scripts/gdb/linux/radixtree.py
2.7, 3.0     scripts/gdb/linux/rbtree.py
2.7, 3.0     scripts/gdb/linux/slab.py
~2, ~3       scripts/gdb/linux/stackdepot.py
2.7, 3.0     scripts/gdb/linux/symbols.py
2.7, 3.0     scripts/gdb/linux/tasks.py
2.7, 3.0     scripts/gdb/linux/timerlist.py
2.7, 3.0     scripts/gdb/linux/utils.py
2.2, 3.0     scripts/gdb/linux/vfs.py
2.2, 3.0     scripts/gdb/linux/vmalloc.py
2.3, 3.0     scripts/gdb/vmlinux-gdb.py
!2, 3.6      scripts/generate_rust_analyzer.py
~2, ~3       scripts/kconfig/tests/auto_submenu/__init__.py
~2, ~3       scripts/kconfig/tests/choice/__init__.py
~2, ~3       scripts/kconfig/tests/choice_value_with_m_dep/__init__.py
!2, 3.2      scripts/kconfig/tests/conftest.py
~2, ~3       scripts/kconfig/tests/err_recursive_dep/__init__.py
~2, ~3       scripts/kconfig/tests/err_recursive_inc/__init__.py
~2, ~3       scripts/kconfig/tests/inter_choice/__init__.py
~2, ~3       scripts/kconfig/tests/new_choice_with_dep/__init__.py
~2, ~3       scripts/kconfig/tests/no_write_if_dep_unmet/__init__.py
~2, ~3       scripts/kconfig/tests/preprocess/builtin_func/__init__.py
~2, ~3       scripts/kconfig/tests/preprocess/circular_expansion/__init__.py
~2, ~3       scripts/kconfig/tests/preprocess/escape/__init__.py
~2, ~3       scripts/kconfig/tests/preprocess/variable/__init__.py
!2, 3.9      scripts/rust_is_available_test.py
!2, 3.2      scripts/spdxcheck.py
2.3, 3.0     scripts/tracing/draw_functrace.py
</snip>

It sounds that automarkup is already requiring 3.6, so it should be ok
to use it here too (also because it uses f-strings):

	$ vermin -vv Documentation/sphinx/automarkup.py 
	Detecting python files..
	Analyzing using 8 processes..
	!2, 3.6      /new_devel/v4l/media_tree/Documentation/sphinx/automarkup.py
	  'itertools' module requires 2.3, 3.0
	  'sorted' member requires 2.4, 3.0
	  'sorted(key)' requires 2.4, 3.0
	  `with` requires 2.5, 3.0
	  f-strings require !2, 3.6
	...

There are still:

	scripts/bpf_doc.py requires 3.7
	rust_is_available_test.py requires 3.9.

But those don't seem to be part of the build.


Anyway, I would expect that the minimal python version to be listed at:

	Documentation/process/changes.rst

Apparently, it isn't. IMO, we need to document there that python
3.6 is the minimal version required to build the Kernel - or
at least the documentation.


Thanks,
Mauro

  parent reply	other threads:[~2024-02-06 16:08 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-05 17:51 [PATCH 0/8] Sphinx extension fix + logging/warning cleanups Vegard Nossum
2024-02-05 17:51 ` [PATCH 1/8] docs: kernel_feat.py: fix build error for missing files Vegard Nossum
2024-02-06  4:30   ` Mauro Carvalho Chehab
2024-02-06  6:03   ` Salvatore Bonaccorso
2024-02-06 22:53   ` Jonathan Corbet
2024-02-07  2:57     ` Vegard Nossum
2024-02-07 14:42       ` Jonathan Corbet
2024-02-07 15:02         ` Vegard Nossum
2024-02-08 18:06           ` Jonathan Corbet
2024-02-05 17:51 ` [PATCH 2/8] docs: kernel_{abi,feat}.py: use doc.current_source Vegard Nossum
2024-02-06  8:49   ` Jani Nikula
2024-02-06 13:04     ` Vegard Nossum
2024-02-05 17:51 ` [PATCH 3/8] doc: kernel_abi.py: convert to sphinx.util.logging Vegard Nossum
2024-02-06  4:36   ` Mauro Carvalho Chehab
2024-02-05 17:51 ` [PATCH 4/8] doc: kernel_feat.py: " Vegard Nossum
2024-02-06  4:42   ` Mauro Carvalho Chehab
2024-02-06 12:38     ` Vegard Nossum
2024-02-05 17:51 ` [PATCH 5/8] doc: kerneldoc.py: " Vegard Nossum
2024-02-06  4:43   ` Mauro Carvalho Chehab
2024-02-05 17:51 ` [PATCH 6/8] doc: kfigure.py: " Vegard Nossum
2024-02-06  3:04   ` Akira Yokosawa
2024-02-06 12:40     ` Vegard Nossum
2024-02-06  4:49   ` Mauro Carvalho Chehab
2024-02-06  8:57   ` Jani Nikula
2024-02-06 13:12     ` Vegard Nossum
2024-02-06 14:00     ` Vegard Nossum
2024-02-06 16:08     ` Mauro Carvalho Chehab [this message]
2024-02-06 18:27       ` Jani Nikula
2024-02-05 17:51 ` [PATCH 7/8] doc: remove kernellog.py Vegard Nossum
2024-02-06  4:50   ` Mauro Carvalho Chehab
2024-02-05 17:51 ` [PATCH 8/8] doc: kernel_{abi,feat}.py: warn about missing directory Vegard Nossum
2024-02-06  4:53   ` Mauro Carvalho Chehab

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240206170819.08f3e31a@coco.lan \
    --to=mchehab@kernel.org \
    --cc=corbet@lwn.net \
    --cc=jani.nikula@intel.com \
    --cc=linux-doc@vger.kernel.org \
    --cc=vegard.nossum@oracle.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).