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

Wrong dependency version derivation #384

Closed
peterdemin opened this issue Aug 8, 2016 · 2 comments
Closed

Wrong dependency version derivation #384

peterdemin opened this issue Aug 8, 2016 · 2 comments

Comments

@peterdemin
Copy link
Contributor

pip-compile fails to derive dependency version if different versions of package C are required by different versions of package B with an older version of B derived in the first round.

Here is the example:

First round:

Latest version of package A==2 requires old package B==1
Latest version of package B requires C==2

Second round:

B==1 requires C==1

Third round

C==1,2 fails to resolve.

I simplified things, but here is actual output if you are interested:

$ pip-compile -vvv --output-file requirements.txt requirements.txt.in -rU | grep -e django-ncbi-auth -e ncbi-myncbi-account -e django-ncbi-admin
  django-ncbi-admin
  django-ncbi-auth
  found candidate django-ncbi-admin==2.0.3 (constraint was <any>)
  found candidate django-ncbi-auth==5.1 (constraint was <any>)
  django-ncbi-admin==2.0.3 not in cache, need to check index
  django-ncbi-admin==2.0.3  requires django-ncbi-auth~=4.4.0, django<1.10.0,>=1.7.0
  django-ncbi-auth==5.1 not in cache, need to check index
  django-ncbi-auth==5.1     requires django<1.10,>=1.7, ipcalc~=1.99, ncbi-myncbi-account~=6.0
  adding django-ncbi-auth~=4.4.0
  adding ncbi-myncbi-account~=6.0
  django-ncbi-admin
  django-ncbi-auth~=4.4.0
  ncbi-myncbi-account~=6.0
  found candidate django-ncbi-admin==2.0.3 (constraint was <any>)
  found candidate django-ncbi-auth==4.4 (constraint was ~=4.4.0)
  found candidate ncbi-myncbi-account==6.0 (constraint was ~=6.0)
  django-ncbi-admin==2.0.3  requires django-ncbi-auth~=4.4.0, django<1.10.0,>=1.7.0
  django-ncbi-auth==4.4 not in cache, need to check index
  django-ncbi-auth==4.4     requires django<1.10,>=1.7, ipcalc~=1.99, ncbi-myncbi-account~=5.0
  ncbi-myncbi-account==6.0 not in cache, need to check index
  ncbi-myncbi-account==6.0  requires lxml~=3.4, ncbi-tx~=5.0, six
  adding ncbi-myncbi-account~=5.0
  django-ncbi-admin
  django-ncbi-auth~=4.4.0
  ncbi-myncbi-account~=5.0,~=6.0
  found candidate django-ncbi-admin==2.0.3 (constraint was <any>)
  found candidate django-ncbi-auth==4.4 (constraint was ~=4.4.0)
Could not find a version that matches ncbi-myncbi-account~=5.0,~=6.0
Tried: 1.0, 1.1, 1.1, 2.0, 2.0.1, 2.0.1, 2.0.1.post11+f5a85a6, 3.0, 3.0, 4.0, 4.0, 5.0, 5.0, 6.0, 6.0
Expected result

I expected, that the requirements of chosen B==1 on C will override requirements from B==2.

Actual result

But currently, they are combined resulting in impossible version requirements.

@davidovich
Copy link
Contributor

Can you verify if this is still the case in 1.8.1 ? I think I may have fixed your issue in #450. Thanks.

@peterdemin
Copy link
Contributor Author

I confirm. Version 1.8.0 failed on my requirements.txt.in. But after upgrade to 1.8.1 pip-compile resolved dependencies correctly.
Nice work! Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants