Re: [PATCH 0/2] Move Python modules to tools/lib/python

From: Jonathan Corbet

Date: Thu Nov 27 2025 - 12:18:15 EST


Bence Csókás <bence.csokas@xxxxxxx> writes:

> Hi,
>
> On 11/10/25 23:04, Jonathan Corbet wrote:
>> scripts/lib was always a bit of an awkward place for Python libraries; give
>> them a proper home under tools/lib/python. Put the modules from
>> tools/docs/lib there for good measure.
>>
>> The second patch ties them into a single package namespace. It would be
>> more aesthetically pleasing to add a kernel layer, so we could say:
>>
>> from kernel.kdoc import kdoc_parser
>
> This is great, the code looks so much cleaner! However, it would've been
> even nicer if the redundant `kdoc_` was done away with.
>
> So instead of:
> * `import kdoc.kdoc_files` -> `import kdoc.files`
> * `kdoc/kdoc_files.py` -> `kdoc/kdoc_files.py`
> * `abi/abi_parser.py` -> `abi/parser.py`
>
> etc.
>
> Will you consider this?

We can certainly consider it...that's a relatively small detail, though,
in the big organizational picture, so I wasn't concerned about it at
this point.

Thanks,

jon