pip: pip list --outdated --format=freeze does not return the right version of the outdated packages.

Description

To see the outdated packages, just pip list -o, but when I use --format=freeze, the command returns an output with the oldest versions and not the newest ones.

Expected behavior

Returns an output with the newest versions of the packages.

pip version

21.0.1

Python version

3.9.4

OS

macOS Big Sur

How to Reproduce

  1. Get package from ‘…’
  2. Then run ‘…’
  3. An error occurs.

Output

(happiness) stephane@gandalf ~/s/g/m/happiness (main)> pip list -o
Package             Version Latest Type
------------------- ------- ------ -----
asgiref             3.3.1   3.3.4  wheel
decorator           4.4.2   5.0.5  wheel
Django              3.1.7   3.2    wheel
django-extensions   3.1.1   3.1.2  wheel
django-heroku       0.0.0   0.3.1  wheel
djangorestframework 3.12.2  3.12.4 wheel
Faker               6.5.0   8.0.0  wheel
gunicorn            20.0.4  20.1.0 sdist
idna                2.10    3.1    wheel
ipython             7.21.0  7.22.0 wheel
parso               0.8.1   0.8.2  wheel
prompt-toolkit      3.0.16  3.0.18 wheel
Pygments            2.8.0   2.8.1  wheel
urllib3             1.26.3  1.26.4 wheel
(happiness) stephane@gandalf ~/s/g/m/happiness (main)> pip list -o --format=freeze
asgiref==3.3.1
decorator==4.4.2
Django==3.1.7
django-extensions==3.1.1
django-heroku==0.0.0
djangorestframework==3.12.2
Faker==6.5.0
gunicorn==20.0.4
idna==2.10
ipython==7.21.0
parso==0.8.1
prompt-toolkit==3.0.16
Pygments==2.8.0
urllib3==1.26.3

Code of Conduct

I agree to follow the PSF Code of Conduct.

Hi all,

Here is my bug report about pip list -o --format=freeze

Thank you

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Comments: 15 (7 by maintainers)

Commits related to this issue

Most upvoted comments

A prime way to destroy an SSD and kill data-capped Internet connections, not to mention a massive waste of time, instead of providing a sensible means, namely --upgrade-all.

Instead the SysAdmin must learn complicated scripting (jq is seriously complicated, PowerShell not exactly easy either), when pip could internally do this much easier with existing functions.

0 steps forward. 2 or 3 steps backwards.

I agree, let’s make the two mutually exclusive.

It’s also possible to disallow the freeze format when using --outdated, as it doesn’t allow reporting “current” and “latest” versions, which is fundamental to the “outdated” display.

I think this should be done to avoid needless confusion.