-
-
Notifications
You must be signed in to change notification settings - Fork 404
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
chore(lib): enhance warning message #2523
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suspect that you may have made this information overly complicated in order to alleviate some possible panic. And that is not correct either.
We just iterate through each version of the package and see if the python range is compatible, but you call them all as "latest available version" , this is not the case, apparently.
src/pdm/models/repositories.py
Outdated
@@ -196,9 +196,13 @@ def python_specifier(spec: str | PySpecSet) -> str: | |||
if working_requires_python.is_impossible: # pragma: no cover | |||
continue | |||
warnings.warn( | |||
f"Skipping {candidate.name}@{candidate.version} because it requires " | |||
f"Could not install the latest available version for {candidate.name} " |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But it may not be the latest version, this is not accurate.
This is what I was skeptical about, thanks for clarifying. I updated the message. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #2523 +/- ##
=======================================
Coverage 84.63% 84.63%
=======================================
Files 104 104
Lines 10345 10345
Branches 2262 2262
=======================================
Hits 8756 8756
Misses 1116 1116
Partials 473 473
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
Closes #2522.
Pull Request Checklist
[ ] A news fragment is added inN/Anews/
describing what is new.[ ] Test cases added for changed code.N/A (?)Describe what you have changed in this PR.
As discussed in #2522, the warning message is a bit misleading because the installation proceeds correctly, so this PR modifies the message to reflect that.