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

ResolutionImpossible errors in requirements mode #197

Closed
woodruffw opened this issue Dec 7, 2021 · 1 comment
Closed

ResolutionImpossible errors in requirements mode #197

woodruffw opened this issue Dec 7, 2021 · 1 comment
Assignees
Labels
bug Something isn't working component:dep-sources Dependency sources pri:high High(er) priority tasks

Comments

@woodruffw
Copy link
Member

This is a follow-on from #159, which got closed because the surface-level bug was fixed.

Reproduction steps:

  1. Create a requirements.txt that looks like this:

    pip-audit==1.1.1
    
  2. Run pip-audit -r requirements.txt

  3. Observe the error:

Traceback (most recent call last):
  File "/Users/william/devel/pip-audit/env/bin/pip-audit", line 33, in <module>
    sys.exit(load_entry_point('pip-audit', 'console_scripts', 'pip-audit')())
  File "/Users/william/devel/pip-audit/pip_audit/_cli.py", line 268, in audit
    for (spec, vulns) in auditor.audit(source):
  File "/Users/william/devel/pip-audit/pip_audit/_audit.py", line 60, in audit
    yield from self._service.query_all(specs)
  File "/Users/william/devel/pip-audit/pip_audit/_service/interface.py", line 115, in query_all
    for spec in specs:
  File "/Users/william/devel/pip-audit/pip_audit/_dependency_source/requirement.py", line 63, in collect
    for _, deps in self.resolver.resolve_all(iter(req_values)):
  File "/Users/william/devel/pip-audit/pip_audit/_dependency_source/interface.py", line 67, in resolve_all
    yield (req, self.resolve(req))
  File "/Users/william/devel/pip-audit/pip_audit/_dependency_source/resolvelib/resolvelib.py", line 53, in resolve
    result = self.resolver.resolve([req])
  File "/Users/william/devel/pip-audit/env/lib/python3.10/site-packages/resolvelib/resolvers.py", line 481, in resolve
    state = resolution.resolve(requirements, max_rounds=max_rounds)
  File "/Users/william/devel/pip-audit/env/lib/python3.10/site-packages/resolvelib/resolvers.py", line 385, in resolve
    raise ResolutionImpossible(self.state.backtrack_causes)
resolvelib.resolvers.ResolutionImpossible: [RequirementInformation(requirement=<Requirement('setuptools==57.4.0')>, parent=<progress==1.6 wheel=False>), RequirementInformation(requirement=<Requirement('setuptools<51.0.0,>=50.3.2')>, parent=<cyclonedx-python-lib==0.11.1 wheel=True>)]
@woodruffw
Copy link
Member Author

Just tried repro-ing this and couldn't, with either of these requirements.txt inputs:

pip-audit==1.1.1

or:

pip-audit==2.1.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working component:dep-sources Dependency sources pri:high High(er) priority tasks
Projects
None yet
Development

No branches or pull requests

2 participants