Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

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

Closed
vbabiy opened this Issue · 18 comments

9 participants

@vbabiy

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.


@vbabiy

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
@vbabiy

Bump!


Original Comment By: Werner Beroux
@vbabiy

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
@vbabiy

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


Original Comment By: Werner Beroux
@vbabiy

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
@vbabiy

Great. Makes me happy.


Original Comment By: Werner Beroux
@vbabiy

+1 for this bug


Original Comment By: tw33dl3dee
@vbabiy

+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
@vbabiy

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
@tw33dl3dee

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

@vbabiy

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

@nh2
nh2 commented

What about this, is it in Pip 1.0?

@pmclanahan

Bump!

@adamcharnock

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.

@embray

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 embray referenced this issue from a commit in embray/pip
@embray embray Adds tests for the issue #49 fix 78575c4
@mhluongo

Bump, want this real bad =)

@galund

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

@embray embray referenced this issue
Merged

Fix issue #49 #342

@carljm
Owner

Merged - thanks @iguananaut for the pull request!

@carljm carljm closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.