Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Redundant "Requirement already satisfied" output in 20.3b1 #9117

Closed
bluenote10 opened this issue Nov 10, 2020 · 1 comment · Fixed by #9265
Closed

Redundant "Requirement already satisfied" output in 20.3b1 #9117

bluenote10 opened this issue Nov 10, 2020 · 1 comment · Fixed by #9265
Labels
C: error messages Improving error messages UX User experience related

Comments

@bluenote10
Copy link

bluenote10 commented Nov 10, 2020

Environment

  • pip version: 20.3b1
  • Python version: Python 3.7.9
  • OS: Ubuntu 16.04

Description

Starting with version 20.3b1, pip spams many Requirement already satisfied messages.

Expected behavior

In earlier versions the messages was just printed once per package, which was much nicer behavior.

How to Reproduce

A simple example pip install kubernetes plotly protobuf six (on second execution):

Requirement already satisfied: kubernetes in ./tmp_venv/lib/python3.7/site-packages (12.0.0)
Requirement already satisfied: plotly in ./tmp_venv/lib/python3.7/site-packages (4.11.0)
Requirement already satisfied: protobuf in ./tmp_venv/lib/python3.7/site-packages (3.13.0)
Requirement already satisfied: six in ./tmp_venv/lib/python3.7/site-packages (1.15.0)
Requirement already satisfied: six in ./tmp_venv/lib/python3.7/site-packages (1.15.0)
Requirement already satisfied: urllib3>=1.24.2 in ./tmp_venv/lib/python3.7/site-packages (from kubernetes) (1.25.10)
Requirement already satisfied: websocket-client!=0.40.0,!=0.41.*,!=0.42.*,>=0.32.0 in ./tmp_venv/lib/python3.7/site-packages (from kubernetes) (0.57.0)
Requirement already satisfied: requests-oauthlib in ./tmp_venv/lib/python3.7/site-packages (from kubernetes) (1.3.0)
Requirement already satisfied: pyyaml>=3.12 in ./tmp_venv/lib/python3.7/site-packages (from kubernetes) (3.13)
Requirement already satisfied: setuptools>=21.0.0 in ./tmp_venv/lib/python3.7/site-packages (from kubernetes) (50.3.2)
Requirement already satisfied: google-auth>=1.0.1 in ./tmp_venv/lib/python3.7/site-packages (from kubernetes) (1.22.1)
Requirement already satisfied: certifi>=14.05.14 in ./tmp_venv/lib/python3.7/site-packages (from kubernetes) (2020.6.20)
Requirement already satisfied: python-dateutil>=2.5.3 in ./tmp_venv/lib/python3.7/site-packages (from kubernetes) (2.8.1)
Requirement already satisfied: requests in ./tmp_venv/lib/python3.7/site-packages (from kubernetes) (2.24.0)
Requirement already satisfied: six in ./tmp_venv/lib/python3.7/site-packages (1.15.0)
Requirement already satisfied: retrying>=1.3.3 in ./tmp_venv/lib/python3.7/site-packages (from plotly) (1.3.3)
Requirement already satisfied: setuptools>=21.0.0 in ./tmp_venv/lib/python3.7/site-packages (from kubernetes) (50.3.2)
Requirement already satisfied: six in ./tmp_venv/lib/python3.7/site-packages (1.15.0)
Requirement already satisfied: six in ./tmp_venv/lib/python3.7/site-packages (1.15.0)
Requirement already satisfied: oauthlib>=3.0.0 in ./tmp_venv/lib/python3.7/site-packages (from requests-oauthlib->kubernetes) (3.1.0)
Requirement already satisfied: requests in ./tmp_venv/lib/python3.7/site-packages (from kubernetes) (2.24.0)
Requirement already satisfied: pyasn1-modules>=0.2.1 in ./tmp_venv/lib/python3.7/site-packages (from google-auth>=1.0.1->kubernetes) (0.2.8)
Requirement already satisfied: six in ./tmp_venv/lib/python3.7/site-packages (1.15.0)
Requirement already satisfied: rsa<5,>=3.1.4 in ./tmp_venv/lib/python3.7/site-packages (from google-auth>=1.0.1->kubernetes) (4.6)
Requirement already satisfied: cachetools<5.0,>=2.0.0 in ./tmp_venv/lib/python3.7/site-packages (from google-auth>=1.0.1->kubernetes) (4.1.1)
Requirement already satisfied: setuptools>=21.0.0 in ./tmp_venv/lib/python3.7/site-packages (from kubernetes) (50.3.2)
Requirement already satisfied: six in ./tmp_venv/lib/python3.7/site-packages (1.15.0)
Requirement already satisfied: urllib3>=1.24.2 in ./tmp_venv/lib/python3.7/site-packages (from kubernetes) (1.25.10)
Requirement already satisfied: chardet<4,>=3.0.2 in ./tmp_venv/lib/python3.7/site-packages (from requests->kubernetes) (3.0.4)
Requirement already satisfied: certifi>=14.05.14 in ./tmp_venv/lib/python3.7/site-packages (from kubernetes) (2020.6.20)
Requirement already satisfied: idna<3,>=2.5 in ./tmp_venv/lib/python3.7/site-packages (from requests->kubernetes) (2.10)
Requirement already satisfied: six in ./tmp_venv/lib/python3.7/site-packages (1.15.0)
Requirement already satisfied: pyasn1<0.5.0,>=0.4.6 in ./tmp_venv/lib/python3.7/site-packages (from pyasn1-modules>=0.2.1->google-auth>=1.0.1->kubernetes) (0.4.8)
Requirement already satisfied: pyasn1<0.5.0,>=0.4.6 in ./tmp_venv/lib/python3.7/site-packages (from pyasn1-modules>=0.2.1->google-auth>=1.0.1->kubernetes) (0.4.8)

For instance the message that six is already satisfied is shown 8 times.

For comparison this is the output with the latest pre 20.3b1 version:

Requirement already satisfied: kubernetes in ./tmp_venv/lib/python3.7/site-packages (12.0.0)
Requirement already satisfied: plotly in ./tmp_venv/lib/python3.7/site-packages (4.11.0)
Requirement already satisfied: protobuf in ./tmp_venv/lib/python3.7/site-packages (3.13.0)
Requirement already satisfied: six in ./tmp_venv/lib/python3.7/site-packages (1.15.0)
Requirement already satisfied: google-auth>=1.0.1 in ./tmp_venv/lib/python3.7/site-packages (from kubernetes) (1.22.1)
Requirement already satisfied: requests in ./tmp_venv/lib/python3.7/site-packages (from kubernetes) (2.24.0)
Requirement already satisfied: websocket-client!=0.40.0,!=0.41.*,!=0.42.*,>=0.32.0 in ./tmp_venv/lib/python3.7/site-packages (from kubernetes) (0.57.0)
Requirement already satisfied: pyyaml>=3.12 in ./tmp_venv/lib/python3.7/site-packages (from kubernetes) (3.13)
Requirement already satisfied: setuptools>=21.0.0 in ./tmp_venv/lib/python3.7/site-packages (from kubernetes) (50.3.2)
Requirement already satisfied: python-dateutil>=2.5.3 in ./tmp_venv/lib/python3.7/site-packages (from kubernetes) (2.8.1)
Requirement already satisfied: urllib3>=1.24.2 in ./tmp_venv/lib/python3.7/site-packages (from kubernetes) (1.25.10)
Requirement already satisfied: requests-oauthlib in ./tmp_venv/lib/python3.7/site-packages (from kubernetes) (1.3.0)
Requirement already satisfied: certifi>=14.05.14 in ./tmp_venv/lib/python3.7/site-packages (from kubernetes) (2020.6.20)
Requirement already satisfied: retrying>=1.3.3 in ./tmp_venv/lib/python3.7/site-packages (from plotly) (1.3.3)
Requirement already satisfied: pyasn1-modules>=0.2.1 in ./tmp_venv/lib/python3.7/site-packages (from google-auth>=1.0.1->kubernetes) (0.2.8)
Requirement already satisfied: cachetools<5.0,>=2.0.0 in ./tmp_venv/lib/python3.7/site-packages (from google-auth>=1.0.1->kubernetes) (4.1.1)
Requirement already satisfied: rsa<5,>=3.1.4; python_version >= "3.5" in ./tmp_venv/lib/python3.7/site-packages (from google-auth>=1.0.1->kubernetes) (4.6)
Requirement already satisfied: idna<3,>=2.5 in ./tmp_venv/lib/python3.7/site-packages (from requests->kubernetes) (2.10)
Requirement already satisfied: chardet<4,>=3.0.2 in ./tmp_venv/lib/python3.7/site-packages (from requests->kubernetes) (3.0.4)
Requirement already satisfied: oauthlib>=3.0.0 in ./tmp_venv/lib/python3.7/site-packages (from requests-oauthlib->kubernetes) (3.1.0)
Requirement already satisfied: pyasn1<0.5.0,>=0.4.6 in ./tmp_venv/lib/python3.7/site-packages (from pyasn1-modules>=0.2.1->google-auth>=1.0.1->kubernetes) (0.4.8)

In one of our large projects for instance, the number of output lines has increased from 226 messages to 535 messages. Also, the new behavior has an actually observable performance impact:

  • 2.3 seconds in 20.2.4
  • 3.8 seconds in 20.3b1

Output

See inline above.

@brainwane brainwane added C: new resolver UX User experience related C: error messages Improving error messages labels Nov 18, 2020
@brainwane
Copy link
Contributor

Thank you for the report, @bluenote10! I'm bringing it to the attention of our user experience folks who can consider it as they work on plans and principles for improving pip's output.

Also, you may be interested in #8664 which is an issue specifically about pip's performance with the new resolver.

bors bot referenced this issue in duckinator/emanate Dec 15, 2020
204: Update pip to 20.3.3 r=duckinator a=pyup-bot


This PR updates [pip](https://pypi.org/project/pip) from **20.3.1** to **20.3.3**.



<details>
  <summary>Changelog</summary>
  
  
   ### 20.3.3
   ```
   ===================

Bug Fixes
---------

- Revert &quot;Skip candidate not providing valid metadata&quot;, as that caused pip to be overeager about downloading from the package index. (`9264 &lt;https://github.com/pypa/pip/issues/9264&gt;`_)
   ```
   
  
  
   ### 20.3.2
   ```
   ===================

Features
--------

- New resolver: Resolve direct and pinned (``==`` or ``===``) requirements first
  to improve resolver performance. (`9185 &lt;https://github.com/pypa/pip/issues/9185&gt;`_)
- Add a mechanism to delay resolving certain packages, and use it for setuptools. (`9249 &lt;https://github.com/pypa/pip/issues/9249&gt;`_)

Bug Fixes
---------

- New resolver: The &quot;Requirement already satisfied&quot; log is not printed only once
  for each package during resolution. (`9117 &lt;https://github.com/pypa/pip/issues/9117&gt;`_)
- Fix crash when logic for redacting authentication information from URLs
  in ``--help`` is given a list of strings, instead of a single string. (`9191 &lt;https://github.com/pypa/pip/issues/9191&gt;`_)
- New resolver: Correctly implement PEP 592. Do not return yanked versions from
  an index, unless the version range can only be satisfied by yanked candidates. (`9203 &lt;https://github.com/pypa/pip/issues/9203&gt;`_)
- New resolver: Make constraints also apply to package variants with extras, so
  the resolver correctly avoids backtracking on them. (`9232 &lt;https://github.com/pypa/pip/issues/9232&gt;`_)
- New resolver: Discard a candidate if it fails to provide metadata from source,
  or if the provided metadata is inconsistent, instead of quitting outright. (`9246 &lt;https://github.com/pypa/pip/issues/9246&gt;`_)

Vendored Libraries
------------------

- Update vendoring to 20.8

Improved Documentation
----------------------

- Update documentation to reflect that pip still uses legacy resolver by default in Python 2 environments. (`9269 &lt;https://github.com/pypa/pip/issues/9269&gt;`_)
   ```
   
  
</details>


 

<details>
  <summary>Links</summary>
  
  - PyPI: https://pypi.org/project/pip
  - Changelog: https://pyup.io/changelogs/pip/
  - Homepage: https://pip.pypa.io/
</details>



205: Update pytest to 6.2.1 r=duckinator a=pyup-bot


This PR updates [pytest](https://pypi.org/project/pytest) from **6.1.2** to **6.2.1**.



*The bot wasn't able to find a changelog for this release. [Got an idea?](https://github.com/pyupio/changelogs/issues/new)*

<details>
  <summary>Links</summary>
  
  - PyPI: https://pypi.org/project/pytest
  - Homepage: https://docs.pytest.org/en/latest/
</details>



Co-authored-by: pyup-bot <[email protected]>
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 6, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
C: error messages Improving error messages UX User experience related
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants