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

empty transition packages don't seem to work on upgrades #4961

Open
terceiro opened this issue Jan 9, 2018 · 2 comments
Open

empty transition packages don't seem to work on upgrades #4961

terceiro opened this issue Jan 9, 2018 · 2 comments
Labels
state: needs discussion This needs some more discussion type: enhancement Improvements to functionality

Comments

@terceiro
Copy link

terceiro commented Jan 9, 2018

  • Pip version: 9.0.1
  • Python version: 3.5.2
  • Operating system: Debian unstable

Description:

msgpack-python was recently renamed to just msgpack. To ease upgrades, the msgpack maintainers uploaded a new version of msgpack-python which is empty and depends on msgpack. However, when you do the upgrade, it seems that the upgrade of msgpack-python removes the files that should now be provided by msgpack.

I am not sure whether this is a feature or a bug, but it makes it impossible to provide transition packages to ease upgrades when renaming a package.

What I've run:

$ virtualenv -p python3 /tmp/v
Already using interpreter /usr/bin/python3
Using base prefix '/usr'
New python executable in /tmp/v/bin/python3
Also creating executable in /tmp/v/bin/python
Installing setuptools, pkg_resources, pip, wheel...source /tdone.
$ source /tmp/v/bin/activate
$ pip install msgpack-python==0.4.8
Collecting msgpack-python==0.4.8
Installing collected packages: msgpack-python
Successfully installed msgpack-python-0.4.8
$ pip freeze
msgpack-python==0.4.8
pkg-resources==0.0.0
$ python3 -c 'import msgpack'
$ pip install --upgrade msgpack-python
Collecting msgpack-python
  Using cached msgpack_python-0.5.0-py3-none-any.whl
Collecting msgpack>=0.5 (from msgpack-python)
  Using cached msgpack-0.5.0-cp36-cp36m-manylinux1_x86_64.whl
Installing collected packages: msgpack, msgpack-python
  Found existing installation: msgpack-python 0.4.8
    Uninstalling msgpack-python-0.4.8:
      Successfully uninstalled msgpack-python-0.4.8
Successfully installed msgpack-0.5.0 msgpack-python-0.5.0
$ python3 -c 'import msgpack'
Traceback (most recent call last):
  File "<string>", line 1, in <module>
ModuleNotFoundError: No module named 'msgpack'
$ pip freeze
msgpack==0.5.0
msgpack-python==0.5.0
pkg-resources==0.0.0
$ pip --version
pip 9.0.1 from /tmp/v/lib/python3.6/site-packages (python 3.6)
@RonnyPfannschmidt
Copy link
Contributor

this seems to be a order issue, the new package with the shared files is installed before the other one is removed - that way

terceiro added a commit to Linaro/squad that referenced this issue Jan 9, 2018
msgpack was renamed from msgpack-python. msgpack-python became an empty
transition packages that depends on msgpack, but on upgrades the actual
code files are removed.

See: pypa/pip#4961
encukou added a commit to encukou/pyldap that referenced this issue Mar 27, 2018
@pradyunsg pradyunsg added the S: needs triage Issues/PRs that need to be triaged label May 11, 2018
@chrahunt
Copy link
Member

This may be a use case considered for #988, assuming that encompasses the eventual installation order of resolved packages.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
state: needs discussion This needs some more discussion type: enhancement Improvements to functionality
Projects
None yet
Development

No branches or pull requests

4 participants