Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pip not uninstalling previous versions when installing directly from a wheel path/url #1825

Closed
agronholm opened this issue May 21, 2014 · 11 comments
Labels
auto-locked Outdated issues that have been locked by automation
Milestone

Comments

@agronholm
Copy link
Contributor

Reproducible with pip 1.5.6 as follows:

  1. create and activate a virtualenv
  2. install wheel
  3. create a trivial setup.py
  4. run bdist_wheel
  5. install the wheel
  6. bump up the version in setup.py
  7. run bdist_wheel again
  8. install the newer version

Contents of setup.py used:

from setuptools import setup

setup(
  name='Foo',
  version='1.0.0'
)

The previous version remains in site-packages and "Foo" can be uninstalled twice.
If I install Foo as a wheel first and the next version as sdist, the old version is uninstalled properly.
If I install the sdist first and wheel later, I get two Foos in site-packages.
Thus I conclude that wheel installation does not check for an existing installation.
I'm not even sure this bug belongs to pip.

@qwcode
Copy link
Contributor

qwcode commented May 21, 2014

yes, I can confirm this.
It's specifically when installing from wheel archives directly (local paths or urls)
i.e. it's not wheels in general (for example when using specifiers that only happen to install wheels from indexes or find-links)

btw, installing directly from sdist does not have this problem.

I'll take a look at fixing this.

@dstufft
Copy link
Member

dstufft commented May 21, 2014

This is probably a big enough bug to issue another 1.5.x I think?

@agronholm
Copy link
Contributor Author

+1 for another 1.5.x

@qwcode
Copy link
Contributor

qwcode commented May 21, 2014

I think I have a fix for this.
I can post it tomorrow with tests.

@qwcode qwcode changed the title Pip will not uninstall previous version when installing a wheel Pip not uninstalling previous versions when installing directly from a wheel path/url May 21, 2014
@pfmoore
Copy link
Member

pfmoore commented May 21, 2014

If we're doing another 1.5.x, can we revendor distlib? I'll try to get together a PR for that this evening, if nobody beats me to it :-)

@dstufft
Copy link
Member

dstufft commented May 21, 2014

Sure.

@Ivoz Ivoz added this to the 1.5.7 milestone May 21, 2014
@Ivoz
Copy link
Contributor

Ivoz commented May 21, 2014

Added a 1.5.7 to organise things to put in it~

@qwcode qwcode mentioned this issue May 22, 2014
@qwcode
Copy link
Contributor

qwcode commented May 24, 2014

afaict, this has been a wheel bug from the beginning, so not sure it really qualifies for a patch release, but if people want to do a 1.5.7 for this, that's fine.

@qwcode
Copy link
Contributor

qwcode commented May 24, 2014

if we're really doing the 1.5.7, I need to redo #1831 against 1.5.X

@Ivoz
Copy link
Contributor

Ivoz commented May 24, 2014

I don't have much of an opinion on whether or not to do more point releases on 1.5, but organising issues into milestones doesn't cost anything so it's just a why not, in case :)

@qwcode qwcode mentioned this issue May 26, 2014
qwcode added a commit that referenced this issue May 26, 2014
@dstufft dstufft modified the milestones: 1.6, 1.5.7 Jun 16, 2014
@dstufft
Copy link
Member

dstufft commented Sep 11, 2014

I'm going to close this, I don't think we're going to do a 1.5.7 at this point and this is fixed in develop.

@dstufft dstufft closed this as completed Sep 11, 2014
@lock lock bot added the auto-locked Outdated issues that have been locked by automation label Jun 5, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Jun 5, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
auto-locked Outdated issues that have been locked by automation
Projects
None yet
Development

No branches or pull requests

5 participants