Skip to content

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

Closed
wants to merge 2 commits into from

Conversation

OwenChia
Copy link

@OwenChia OwenChia commented May 20, 2019

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.

>>> shutil.make_archive('archive', 'zip_lzma', '/path/to/whatever')

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.
>>> shutil.make_archive('archive', 'zip_lzma', '/path/to/whatever')
@the-knights-who-say-ni
Copy link

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!

Copy link
Member

@matrixise matrixise left a 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.
Copy link
Member

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`

@bedevere-bot
Copy link

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 I have made the requested changes; please review again. I will then notify any core developers who have left a review that you're ready for them to take another look at this pull request.

@OwenChia OwenChia force-pushed the add-features-36770 branch from d2db621 to 7852d12 Compare May 22, 2019 08:41
@OwenChia
Copy link
Author

I have made the requested changes; please review again.

Also, I use git push --force to update, am I doing it right?

@bedevere-bot
Copy link

Thanks for making the requested changes!

@matrixise: please review the changes made to this pull request.

@csabella csabella requested a review from akuchling January 25, 2020 20:23
Copy link
Contributor

@akuchling akuchling left a 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.

@bedevere-bot
Copy link

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 I have made the requested changes; please review again. I will then notify any core developers who have left a review that you're ready for them to take another look at this pull request.

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.

7 participants