-
-
Notifications
You must be signed in to change notification settings - Fork 32.2k
bpo-36770: add feature for shutil.make_archive #13447
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
Conversation
Add support for different ZIP compression method. if you just want to use different zip compression method, no need to rewrite entire _make_zipfile function. e.g. >>> shutil.make_archive('archive', 'zip_lzma', '/path/to/whatever')
Hello, and thanks for your contribution! I'm a bot set up to make sure that the project can legally accept your contribution by verifying you have signed the PSF contributor agreement (CLA). Unfortunately we couldn't find an account corresponding to your GitHub username on bugs.python.org (b.p.o) to verify you have signed the CLA (this might be simply due to a missing "GitHub Name" entry in your b.p.o account settings). This is necessary for legal reasons before we can look at your contribution. Please follow the steps outlined in the CPython devguide to rectify this issue. You can check yourself to see if the CLA has been received. Thanks again for your contribution, we look forward to reviewing it! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for your contribution,
Please, could you check the blurb entry?
@@ -0,0 +1 @@ | |||
Add support for different ZIP compression method in shutil.make_archive. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use the ReST roles, example 👍
Add support for different ZIP compression methods in :func:`shutil.make_archive`
A Python core developer has requested some changes be made to your pull request before we can consider merging it. If you could please address their requests along with any other requests in other reviews from core developers that would be appreciated. Once you have made the requested changes, please leave a comment on this pull request containing the phrase |
d2db621
to
7852d12
Compare
I have made the requested changes; please review again. Also, I use |
Thanks for making the requested changes! @matrixise: please review the changes made to this pull request. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the code changes look fine; they're very tidily done, and will report a ValueError when a bad value of 'compress' is provided. Thanks!
The missing pieces are:
-
the tests in
Lib/test/test_shutil.py
don't exercise the new functionality. It looks like the tests currently invoke each of the differently-compressed tar file formats, so it should try each of the zipfile formats as well. -
The docstring for make_archive() isn't updated by the patch to list the new possible values, and neither is the documentation of the function in
Doc/library/shutil.rst
.
A Python core developer has requested some changes be made to your pull request before we can consider merging it. If you could please address their requests along with any other requests in other reviews from core developers that would be appreciated. Once you have made the requested changes, please leave a comment on this pull request containing the phrase |
https://bugs.python.org/issue36770
Add support for different ZIP compression method.
if you just want to use different zip compression method, no need to rewrite entire _make_zipfile function.
e.g.
https://bugs.python.org/issue36770