-
Notifications
You must be signed in to change notification settings - Fork 3.1k
fix(pip/req/req_set): Dont err on double reqs of the same spec #3372
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
fix(pip/req/req_set): Dont err on double reqs of the same spec #3372
Conversation
Seems ok, a test would be nice :) |
362f19f
to
bb6eb0c
Compare
…e specs, dont raise a double requirement given error
bb6eb0c
to
fbfa7fb
Compare
@xavfernandez I have complied with your demands; merge away! Or make more demands of this pr and I will most likely comply |
fix(pip/req/req_set): Dont err on double reqs of the same spec
Thanks :) |
Any word on when this will make it into an official release? |
@kaustavha This still doesn't work for me. I have a |
@nikolay Sorry for the late reply. If I am understanding you correctly, youre trying to do something slightly different than what I wrote here. Take a look at the test case in the pr. So case 1:
req-common.txt
In this case, pip cannot safely decide which version to pull. Now case 2: req.txt
req-common.txt
In this case, the code in this PR will check that both of the versions match and are consistent. Pip doesn't need to do any guessing, we've used the same version throughout. So instead of complaining and saying the requirement was specified twice it carries onto the next step. Furthermore you can take a look at how deps are set up on this project. |
What is |
its just an example of a dependency, so for example |
If double requirements exist with the same specs, dont raise a double requirement given error.
My reasoning is that if the user has the same version specified in more than one place this is an unnecessary level of hand holding and this error prevents people from writing more modular requirements.txts more than it prevents bugs.
If separate versions exist multiple times it makes sense to error out/ use a dependency resolver as discussed in #988 .
Fixes #993.
This does not affect #2367.
This is not related to #1658. I've noticed that if two git+... links are given with different egg names this code block doesn't affect them and it will happily install them even without the req.specs check. Checked on py 3.5.1 and 2.7.10.