Title: Support `copy()` for `zipfile` · Issue #151824 · python/cpython · GitHub
Open Graph Title: Support `copy()` for `zipfile` · Issue #151824 · python/cpython
X Title: Support `copy()` for `zipfile` · Issue #151824 · python/cpython
Description: Feature or enhancement Proposal: Currently, copying an entry within a ZIP file is cumbersome due to the lack of support for simultaneous reading and writing. The implementer must either: Read the entire entry and write afterwards (which ...
Open Graph Description: Feature or enhancement Proposal: Currently, copying an entry within a ZIP file is cumbersome due to the lack of support for simultaneous reading and writing. The implementer must either: Read the e...
X Description: Feature or enhancement Proposal: Currently, copying an entry within a ZIP file is cumbersome due to the lack of support for simultaneous reading and writing. The implementer must either: Read the e...
Opengraph URL: https://github.com/python/cpython/issues/151824
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Support `copy()` for `zipfile`","articleBody":"# Feature or enhancement\n\n### Proposal:\n\nCurrently, copying an entry within a ZIP file is cumbersome due to the lack of support for simultaneous reading and writing. The implementer must either:\n\n- Read the entire entry and write afterwards (which is memory-intensive and inefficient for large files), or\n- Use a temporary file for buffered copying.\n\nBoth approaches are more complex and less performant, due to the need to decompress and recompress data.\n\nIt would be much more performant and friendly by implementing a `copy()` method, using the similar internal buffered copying technique introduced by #134627 with the internal `_ZipRepacker`.\n\nThis also opens the door to support an efficient `move()` operation, composed of `copy()`, `remove()`, and optionally `repack()`.\n\n\u003c!-- gh-linked-prs --\u003e\n### Linked PRs\n* gh-151825\n\u003c!-- /gh-linked-prs --\u003e\n","author":{"url":"https://github.com/danny0838","@type":"Person","name":"danny0838"},"datePublished":"2026-06-21T00:24:23.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":2},"url":"https://github.com/151824/cpython/issues/151824"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:87865f65-6ed4-8d3f-5421-f0eae6a05526 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | A5CA:1F00E0:23D8F9:30E312:6A533482 |
| html-safe-nonce | b3a41e678a8ac480951e1af55fd86b021c65aa17db5e18137b30c7bce09dd8fe |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBNUNBOjFGMDBFMDoyM0Q4Rjk6MzBFMzEyOjZBNTMzNDgyIiwidmlzaXRvcl9pZCI6IjcyMDA2MzYxNDUyNDc2NjMyMzQiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | b0606e449c6fa803f8ea757e9ac98eca18cc522a36ad70d4aac6483e5389706d |
| hovercard-subject-tag | issue:4708814961 |
| github-keyboard-shortcuts | repository,issues,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/_view_fragments/issues/show/python/cpython/151824/issue_layout |
| twitter:image | https://opengraph.githubassets.com/c7cd06bdcd1a48395f2f5560d88f89bb60f61d378e085a6036de6f84b8f89c8f/python/cpython/issues/151824 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/c7cd06bdcd1a48395f2f5560d88f89bb60f61d378e085a6036de6f84b8f89c8f/python/cpython/issues/151824 |
| og:image:alt | Feature or enhancement Proposal: Currently, copying an entry within a ZIP file is cumbersome due to the lack of support for simultaneous reading and writing. The implementer must either: Read the e... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | danny0838 |
| hostname | github.com |
| expected-hostname | github.com |
| None | b9a586c06a05a7a86fc7e3f4dbd03e42f6869085879aa184aa6369456dbd50fb |
| turbo-cache-control | no-preview |
| 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 |
| disable-turbo | false |
| 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