Re: [PATCH net-next] Documentation: add pyyaml to requirements.txt

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, 22 Dec 2023, Vegard Nossum <vegard.nossum@xxxxxxxxxx> wrote:
> Commit f061c9f7d058 ("Documentation: Document each netlink family") added
> a new Python script that is invoked during 'make htmldocs' and which reads
> the netlink YAML spec files.
>
> Using the virtualenv from scripts/sphinx-pre-install, we get this new
> error wen running 'make htmldocs':
>
>   Traceback (most recent call last):
>     File "./tools/net/ynl/ynl-gen-rst.py", line 26, in <module>
>       import yaml
>   ModuleNotFoundError: No module named 'yaml'
>   make[2]: *** [Documentation/Makefile:112: Documentation/networking/netlink_spec/rt_link.rst] Error 1
>   make[1]: *** [Makefile:1708: htmldocs] Error 2
>
> Fix this by adding 'pyyaml' to requirements.txt.
>
> Note: This was somehow present in the original patch submission:
> <https://lore.kernel.org/all/20231103135622.250314-1-leitao@xxxxxxxxxx/>
> I'm not sure why the pyyaml requirement disappeared in the meantime.

FWIW, not really specific to the patch at hand, but I'd always prefer
strictyaml [1] with schemas over plain yaml. You get strict typing and
validation of the data during parsing. It's pretty nice, maybe worth
looking into here.


BR,
Jani.


[1] https://hitchdev.com/strictyaml/



>
> Fixes: f061c9f7d058 ("Documentation: Document each netlink family")
> Cc: Breno Leitao <leitao@xxxxxxxxxx>
> Cc: Jakub Kicinski <kuba@xxxxxxxxxx>
> Cc: David S. Miller <davem@xxxxxxxxxxxxx>
> Cc: Jonathan Corbet <corbet@xxxxxxx>
> Signed-off-by: Vegard Nossum <vegard.nossum@xxxxxxxxxx>
> ---
>  Documentation/sphinx/requirements.txt | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/Documentation/sphinx/requirements.txt b/Documentation/sphinx/requirements.txt
> index 335b53df35e2..a8a1aff6445e 100644
> --- a/Documentation/sphinx/requirements.txt
> +++ b/Documentation/sphinx/requirements.txt
> @@ -1,3 +1,4 @@
>  # jinja2>=3.1 is not compatible with Sphinx<4.0
>  jinja2<3.1
>  Sphinx==2.4.4
> +pyyaml

-- 
Jani Nikula, Intel




[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux