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

Can't resolve moto[server] #1717

Closed
maxfenv opened this issue Nov 7, 2022 · 4 comments
Closed

Can't resolve moto[server] #1717

maxfenv opened this issue Nov 7, 2022 · 4 comments
Labels
resolver Related to dependency resolver

Comments

@maxfenv
Copy link
Contributor

maxfenv commented Nov 7, 2022

pip-compile fails to resolve moto[server]

Environment Versions

  1. Arch Linux (6.0.6-arch1-1)
  2. Python version: Python 3.10.8
  3. pip version: 22.3.1
  4. pip-tools version: 6.9.0

Steps to replicate

Requirements file that breaks:

$ cat requirements/development.in
moto[server]<5

Requirements file that works:

$ cat requirements/development.in
moto[server]<5
openapi-spec-validator==0.4.0  # Ugh, required to get pip-tools to resolve deps for moto[server]

Expected result

It should correctly figure out that openapi-spec-validator==0.4.0 is required

Actual result

$ pip-compile requirements/development.in
Could not find a version that matches jsonschema<5.0.0,>=3.0,>=4.0.0,~=3.2 (from cfn-lint==0.71.0->moto[server]==4.0.9->-r requirements/development.in (line 1))
Tried: 0.2, 0.2, 0.3, 0.3, 0.4, 0.4, 0.5, 0.5, 0.6, 0.6, 0.7, 0.7, 0.8.0, 0.8.0, 1.0.0, 1.0.0, 1.1.0, 1.1.0, 1.2.0, 1.2.0, 1.3.0, 1.3.0, 2.0.0, 2.0.0, 2.1.0, 2.1.0, 2.2.0, 2.2.0, 2.3.0, 2.3.0, 2.3.0, 2.4.0, 2.4.0, 2.4.0, 2.5.0, 2.5.0, 2.5.1, 2.5.1, 2.5.1, 2.6.0, 2.6.0, 3.0.0, 3.0.0, 3.0.1, 3.0.1, 3.0.2, 3.0.2, 3.1.0, 3.1.0, 3.1.1, 3.1.1, 3.2.0, 3.2.0, 4.0.0, 4.0.0, 4.0.1, 4.0.1, 4.1.0, 4.1.0, 4.1.1, 4.1.1, 4.1.2, 4.1.2, 4.2.0, 4.2.0, 4.2.1, 4.2.1, 4.3.0, 4.3.0, 4.3.1, 4.3.1, 4.3.2, 4.3.2, 4.3.3, 4.3.3, 4.4.0, 4.4.0, 4.5.0, 4.5.0, 4.5.1, 4.5.1, 4.6.0, 4.6.0, 4.6.1, 4.6.1, 4.6.2, 4.6.2, 4.7.0, 4.7.0, 4.7.1, 4.7.1, 4.7.2, 4.7.2, 4.8.0, 4.8.0, 4.9.0, 4.9.0, 4.9.1, 4.9.1, 4.10.0, 4.10.0, 4.10.1, 4.10.1, 4.10.2, 4.10.2, 4.10.3, 4.10.3, 4.11.0, 4.11.0, 4.12.0, 4.12.0, 4.12.1, 4.12.1, 4.13.0, 4.13.0, 4.14.0, 4.14.0, 4.15.0, 4.15.0, 4.16.0, 4.16.0, 4.17.0, 4.17.0
Skipped pre-versions: 0.1a0, 3.0.0a1, 3.0.0a1, 3.0.0a2, 3.0.0a2, 3.0.0a3, 3.0.0a3, 3.0.0a4, 3.0.0a4, 3.0.0a5, 3.0.0a5, 3.0.0a6, 3.0.0a6, 3.0.0b1, 3.0.0b1, 3.0.0b2, 3.0.0b2, 3.0.0b3, 3.0.0b3, 4.0.0a1, 4.0.0a1, 4.0.0a2, 4.0.0a2, 4.0.0a3, 4.0.0a3, 4.0.0a4, 4.0.0a4, 4.0.0a5, 4.0.0a5, 4.0.0a6, 4.0.0a6, 4.1.0a1, 4.1.0a1
There are incompatible versions in the resolved dependencies:
  jsonschema<5.0.0,>=4.0.0 (from openapi-schema-validator==0.3.4->openapi-spec-validator==0.5.1->moto[server]==4.0.9->-r requirements/development.in (line 1))
  jsonschema<5,>=3.0 (from cfn-lint==0.71.0->moto[server]==4.0.9->-r requirements/development.in (line 1))
  jsonschema<5.0.0,>=4.0.0 (from openapi-spec-validator==0.5.1->moto[server]==4.0.9->-r requirements/development.in (line 1))
  jsonschema<5.0.0,>=4.0.0 (from jsonschema-spec==0.1.2->openapi-spec-validator==0.5.1->moto[server]==4.0.9->-r requirements/development.in (line 1))
  jsonschema~=3.2 (from aws-sam-translator==1.53.0->cfn-lint==0.71.0->moto[server]==4.0.9->-r requirements/development.in (line 1))
@AndydeCleyre
Copy link
Contributor

Thanks!

I can reproduce this with the default legacy resolver, but not with the new and recommended backtracking resolver. Please try with --resolver=backtracking.

The next major release will make the backtracking resolver the default.

@atugushev atugushev added the resolver Related to dependency resolver label Nov 7, 2022
@AndydeCleyre
Copy link
Contributor

@atugushev

As this is a common occurrence, do you think we ought to add the suggestion to try --resolver=backtracking to the error message?

@atugushev
Copy link
Member

@AndydeCleyre that's a good idea!

@maxfenv
Copy link
Contributor Author

maxfenv commented Nov 7, 2022

Yeah I had a feeling it was something like this!

Many thanks for the rapid response, can confirm it works with pip-compile --upgrade --resolver=backtracking requirements/development.in

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

No branches or pull requests

3 participants