Em Thu, 19 Jun 2025 14:06:58 -0600 Jonathan Corbet <corbet@xxxxxxx> escreveu: > Jakub Kicinski <kuba@xxxxxxxxxx> writes: > > > On Sat, 14 Jun 2025 20:56:09 +0200 Mauro Carvalho Chehab wrote: > > >> I'm more interested on having a single place where python libraries > >> could be placed. > > > > Me too, especially for selftests. But it's not clear to me that > > scripts/ is the right location. I thought purely user space code > > should live in tools/ and bulk of YNL is for user space. > > I've been out wandering the woods and canyons with no connectivity for a > bit, so missed this whole discussion, sorry. Sounds fun! > Mauro and I had talked about the proper home for Python libraries when > he reworked kernel-doc; we ended up with them under scripts/, which I > didn't find entirely pleasing. If you were to ask me today, I'd say > they should be under lib/python, but tomorrow I might say something > else... Yeah, I guess you proposed lib/python before... I could be wrong though. Anyway, at least for me lib/python sounds a better alternative than scripts. I won't mind tools/lib/python or some other place. > In truth, I don't think it matters much, but I *do* think we should have > a single location from which to import kernel-specific Python code. > Spreading it throughout the tree just isn't going to lead to joy. We're aligned with that regards: IMO, we need a single store within the Kernel for classes that might be shared. As I commented on one of PRs, maybe the series could be merged with Donald proposed (tools/net/ynl/pyynl/lib/doc_generator.py), while we're still discussing. So, let's focus on get it reviewed and merged without needing to wait for a broader discussion about its permanent location. We can later shift the code once we reach an agreement. - To start the discussions about a permanent location, in the specific case of YNL, we currently have there: $ tree -d tools/net/ynl/ -I __pycache__ tools/net/ynl/ ├── generated ├── lib ├── pyynl │ └── lib └── samples where pyynl have executables and pyynl the python libraries. what I would suggest is to move what it is under "pyynl/lib" to "{prefix}/ynl", where "{prefix}" can be "lib/python", "tools/lib/python", "scripts/lib" or whatever other location we reach an agreement. For now, I placed the latest version of my doc patch series under: https://github.com/mchehab/linux/tree/netlink_v8 to have a central place to have them on one of my scratch trees. I sent today for review to linux-doc ML an initial patch series with some non-YAML related patches. I have another set of patches after it, which I'm planning to send on Monday. At the end, there are the YAML parser submission. Regards, Mauro