-
-
Notifications
You must be signed in to change notification settings - Fork 422
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
- try a second source for the packaging version in case importlib metadata failed #1656
Conversation
@@ -26,7 +26,6 @@ | |||
from pdm.compat import Distribution, importlib_metadata | |||
|
|||
_egg_fragment_re = re.compile(r"(.*)[#&]egg=[^&]*") | |||
PACKAGING_22 = Version(importlib_metadata.version("packaging")) >= Version("22") |
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.
This variable is also used by tests
IMO this isn't a problem, local versions are not acceptable only in comparing operaters: |
The changes I initially presented here were overkill. The problem which initially triggered me was that pdm does not work in a zipapp since the PACKAGING_22 variable gets constructed, due to a problem getting the version of "packaging". So my initial aproach was to get this variable out -> which works for me. So this is a less invasive suggestion, if importlib metadata fails, lets try a different method. This is similar to the way pdm learns about its own version... Best regards, . |
- fixed type confusion...
for more information, see https://pre-commit.ci
also _ triggers a fail....
Codecov ReportBase: 85.21% // Head: 85.19% // Decreases project coverage by
📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more Additional details and impacted files@@ Coverage Diff @@
## main #1656 +/- ##
==========================================
- Coverage 85.21% 85.19% -0.02%
==========================================
Files 92 92
Lines 8562 8566 +4
Branches 1851 1851
==========================================
+ Hits 7296 7298 +2
- Misses 850 852 +2
Partials 416 416
Flags with carried forward coverage won't be shown. Click here to find out more.
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
Pull Request Checklist
news/
describing what is new.Describe what you have changed in this PR.
This is not a clean ready to merge pull request. This is a proof of concept to.:
1.) deal with wheel versions which include a source control version, like a git hash.
2.) to always deal with unsoported version selectors, regardless of weather this is a necessity or not.
please give it a look. In order to make this mergeable at least.:
a proper way to inform the user about the modification of the specifier is needed.
some tests need to be added/removed/changed