Created on 2015-01-16 19:55 by serhiy.storchaka, last changed 2016-02-02 17:23 by serhiy.storchaka. This issue is now closed.
| Files | ||||
|---|---|---|---|---|
| File name | Uploaded | Description | Edit | |
| zipfile_write_unseekable.patch | serhiy.storchaka, 2015-02-01 17:16 | review | ||
| Messages (6) | |||
|---|---|---|---|
| msg234145 - (view) | Author: Serhiy Storchaka (serhiy.storchaka) * | Date: 2015-01-16 19:55 | |
ZIP files can be created to transfer it via unseekable streams (pipes, sockets). Mercurial uses a workaround to write ZIP files right to wsgirequest, but this is possible only with writestr(). write() needs seek() to updated file size, compressed sized and CRC. However ZIP file format supports streamed data without writing sizes and CRC before file data. It is possible and desirable to add full support of unseekable output files in zipfile. |
|||
| msg235184 - (view) | Author: Serhiy Storchaka (serhiy.storchaka) * | Date: 2015-02-01 17:16 | |
Here is a patch. Mercurial wouldn't need a wrapper in Python 3.5. |
|||
| msg236360 - (view) | Author: Serhiy Storchaka (serhiy.storchaka) * | Date: 2015-02-21 10:22 | |
Could you please make a review of the documentation part of the patch David? |
|||
| msg238951 - (view) | Author: Roundup Robot (python-dev) | Date: 2015-03-22 23:10 | |
New changeset 19f36a2a34ec by Serhiy Storchaka in branch 'default': Issue #23252: Added support for writing ZIP files to unseekable streams. https://hg.python.org/cpython/rev/19f36a2a34ec |
|||
| msg259274 - (view) | Author: Patrik Dufresne (Patrik Dufresne) | Date: 2016-01-31 02:10 | |
While this path provide support to create Zip file for non-seekable stream. It doesn't support reading a file from a non-seekable stream. |
|||
| msg259406 - (view) | Author: Serhiy Storchaka (serhiy.storchaka) * | Date: 2016-02-02 17:23 | |
Currently the zipfile module requires seekable stream to read a list of entries from central directory at the end of ZIP file, and for reding their content in arbitrary order. The support of unseekable stream needs to design a new API. This is separate issue. |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2016-02-02 17:23:08 | serhiy.storchaka | set | messages: + msg259406 |
| 2016-01-31 02:10:46 | Patrik Dufresne | set | nosy:
+ Patrik Dufresne messages: + msg259274 |
| 2015-03-23 08:35:07 | serhiy.storchaka | set | status: open -> closed resolution: fixed stage: patch review -> resolved |
| 2015-03-22 23:10:36 | python-dev | set | nosy:
+ python-dev messages: + msg238951 |
| 2015-02-21 10:22:18 | serhiy.storchaka | set | nosy:
+ r.david.murray messages: + msg236360 |
| 2015-02-01 17:16:27 | serhiy.storchaka | set | files:
+ zipfile_write_unseekable.patch nosy:
+ Matt.Mackall keywords:
+ patch |
| 2015-01-16 19:55:48 | serhiy.storchaka | create | |