Pip: Allow `pip list --outdated` to take a requirements file

Created on 22 Dec 2015  路  6Comments  路  Source: pypa/pip

Sometimes, I'm not on the latest release of a Python package. For example, I haven't upgraded to Django 1.9 yet. But is there a bug fix or security release for 1.8? With pip, I can't tell:

% pip list --outdated
Django (Current: 1.8.6 Latest: 1.9 [wheel])
requests (Current: 2.8.0 Latest: 2.9.1 [wheel])

To fix this, it would be nice if I could pass my normal requirements.txt to pip list --outdated. In other words, given a requirements.txt like this...

Django>=1.8,<1.9
requests>=2.8,<2.9

...I'd like to do this:

% pip list --outdated -r requirements.txt 
Django (Current: 1.8.6 Wanted: 1.8.7 Latest: 1.9 [wheel])
requests (Current: 2.8.0 Wanted: 2.8.1 Latest: 2.9.1 [wheel])

(I'm not dead-set on that output format, just giving it as an example.)

I searched around for similar issues, but the closest I could find was #2982. That's not so much a functional change as a stylistic one.

lisshow enhancement

Most helpful comment

With this you could also tell whether there is an update for your packages directly listed in your requirements file and not packages that are just dependencies and which you might not be able to update without possibly breaking something.

All 6 comments

Sounds like a great idea. Sign me up!

With this you could also tell whether there is an update for your packages directly listed in your requirements file and not packages that are just dependencies and which you might not be able to update without possibly breaking something.

I think I can pick this up at some point in the near future. Self-assigning this on that assumption. I'd still be working on this in volunteered time, so, no promises on that.

Anyone finding this through search:
https://pypi.org/project/pip-upgrade
I've been using the above package to help manage the situation.

Having it native would be super

@juanjsebgarcia I think you're asking for #4551?

I think it applies to both :)

The above package lists all the expired requirements in a given requirements.txt so I think it helps alleviate this issue too.

I still think having it natively in pip would be great though, something less interactive...

Was this page helpful?
0 / 5 - 0 ratings