paylogic / pip-accel

pip-accel: Accelerator for pip, the Python package manager

Home Page:https://pypi.python.org/pypi/pip-accel

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Downgrading a package doesn't work

hvdklauw opened this issue · comments

$ pip-accel install xlrd==0.9.2
...
$ pip-accel install xlrd==0.7.1 --upgrade

(pip-accel) Unpacking local source distributions ..
(pip-accel) Executing command: pip install --download-cache=/home/harrovanderklauw/.pip/cache --find-links=file:///home/harrovanderklauw/.pip-accel/sources --no-index xlrd==0.7.1 --upgrade -v -v --no-install
  Ignoring indexes: http://pypi.python.org/simple/
  Downloading/unpacking xlrd==0.7.1
    Running setup.py egg_info for package xlrd
      running egg_info
      writing pip-egg-info/xlrd.egg-info/PKG-INFO
      writing top-level names to pip-egg-info/xlrd.egg-info/top_level.txt
      writing dependency_links to pip-egg-info/xlrd.egg-info/dependency_links.txt
      warning: manifest_maker: standard file '-c' not found
      reading manifest file 'pip-egg-info/xlrd.egg-info/SOURCES.txt'
      writing manifest file 'pip-egg-info/xlrd.egg-info/SOURCES.txt'
    Requested xlrd==0.7.1, but installing version 0.9.2
  Successfully downloaded xlrd
(pip-accel) Unpacked local source distributions in 0.57 seconds.
(pip-accel) Found 0 requirements in pip's output.
(pip-accel) No requirements found in pip's output, probably there's nothing to do.

As you can see it installs 0.9.2 instead of downgrading to 0.7.1!

Uninstalling (twice) and then installing will fix it

Normal pip does do this correctly if you provide the --upgrade option (without it, fails the same way)

After much digging I found that this is not a bug in pip-accel; it's bug #709 in pip. Apparently it will be fixed in version 1.4 which is due soonish? Shall we wait and see? :-)

Edit: Wait, you're saying this does work with regular pip? I only found #709 because I tried to reproduce this issue...

Requested xlrd==0.7.1, but installing version 0.9.2

I think the above message is printed because pip is re-using the existing build directory, i.e. it's aware that what it's doing is wrong. Which is why this is such a silly bug :-s.

In case it did work with pip but didn't work with pip-accel, you can try version 0.9.2 (just published). It contains a lot of improvements, including the fact that modules are now uninstalled before another version is installed (i.e. it should now work the same way as pip).

Thanks for the feedback Harro. This now works as it is supposed to, so I'm closing this issue:

peter@peter-macbook> pip-accel install xlrd==0.9.2
2013-10-14 23:48:42 peter-macbook pip-accel[25727] INFO Unpacking local source distributions ..
2013-10-14 23:48:42 peter-macbook pip-accel[25727] INFO Executing command: pip install --download-cache=/home/peter/.pip/download-cache --find-links=file:///home/peter/.pip-accel/sources --build-directory=/tmp/tmpjKDQ_j --no-index xlrd==0.9.2 --no-install
Ignoring indexes: https://pypi.python.org/simple/
Downloading/unpacking xlrd==0.9.2
  Running setup.py egg_info for package xlrd
Successfully downloaded xlrd
2013-10-14 23:48:42 peter-macbook pip-accel[25727] INFO Unpacked local source distributions in 0.28 seconds.
2013-10-14 23:48:42 peter-macbook pip-accel[25727] INFO Installing from binary distributions ..
2013-10-14 23:48:42 peter-macbook pip-accel[25727] INFO Finished installing all requirements in 0.21 seconds.
2013-10-14 23:48:42 peter-macbook pip-accel[25727] INFO Done! Took 0.49 seconds to install 1 package.

peter@peter-macbook> pip freeze | grep xlrd
xlrd==0.9.2

peter@peter-macbook> pip-accel install xlrd==0.7.1 --upgrade
2013-10-14 23:48:54 peter-macbook pip-accel[25737] INFO Unpacking local source distributions ..
2013-10-14 23:48:54 peter-macbook pip-accel[25737] INFO Executing command: pip install --download-cache=/home/peter/.pip/download-cache --find-links=file:///home/peter/.pip-accel/sources --build-directory=/tmp/tmpUP633L --no-index xlrd==0.7.1 --upgrade --no-install
Ignoring indexes: https://pypi.python.org/simple/
Downloading/unpacking xlrd==0.7.1
  Running setup.py egg_info for package xlrd
Successfully downloaded xlrd
2013-10-14 23:48:54 peter-macbook pip-accel[25737] INFO Unpacked local source distributions in 0.15 seconds.
2013-10-14 23:48:54 peter-macbook pip-accel[25737] INFO Installing from binary distributions ..
2013-10-14 23:48:54 peter-macbook pip-accel[25737] INFO Uninstalled previously installed package xlrd.
2013-10-14 23:48:54 peter-macbook pip-accel[25737] INFO Finished installing all requirements in 0.21 seconds.
2013-10-14 23:48:54 peter-macbook pip-accel[25737] INFO Done! Took 0.36 seconds to install 1 package.

peter@peter-macbook> pip freeze | grep xlrd
xlrd==0.7.1