lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20230315214008.2536a1b4@kernel.org>
Date:   Wed, 15 Mar 2023 21:40:08 -0700
From:   Jakub Kicinski <kuba@...nel.org>
To:     Michal Michalik <michal.michalik@...el.com>
Cc:     netdev@...r.kernel.org, davem@...emloft.net, pabeni@...hat.com,
        edumazet@...gle.com, arkadiusz.kubalewski@...el.com
Subject: Re: [PATCH net] tools: ynl: add the Python requirements.txt file

On Tue, 14 Mar 2023 17:07:58 +0100 Michal Michalik wrote:
> It is a good practice to state explicitely which are the required Python
> packages needed in a particular project to run it. The most commonly
> used way is to store them in the `requirements.txt` file*.
> 
> *URL: https://pip.pypa.io/en/stable/reference/requirements-file-format/
> 
> Currently user needs to figure out himself that Python needs `PyYAML`
> and `jsonschema` (and theirs requirements) packages to use the tool.
> Add the `requirements.txt` for user convenience.
> 
> How to use it:
> 1) (optional) Create and activate empty virtual environment:
>   python3.X -m venv venv3X
>   source ./venv3X/bin/activate
> 2) Install all the required packages:
>   pip install -r requirements.txt
>     or
>   python -m pip install -r requirements.txt
> 3) Run the script!
> 
> The `requirements.txt` file was tested for:
> * Python 3.6
> * Python 3.8
> * Python 3.10

Is this very useful? IDK much about python, I'm trying to use only
packages which are commonly installed on Linux systems. jsonschema
is an exception, so I've added the --no-schema option to cli.py to
avoid it.

> diff --git a/tools/net/ynl/requirements.txt b/tools/net/ynl/requirements.txt
> new file mode 100644
> index 0000000..2ad25d9
> --- /dev/null
> +++ b/tools/net/ynl/requirements.txt
> @@ -0,0 +1,7 @@
> +attrs==22.2.0
> +importlib-metadata==4.8.3
> +jsonschema==4.0.0
> +pyrsistent==0.18.0
> +PyYAML==6.0
> +typing-extensions==4.1.1
> +zipp==3.6.0

Why the == signs? Do we care about the version of any of these?
Also, there's a lot more stuff here than I thought I'm using.
What's zipp and why typing? Did I type something and forgot? :S

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ