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

Comments

Projects
None yet
5 participants
@agronholm
Contributor

agronholm commented May 21, 2014

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

This comment has been minimized.

Show comment
Hide comment
@qwcode

qwcode May 21, 2014

Contributor

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.

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

This comment has been minimized.

Show comment
Hide comment
@dstufft

dstufft May 21, 2014

Member

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

Member

dstufft commented May 21, 2014

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

@agronholm

This comment has been minimized.

Show comment
Hide comment
@agronholm

agronholm May 21, 2014

Contributor

+1 for another 1.5.x

Contributor

agronholm commented May 21, 2014

+1 for another 1.5.x

@qwcode

This comment has been minimized.

Show comment
Hide comment
@qwcode

qwcode May 21, 2014

Contributor

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

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 from Pip will not uninstall previous version when installing a wheel to Pip not uninstalling previous versions when installing directly from a wheel path/url May 21, 2014

@pfmoore

This comment has been minimized.

Show comment
Hide comment
@pfmoore

pfmoore May 21, 2014

Member

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 :-)

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

This comment has been minimized.

Show comment
Hide comment
@dstufft

dstufft May 21, 2014

Member

Sure.

Member

dstufft commented May 21, 2014

Sure.

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

@Ivoz

This comment has been minimized.

Show comment
Hide comment
@Ivoz

Ivoz May 21, 2014

Member

Added a 1.5.7 to organise things to put in it~

Member

Ivoz commented May 21, 2014

Added a 1.5.7 to organise things to put in it~

@qwcode qwcode referenced this issue May 22, 2014

Closed

fix for #1825 #1831

@qwcode

This comment has been minimized.

Show comment
Hide comment
@qwcode

qwcode May 24, 2014

Contributor

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.

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

This comment has been minimized.

Show comment
Hide comment
@qwcode

qwcode May 24, 2014

Contributor

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

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

This comment has been minimized.

Show comment
Hide comment
@Ivoz

Ivoz May 24, 2014

Member

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 :)

Member

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 referenced this issue May 26, 2014

Merged

fix for #1825 #1838

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

This comment has been minimized.

Show comment
Hide comment
@dstufft

dstufft Sep 11, 2014

Member

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.

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.

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