fix: call make_file_executable with a Path#3764
Merged
frostming merged 1 commit intopdm-project:mainfrom Apr 10, 2026
Merged
Conversation
Collaborator
|
Oh, we should use our own version of that function instead of relying on installer internals. Can you make that change? |
5d81412 to
f807612
Compare
Contributor
Author
Updated, ptal. |
f807612 to
fb21e45
Compare
Avoid using the installer.utils internal implementation. An implementation detail, the implemented make_file_executable works similar to invoking chmod +x $file, while the previously used installer's version was similar to invoking chmod 755 $file.
fb21e45 to
59011ab
Compare
frostming
approved these changes
Apr 10, 2026
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #3764 +/- ##
=======================================
Coverage 86.13% 86.14%
=======================================
Files 118 118
Lines 12417 12420 +3
Branches 2075 2075
=======================================
+ Hits 10696 10699 +3
Misses 1150 1150
Partials 571 571
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
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.
The make_file_executable function provided by pypa/installer only works for Path objects. as it uses it's chmod method directly.
Both uses in pdm are passing an str, thus hitting this code produces tracebacks similar to:
This can be solved either changing the invocations of make_file_executable in pdm or adding or own version. The updated version of this pr adds the make_file_executable function to pdm.utils.