bpo-31072: Add filter to zipapp#3021
Merged
pfmoore merged 4 commits intopython:masterfrom Aug 9, 2017
Merged
Conversation
pfmoore
requested changes
Aug 8, 2017
Member
pfmoore
left a comment
There was a problem hiding this comment.
In addition to the 2 noted points, the travis check failed with a report of whitespace issues, and the documentation needs to be updated.
|
|
||
| def create_archive(source, target=None, interpreter=None, main=None): | ||
| def create_archive(source, target=None, interpreter=None, main=None, | ||
| include_file=None): |
| for child in source.rglob('*'): | ||
| arcname = child.relative_to(source).as_posix() | ||
| z.write(child, arcname) | ||
| if include_file is None or include_file(pathlib.Path(child)): |
Member
There was a problem hiding this comment.
The include_file check should take arcfile as argument - specifically it should be passed a path that is relative to the source directory.
Member
|
Thanks for the PR on this - I've made a couple of comments that need to be addressed, but basically the change looks good. I'm going to be unable to get back to this for a week or so, so if I don't comment any further for a while, don't worry - I will get back to it! |
Member
|
I've added a NEWS entry to your PR. Otherwise, this looks good to go. |
pfmoore
approved these changes
Aug 9, 2017
Member
|
Thanks for the contribution! |
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.
https://bugs.python.org/issue31072