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

WheelFile extract does not preserve permissions #608

Closed
gilfree opened this issue Apr 2, 2024 · 4 comments
Closed

WheelFile extract does not preserve permissions #608

gilfree opened this issue Apr 2, 2024 · 4 comments

Comments

@gilfree
Copy link

gilfree commented Apr 2, 2024

In issue #514, the command line for wheel unpack was fixed to preserve executable bit for files.

# Set permissions to the same values as they were set in the archive

But this issue still exists when extracting files programmatically.

For example:

wheel = WheelFile(wheel_path)
wheel.extractall(temp_dir )

The issue is of course rooted in the same problem. As extractall and extract methods inherit from zipfile.

Maybe it will be better to override these methods for WheelFile and fix the permissions issue there, instead of in the unpack command?

Will you be open for a PR for such a change?

@agronholm
Copy link
Contributor

There's the fundamental, underlying issue of the wheel standard not having explicit support for file permissions (as those are platform specific). I'm personally convinced that such support would be useful, but I think it needs to be added to the standard. I don't have the bandwidth available to drive such a change myself though.

@gilfree
Copy link
Author

gilfree commented Apr 3, 2024

Will you be open to a PR that will apply the same fix as in unpack, to make the behavior the same?

@agronholm
Copy link
Contributor

Will you be open to a PR that will apply the same fix as in unpack, to make the behavior the same?

Yeah, sure.

@agronholm
Copy link
Contributor

Closing as the wheel.WheelFile API is not really public or documented, and there's a proper one being (slowly) worked on. Sorry about the confusion.

@agronholm agronholm closed this as not planned Won't fix, can't repro, duplicate, stale Nov 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants