Skip to content

Add install option to hide "Requirement already satisfied" log info. #5900

Open
@mlorant

Description

@mlorant

What's the problem this feature will solve?
I'm running pip install -r requirements.txt at each deployment to keep my third-parties up to date with the code. With several dozens of requirements, the log is pretty big, while I don't really care to know that 99 % of the libs was "already satisfied" from one deployment to the next one. The worst is sub-dependencies are also shown, so in fact I can get up to 200 lines displayed...

Most of the execution trace is:

Requirement already satisfied: setuptools==36.6.0 in my_venv/lib/python3.5/site-packages (from -r requirements.txt (line 8)) (36.6.0)
Requirement already satisfied: Django==2.1.2 in my_venv/lib/python3.5/site-packages (from -r requirements.txt (line 9)) (2.1.2)
Requirement already satisfied: django-formtools==2.1 in my_venv/lib/python3.5/site-packages (from -r requirements.txt (line 10)) (2.1)
Requirement already satisfied: djangorestframework==3.7.7 in my_venv/lib/python3.5/site-packages (from -r requirements.txt (line 11)) (3.7.7)
Requirement already satisfied: django-rest-framework-mongoengine==3.3.0 in my_venv/lib/python3.5/site-packages (from -r requirements.txt (line 12)) (3.3.0)
[...]
Requirement already satisfied: pycparser in my_venv/lib/python3.5/site-packages (from cffi>=1.4.1->cryptography>=1.1->fabric==2.3.1->-r requirements.txt (line 93)) (2.14)

Describe the solution you'd like
I would like to be able to hide those warnings with a simple command argument. For example:

pip install -r requirements.txt --no-warn-already-satisfied

Alternative Solutions
It seems that -q is doing the job, but it is hiding in fact all log message at INFO level, so new installations get hidden too... I still want to monitor that so I can log any environment changes from my deployment log.
For now, the only viable solution is to use standard UNIX tools, and exclude those lines with grep: https://stackoverflow.com/questions/36350951/hide-requirement-already-satisfied-warning It does work, but it could be better :)

Additional context
The name --no-warn-already-satisfied would be consistent with other options that already exists in pip install arguments, such as no-warn-conflicts and no-warn-script-location

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions