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

Exclude a known incompatible installed candidate #9993

Merged

Conversation

uranusjr
Copy link
Member

The resolver collects previously known incompatibilites and sends them to the provider. But previously the provider does not correctly exclude the currently-installed candidate if it is present in that incompatibility list, causing the resolver to enter a loop trying that same candidate.

This patch correctly applies incompat_ids when producing an AlreadyInstalledCandidate to exclude it if its id() is in the set.

I’m hesitant to add a test since it would hang the entire test suite if it fails. Is there a way to set a timeout on a pip call instead?

Fix #9841.

The resolver collects previously known incompatibilites and sends them
to the provider. But previously the provider does not correctly exclude
the currently-installed candidate if it is present in that
incompatibility list, causing the resolver to enter a loop trying that
same candidate. This patch correctly applies incompat_ids when producing
an AlreadyInstalledCandidate and exclude it if its id() is in the set.
@uranusjr uranusjr force-pushed the exclude-installed-candidate-if-incompatible branch from e528acf to d18ac62 Compare May 18, 2021 15:00
@uranusjr
Copy link
Member Author

cc @nmgeek @junpuf

@uranusjr uranusjr closed this May 18, 2021
@uranusjr uranusjr reopened this May 18, 2021
@uranusjr uranusjr closed this May 19, 2021
@uranusjr uranusjr reopened this May 19, 2021
@uranusjr uranusjr added this to the 21.1.2 milestone May 19, 2021
@sbidoul
Copy link
Member

sbidoul commented May 21, 2021

I'd like to do the last 21.1 bugfix release this weekend. Is this one good to go ?

@uranusjr
Copy link
Member Author

Implementation-wise yes. Let me add a test, it’s better to have one that hangs the entire test suite than none at all.

@uranusjr
Copy link
Member Author

Done, waiting for CI…

@uranusjr uranusjr merged commit cb30133 into pypa:main May 22, 2021
@uranusjr uranusjr deleted the exclude-installed-candidate-if-incompatible branch May 22, 2021 12:49
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 29, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

pip 21.1 fails with ResolutionTooDeep while 21.0.1 exits with clear error
2 participants