Support `copy()` for `zipfile`
まだ誰も着手していません。
- 主要言語
- Python
- スター
- 77.2k
- フォーク
- 35.9k
- PR マージ指標
- PR 指標を取得中
説明
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 is memory-intensive and inefficient for large files), or
- Use a temporary file for buffered copying.
Both approaches are more complex and less performant, due to the need to decompress and recompress data.
It 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.
This also opens the door to support an efficient move() operation, composed of copy(), remove(), and optionally repack().
Linked PRs
- gh-151825
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
まず、zipfile モジュールのエントリと、issue #134627 で導入された内部アプローチ _ZipRepacker を読みます。この変更では、アーカイブを読み書き用に開いたままエントリを効率的にコピーできるようにし、実装前に動作とエッジケースを確立する必要があります。リンクされた PR gh-151825 は、作業がすでに進行中であることを示しています。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- python
- 領域
- tooling
- issue の種類
- 機能追加
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 25/100