pip: pip list --outdated --user --not-required broken

Environment

  • pip version: pip 10.0.1 from /usr/lib/python3.6/site-packages/pip (python 3.6)
  • Python version: Python 3.6.5
  • OS: Linux archlinux 4.16.11-1-ARCH #1 SMP PREEMPT Tue May 22 21:40:27 UTC 2018 x86_64 GNU/Linux

Description

The combination of --outdated, --user, and --not-required does not enforce the --not-required flag and instead just shows all outdated packages in the user directory.

Expected behavior

The command should not include required packages.

How to Reproduce

Below is a full example from my own machine.

$ pip list --user --not-required
Package     Version
----------- -------
httpie      0.9.9
lxml        4.2.1
neovim      0.2.6
pycodestyle 2.4.0
pylint      1.9.1
pyls-mypy   0.1.2
yamllint    1.11.1
yq          2.6.0

$ pip list --user --outdated
Package Version Latest Type
------- ------- ------ -----
parso   0.2.0   0.2.1  wheel

$ pip list --user --outdated --not-required
Package Version Latest Type
------- ------- ------ -----
parso   0.2.0   0.2.1  wheel

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Comments: 17 (7 by maintainers)

Most upvoted comments

It doesn’t work for my setup. I have pip version 10.0.1 on macOS 10.12 and use a virtual environment created by python -m venv ens followed by upgrading pip, setuptools and wheel. Currently they have versions 10.0.1, 39.2.0 and 0.31.1 respectively.

After installing latest ipython by pip install ipython (currently this is the version 6.4.0), pip list --not-required shows only ipython as it is the only was requrested. Nevertheless, commands pip list -o and pip list -o --not-required have same output, listiing a newer version of prompt-toolkit (ipython installs version 1.0.15 and proposed version is 2.0.3).

During update installation pip shows a warning:

ipython 6.4.0 has requirement prompt-toolkit<2.0.0,>=1.0.15, but you'll have prompt-toolkit 2.0.3 which is incompatible.

Ignorance of this warning will break ipython completely and I have to run pip install ipython again to resolve all incompatibility issues.

My pip.conf has following contents:

[global]
require-virtualenv = true

[list]
format = columns