Subject: Re: [PATCH net] tools: ynl: add the Python requirements.txt file

From: Jakub Kicinski <[email-masked]>
Date: Wed, 15 Mar 2023 21:40:08 -0700

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