Improve ResolutionImpossible error message clarity#13702
Open
nishtha-agarwal-211 wants to merge 6 commits intopypa:mainfrom
Open
Improve ResolutionImpossible error message clarity#13702nishtha-agarwal-211 wants to merge 6 commits intopypa:mainfrom
nishtha-agarwal-211 wants to merge 6 commits intopypa:mainfrom
Conversation
Member
|
Thanks for your PR, I'm pretty good with this change but I'll do a more detailed review of the language when I get a moment. Currently CI checks are failing due too long line lengths, you will need to fix this, you can run CI checks locally to assist if you want: https://pip.pypa.io/en/stable/development/getting-started/#running-linters |
Author
|
Thanks for the review! I’ve fixed the line-length issues and all CI checks are now passing. Happy to make any further wording adjustments if needed. |
notatallshaw
requested changes
Mar 7, 2026
Comment on lines
+839
to
+851
| logger.info(msg) | ||
|
|
||
| return DistributionNotFound( | ||
| "ResolutionImpossible: for help visit " | ||
| "https://pip.pypa.io/en/latest/topics/dependency-resolution/" | ||
| "#dealing-with-dependency-conflicts" | ||
| "ResolutionImpossible: pip could not resolve the requested " | ||
| "dependencies.\n\n" | ||
| "This usually means you have conflicting version constraints.\n\n" | ||
| "You can try:\n" | ||
| " - loosening the range of package versions you specified\n" | ||
| " - removing package versions to allow pip to resolve the conflict\n" | ||
| " - running pip with --verbose for more details\n\n" | ||
| "See https://pip.pypa.io/en/stable/user_guide/" | ||
| "#fixing-conflicting-dependencies " | ||
| "for help." |
Member
There was a problem hiding this comment.
The logger.info message directly above this exception already gives a lot of this information, I think that would be a better place to put any additional information.
144f0d2 to
1278dc7
Compare
Per notatallshaw's review comment, the logger.info message directly above the exception is a better place for additional guidance. Move the help URL into the logged message and revert DistributionNotFound to the original concise format.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
Improves the
ResolutionImpossibleerror message by making it clearer and more actionable for users encountering dependency resolution conflicts.What changed?
Why is this change useful?
This improves the developer experience by:
Related issue / discussion
N/A