Title: gh-151824: Add `copy()` to `ZipFile` by danny0838 · Pull Request #151825 · python/cpython · GitHub
Open Graph Title: gh-151824: Add `copy()` to `ZipFile` by danny0838 · Pull Request #151825 · python/cpython
X Title: gh-151824: Add `copy()` to `ZipFile` by danny0838 · Pull Request #151825 · python/cpython
Description: Following the remove() and repack() introduced by #134627, add copy() for performant member copying in a ZIP file. Moving a member can also be done as a combination of copy(), remove(), and repack() like: with ZipFile('spam.zip', 'a') as myzip: myzip.repack([myzip.remove(myzip.copy('old.txt', 'new.txt'))]) which is required since the filename is stored within the member's local file entry and thus need a gross rewriting. Issue: gh-151824
Open Graph Description: Following the remove() and repack() introduced by #134627, add copy() for performant member copying in a ZIP file. Moving a member can also be done as a combination of copy(), remove(), and repack(...
X Description: Following the remove() and repack() introduced by #134627, add copy() for performant member copying in a ZIP file. Moving a member can also be done as a combination of copy(), remove(), and repack(...
Opengraph URL: https://github.com/python/cpython/pull/151825
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:4c8dd43f-c997-ab74-892b-9f81267a6e95 |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | BA9A:290D1F:132E08F:19FC1BC:6A5348D3 |
| html-safe-nonce | 56e6e78b94587af60502e9914c9fdcb8b8ad90238165a02c9c17c0df7059befb |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCQTlBOjI5MEQxRjoxMzJFMDhGOjE5RkMxQkM6NkE1MzQ4RDMiLCJ2aXNpdG9yX2lkIjoiNTU5NzMwOTk3NDc1ODg3MzE1IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 66f2ca80d66ec103bc6c8158bb03cafcb94749d974bed619f6bd3712fa6b68d2 |
| hovercard-subject-tag | pull_request:3905427468 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/python/cpython/pull/151825/files |
| twitter:image | https://avatars.githubusercontent.com/u/531417?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/531417?s=400&v=4 |
| og:image:alt | Following the remove() and repack() introduced by #134627, add copy() for performant member copying in a ZIP file. Moving a member can also be done as a combination of copy(), remove(), and repack(... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | b9a586c06a05a7a86fc7e3f4dbd03e42f6869085879aa184aa6369456dbd50fb |
| turbo-cache-control | no-preview |
| diff-view | unified |
| go-import | github.com/python/cpython git https://github.com/python/cpython.git |
| octolytics-dimension-user_id | 1525981 |
| octolytics-dimension-user_login | python |
| octolytics-dimension-repository_id | 81598961 |
| octolytics-dimension-repository_nwo | python/cpython |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 81598961 |
| octolytics-dimension-repository_network_root_nwo | python/cpython |
| turbo-body-classes | logged-out env-production page-responsive full-width |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 07a982c1d40157c619b364352b704c3ce66bb332 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width