-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Attempt to install editable packge defined in constraints should error #2937
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
Conversation
|
I think this is still buggy. The error you look for says to me that the code is trying to install the constrained version. But the users requested actions are actually inconsistent: we can't both install the constrained version and install the editable version. So I think we specifically want an error like the error that occurs if you put the following in a requirements file: |
So its -very- confused. |
tests/data/packages/Local/setup.py
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
rather than making a new one, use singlemodule.
Its in an index in data/packages/ versions 0.0.0 and 0.0.1 and it's source is in data/src/singlemodule. So you can constrain to version 0.0.0 and use -f data/packages --no-index -e src/singlemodule.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's quite a bit cleaner than adding a new package. Done.
|
Hey thats looking super close. I wonder if its possible to make it support this test as well? |
|
\o/ this looks solid to me. @dstufft ? |
|
I'm expecting this to fail. |
Currently if the local package you are trying to install is listed in the constraint file it will silently fail to install the local package while installing its dependancies. This process was caused by the has_requirement returning true when a constraint with that name was defined, resulting in the local package not being processed. Closes #2928
|
Latest change is a rebase to top of develop. Just to get the updated dev-requirements.txt |
When installing an editable from file:///path/to/file, pip currently does not attempt to determine the name from #egg=NAME, just passing back None. This causes constraints code to completely ignore this line resulting in unexpected installation behaviour. This patch makes '-e file:///path#egg=name' function similarly to 'file:///path#egg=name' and '-e git+URL#egg=name'. If #egg=name is not defined, it returns None and the package becomes an unamed requirement, which constraints will not parse but in the case of a requirement will later be processed and determined. Closes #3026
|
After a discussion with lifeless this morning, I found out that putting the controversial patch in a separate branch and create a pull request for it and things will just work. So I've split that off to a new PR. As far as I'm concerned these two are all good to go. |
Attempt to install editable packge defined in constraints should error
Currently if the local package you are trying to install is listed in
the constraint file it will silently fail to install the local package
while installing its dependencies.
This process was caused by the has_requirement returning true when a
constraint with that name was defined, resulting in the local package
not being processed.
Closes #2928