--upgrade always downloads most recent version, even if already installed #49

Closed
vbabiy opened this Issue Mar 15, 2011 · 18 comments

Comments

Projects
None yet
9 participants
Contributor

vbabiy commented Mar 15, 2011

We discussed this in #pythonpaste around the 0.5/0.5.1 release; the solution we discussed was to pass the currently-installed version into the finder and raise some kind of BestVersionAlreadyInstalled from there to avoid the unnecessary download.


Contributor

vbabiy commented Mar 15, 2011

In a related issue (which I think would be amenable to the same fix), "pip
install --upgrade somepackage" will currently actually downgrade from
somepackage==dev already installed to the latest "public" version.


Original Comment By: Carl Meyer
Contributor

vbabiy commented Mar 15, 2011

Bump!


Original Comment By: Werner Beroux
Contributor

vbabiy commented Mar 15, 2011

What if someone want to "reinstall" a package? I have used "--upgrade" side-
effect to do that for a long time...

Should we care about a --force option or let users do uninstall + install?

Now we are talking about listing release versions1, it would be easier to
check for installed versions and latest versions before trying to download
everytime.

1 - See https://bitbucket.org/ianb/pip/issue/197/option-to-show-what-
version-would-be

would-be


Original Comment By: Hugo Lopes Tavares
Contributor

vbabiy commented Mar 15, 2011

--force or --reinstall sound find. If you asked to upgrade your system, would
you expect to reinstall everything?


Original Comment By: Werner Beroux
Contributor

vbabiy commented Mar 15, 2011

Werner, I have completed work on a new upgrade command which provides an alias
to the current pip install --upgrade work flow.

https://bitbucket.org/ianb/pip/issue/4/add-upgrade-and-upgrade-all-
commands

The plan now is to shift focus and make the upgrade commands do the "right"
thing; only "upgrade" to a newer or specific version of a package if
available.

I will be posting a patch for review in the near future.

commands


Original Comment By: Kelsey Hightower
Contributor

vbabiy commented Mar 15, 2011

Great. Makes me happy.


Original Comment By: Werner Beroux
Contributor

vbabiy commented Mar 15, 2011

+1 for this bug


Original Comment By: tw33dl3dee
Contributor

vbabiy commented Mar 15, 2011

+1 as well. And it would be nice to have the -r requirements file
functionality integrated with the upgrade. For example, I have this in my
requirements file:

Django<1.3

I'd like to easily upgrade to latest 1.2 security fix without grabbing 1.3
until I'm ready for it.


Original Comment By: Dave Parsons
Contributor

vbabiy commented Mar 15, 2011

Requirements files and upgrade already integrate just fine: pip install -U -r
requirements.txt. Of course, until this bug is fixed it's kinda slow because
it'll re-download everything...


Original Comment By: Carl Meyer

Any updates on this bug? 10-minute upgrade for a big requirements.txt really sucks :(

Contributor

vbabiy commented Mar 17, 2011

I plan on working on this when the python3 port is finished. If anyone else wants to start they are well come.

nh2 commented Apr 5, 2011

What about this, is it in Pip 1.0?

Bump!

Bump :)

This would reduce our deployment/release time from many minutes to maybe around 30 seconds. Would be great to see this make it into pip.

Contributor

embray commented Aug 24, 2011

Bump!
Just had a user point this out to me when he tried to do an upgrade of my package, and it tried to reinstall his numpy despite it already being at the latest version. If you know how long it takes to build numpy you know this is really annoying, nevermind that sometimes people have hand-tweaked numpy installations that would get blown away.

The default behavior of --upgrade definitely should not be to reinstall already up to date packages, unless maybe with the addition of a --force-reinstall option or the like.

embray added a commit to embray/pip that referenced this issue Aug 24, 2011

Bump, want this real bad =)

galund commented Sep 23, 2011

The patch for this is here, for anyone that doesn't want to waste time finding it: #342

@embray embray referenced this issue Oct 23, 2011

Merged

Fix issue #49 #342

Contributor

carljm commented Oct 23, 2011

Merged - thanks @iguananaut for the pull request!

@carljm carljm closed this Oct 23, 2011

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment