entry point raises `VersionConflict` dues to PEP440 local version identifier
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 2.9k
- Forks
- 1.4k
- Avg merge
- 1d 1h
- Merged PRs (30d)
- 1
Description
Originally reported by: johnyf (Bitbucket: johnyf, GitHub: johnyf)
Two related issues:
-
If
install_requirescontains no local version identifier (saydd >= 0.2.1), but a development version with local version identifier is installed (saydd == 0.2.1.dev0+000), thenpython setup.py install` fails to install that dependency.The error message is:
Processing dependencies for some_package==0.1.1.dev0+e155acb1bf1b393beba01bbf591ce9419e595606.dirty error: dd 0.2.1.dev0+3a2ae3695536f3ae6f0f2063ad925c5e085a1d10.dirty is installed but dd>=0.2.1 is required by set(['omega'])The package gets installed, so this error can be ignored, if all dependencies are already installed.
Otherwise, this issue can be worked around withpip install --pre dd .. -
The main problem arises with entry points. Suppose we did as described above, and installed a package with
pip install --pre dd .. If the package has an entry point, then calling the entry point raises aVersionConflictabout the dependencyddthat was allowed to be a development version during install:
Traceback (most recent call last):
File "~/.virtualenvs/foo/bin/some_wrapper", line 5, in <module>
from pkg_resources import load_entry_point
File "~/.virtualenvs/foo/lib/python2.7/site-packages/pkg_resources/__init__.py", line 3141, in <module>
...
File "~/.virtualenvs/foo/lib/python2.7/site-packages/pkg_resources/__init__.py", line 833, in resolve
raise VersionConflict(dist, req).with_context(dependent_req)
pkg_resources.ContextualVersionConflict: (dd 0.2.1.dev0+3a2ae3695536f3ae6f0f2063ad925c5e085a1d10.dirty (~/.virtualenvs/foo/lib/python2.7/site-packages/dd-0.2.1.dev0+3a2ae3695536f3ae6f0f2063ad925c5e085a1d10.dirty-py2.7-macosx-10.4-x86_64.egg), Requirement.parse('dd>=0.2.1'), set(['omega']))
I would expect development versions to be allowed in the context, since pip was told so during installation. Not sure if this issue is pip-only, setuptools-only, or both.
Also, this error doesn't go away if I install omega with pip install --pre dd ..
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the failure in a Python 2.7 environment using the described setup.py install and pip install --pre commands, with a package dependency containing a PEP 440 local version identifier and an entry point. Start by tracing pkg_resources entry-point loading and dependency resolution; done means the installed development dependency is accepted when the entry point is invoked without VersionConflict.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- build-system
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100