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

Use pkgutil.get_data for zip-safe resource loading #2974

Closed

Conversation

sinoroc
Copy link

@sinoroc sinoroc commented Sep 25, 2020

When installed in a Zip file (zipapp, *.pyz) loading resources
from package data can not be done by directly reading files relative
to __file__, since there is no valid path on the file system for
zipped files.

Using 'pkgutil.get_data' ensures that loading files from a Zip archive
is handled accordingly.

Resolves: #2965

When installed in a Zip file ('zipapp', '*.pyz') loading resources
from package data can not be done by directly reading files relative
to '__file__', since there is no valid path on the file system for
zipped files.

Using 'pkgutil.get_data' ensures that loading files from a Zip archive
is handled accordingly.

GitHub: python-poetry#2965
@sinoroc
Copy link
Author

sinoroc commented Sep 25, 2020

Bug fixes go only on master right now.

@sinoroc sinoroc closed this Sep 25, 2020
@sinoroc sinoroc deleted the zip-safe-loading-of-package-data branch September 25, 2020 15:59
Copy link

github-actions bot commented Mar 1, 2024

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 1, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant