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

pip resolver searches for target itself and fails #8289

Closed
gaborbernat opened this issue May 21, 2020 · 7 comments · Fixed by #8291
Closed

pip resolver searches for target itself and fails #8289

gaborbernat opened this issue May 21, 2020 · 7 comments · Fixed by #8291
Labels
auto-locked Outdated issues that have been locked by automation type: bug A confirmed bug or unintended behavior

Comments

@gaborbernat
Copy link

gaborbernat commented May 21, 2020

I did not manage to create a small reproducible of this in isolation, however, something is definitely off. Creating a tox test suite fails for virtualenv project:

git clone https://github.com/pypa/virtualenv
env PIP_UNSTABLE_FEATURE="resolver" VIRTUALENV_PIP=20.2b1 tox -re py38 --notest

throws:

env PIP_UNSTABLE_FEATURE="resolver" VIRTUALENV_PIP=20.2b1 tox -re py38 --notest                                                                                                                      .package recreate: /Users/bernat/git/github/virtualenv/.tox/.package
.package installdeps: setuptools >= 41.0.0, wheel >= 0.30.0, setuptools_scm >= 2
py38 recreate: /Users/bernat/git/github/virtualenv/.tox/py38
py38 installdeps: pip >= 20.0.2
py38 inst: /Users/bernat/git/github/virtualenv/.tox/.tmp/package/1/virtualenv-20.0.21.dev10+gc364311.tar.gz
ERROR: invocation failed (exit code 1), logfile: /Users/bernat/git/github/virtualenv/.tox/py38/log/py38-2.log
================================================================================================================================== log start ===================================================================================================================================
Looking in indexes: http://localhost:3141/bernat/bb
Processing ./.tox/.tmp/package/1/virtualenv-20.0.21.dev10+gc364311.tar.gz
  Installing build dependencies: started
  Installing build dependencies: finished with status 'done'
  Getting requirements to build wheel: started
  Getting requirements to build wheel: finished with status 'done'
    Preparing wheel metadata: started
    Preparing wheel metadata: finished with status 'done'
ERROR: Could not find a version that satisfies the requirement virtualenv==20.0.21.dev10+gc364311 (from virtualenv[testing])
ERROR: No matching distribution found for virtualenv

When switching to verbose mode I can see:

Given no hashes to check 0 links for project 'virtualenv': discarding no candidates
ERROR: Could not find a version that satisfies the requirement virtualenv==20.0.21.dev10+gc364311 (from virtualenv[testing])
ERROR: No matching distribution found for virtualenv
Exception information:
Traceback (most recent call last):
  File "/Users/bernat/git/github/virtualenv/.tox/py38/lib/python3.8/site-packages/pip/_internal/resolution/resolvelib/resolver.py", line 136, in resolve
    self._result = resolver.resolve(
  File "/Users/bernat/git/github/virtualenv/.tox/py38/lib/python3.8/site-packages/pip/_vendor/resolvelib/resolvers.py", line 413, in resolve
    state = resolution.resolve(requirements, max_rounds=max_rounds)
  File "/Users/bernat/git/github/virtualenv/.tox/py38/lib/python3.8/site-packages/pip/_vendor/resolvelib/resolvers.py", line 319, in resolve
    raise ResolutionImpossible(causes)
pip._vendor.resolvelib.resolvers.ResolutionImpossible: [RequirementInformation(requirement=SpecifierRequirement('virtualenv==20.0.21.dev10+gc364311'), parent=ExtrasCandidate(base=LinkCandidate('file:///Users/bernat/git/github/virtualenv/.tox/.tmp/package/1/virtualenv-20.0.21.dev10%2Bgc364311.tar.gz'), extras={'testing'}))]
@triage-new-issues triage-new-issues bot added the S: needs triage Issues/PRs that need to be triaged label May 21, 2020
@uranusjr
Copy link
Member

uranusjr commented May 21, 2020

Sounds similar to this section of failures:

https://hackmd.io/TkGB1hPQTcu9y_4JwAtGyA?view#Direct-URL-with-extras

Not sure if we already have a tracking issue for this, so I’m labelling this as a normal bug report.

@uranusjr uranusjr added C: new resolver type: bug A confirmed bug or unintended behavior labels May 21, 2020
@triage-new-issues triage-new-issues bot removed the S: needs triage Issues/PRs that need to be triaged label May 21, 2020
@pradyunsg
Copy link
Member

pradyunsg commented May 21, 2020

This is definitely a case of non-specifier requirement that has extras (similar to .[dev]). I'd argue this isn't a bug as much as it is a TODO for the new resolver. :P

@pfmoore
Copy link
Member

pfmoore commented May 21, 2020

We even have a FIXME comment in the code for it. (Which I'm looking at now. When was the last time I said I hate extras? 🙂)

@gaborbernat
Copy link
Author

I just call all found errors a feature gap compared to the current no dependency resolver 😁 bug or feature, that's detail under the hood. 😎

@pradyunsg
Copy link
Member

(Which I'm looking at now. When was the last time I said I hate extras? 🙂)

More than a day ago, so you can say that again. :)

@gaborbernat
Copy link
Author

When was the last time I said I hate extras?

More than two weeks ago, so definitely allowed again in my case.

@pradyunsg
Copy link
Member

pradyunsg commented May 21, 2020

FWIW, I think have a bugfix branch for this locally, so I'll be filing that sometime next week. (once my college's last report submission is done with)

@lock lock bot added the auto-locked Outdated issues that have been locked by automation label Jun 24, 2020
@lock lock bot locked as resolved and limited conversation to collaborators Jun 24, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
auto-locked Outdated issues that have been locked by automation type: bug A confirmed bug or unintended behavior
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants