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

bpo-33151: Handle submodule resources #6268

Merged
merged 1 commit into from
Mar 27, 2018
Merged

Conversation

warsaw
Copy link
Member

@warsaw warsaw commented Mar 27, 2018

Submodule resources in zip files was semi-broken. This adds tests and should fix the problem.

try:
return BytesIO(self.zipimporter.get_data(path))
except OSError:
raise FileNotFoundError
raise FileNotFoundError(path)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe use the repr() to help identify potentially odd things like whitespace issues?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought about that, but I wanted the actual path string as the argument to the exception. I guess it's not that big a deal either way.

@warsaw warsaw merged commit 30e507d into python:master Mar 27, 2018
@miss-islington
Copy link
Contributor

Thanks @warsaw for the PR 🌮🎉.. I'm working now to backport this PR to: 3.7.
🐍🍒⛏🤖

@bedevere-bot
Copy link

GH-6270 is a backport of this pull request to the 3.7 branch.

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Mar 27, 2018
(cherry picked from commit 30e507d)

Co-authored-by: Barry Warsaw <[email protected]>
@warsaw warsaw deleted the issue33151 branch March 27, 2018 17:05
warsaw added a commit that referenced this pull request Mar 27, 2018
(cherry picked from commit 30e507d)

Co-authored-by: Barry Warsaw <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants