Roundup Robot devn...@psf.upfronthosting.co.za added the comment:
New changeset 028e8e0b03e8 by Martin v. Löwis in branch 'default':
Issue #14371: Support bzip2 in zipfile module.
http://hg.python.org/cpython/rev/028e8e0b03e8
--
nosy: +python-dev
___
Martin v. Löwis mar...@v.loewis.de added the comment:
Thanks for the patch!
--
resolution: - fixed
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14371
___
Serhiy Storchaka storch...@gmail.com added the comment:
What's the status of your contrib form?
Oops. I put this off for a detailed study and forgotten.
I will send the form, as only get to the printer and the scanner.
--
___
Python tracker
Serhiy Storchaka storch...@gmail.com added the comment:
Perhaps because your system's memory allocator is extremely good (or buf is
always very small), but b''.join() is far more robust.
Another alternative is accumulating in a bytearray, since it uses
overallocation for linear time
Antoine Pitrou pit...@free.fr added the comment:
`buf += data` is noticeably faster `b''.join()` in CPython.
Perhaps because your system's memory allocator is extremely good (or buf is
always very small), but b''.join() is far more robust.
Another alternative is accumulating in a bytearray,
Changes by Jesús Cea Avión j...@jcea.es:
--
nosy: +jcea
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14371
___
___
Python-bugs-list mailing list
Martin v. Löwis mar...@v.loewis.de added the comment:
What's the status of your contrib form?
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14371
___
Nadeem Vawda nadeem.va...@gmail.com added the comment:
[Adding Alan McIntyre, who is listed as zipfile's maintainer.]
I haven't yet had a chance to properly familiarize myself with the
zipfile module, but I did notice an issue in the changes to ZipExtFile's
read() method. The existing code
Serhiy Storchaka storch...@gmail.com added the comment:
The existing code uses the b.join() idiom for linear-
time concatenation, but the patch replaces it with a version that does
buf += data after each read.
You made a mess. The existing code uses ``buf += data``, but I allowed myself
to
Nadeem Vawda nadeem.va...@gmail.com added the comment:
You made a mess. The existing code uses ``buf += data``, but I allowed myself
to replace it with the ``b.join()`` idiom. The bzip2 codec has to deal with
large pieces of data, now this may be important. In read1 still used ``buf +=
Serhiy Storchaka storch...@gmail.com added the comment:
Fixed regeression in decompression.
Nadeem Vawda, we both were wrong. `buf += data` is noticeably faster
`b''.join()` in CPython.
--
Added file: http://bugs.python.org/file25006/bzip2_in_zip_3.patch
Serhiy Storchaka storch...@gmail.com added the comment:
All errors are fixed. All tests are passed. Unfortunately, the patch was more
than expected. This is necessary for correct and effective work with large
bzip2 buffers (for other codecs can also be a profit).
--
Added file:
Changes by Antoine Pitrou pit...@free.fr:
--
nosy: +nadeem.vawda
stage: - patch review
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14371
___
Serhiy Storchaka storch...@gmail.com added the comment:
Thanks to the tests, I found the error. Since the bzip2 is block algorithm,
decompressor need to eat a certain amount of data, so it began to return data.
Now when reading small chunks turns out premature end of data. I'm working on a
Changes by Serhiy Storchaka storch...@gmail.com:
Added file: http://bugs.python.org/file24982/bzip2_in_zip_tests.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14371
___
New submission from Serhiy Storchaka storch...@gmail.com:
ZIP File Format Specification
(http://www.pkware.com/documents/casestudies/APPNOTE.TXT) supports bzip2
compression since at least 2003. Since bzip2 contained in Python standart
library, it would be nice to add support for these method
Changes by Martin v. Löwis mar...@v.loewis.de:
Added file: http://bugs.python.org/file24964/bzip2_in_zip_review.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14371
___
Martin v. Löwis mar...@v.loewis.de added the comment:
Can you please submit a contributor form?
http://python.org/psf/contrib/contrib-form/
http://python.org/psf/contrib/
--
nosy: +loewis
___
Python tracker rep...@bugs.python.org
Martin v. Löwis mar...@v.loewis.de added the comment:
The patch looks good. Can you also provide a test case?
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14371
___
Serhiy Storchaka storch...@gmail.com added the comment:
I am working on this. Should I add tests to test_zipfile.py or create new
test_zipfile_bzip2.py?
It would add a note that the bzip2 compression can understand not all programs
(and do not understand the older versions of Python), but
Martin v. Löwis mar...@v.loewis.de added the comment:
Please add it to test_zipfile.
As for the documentation, I propose the wording
bzip2 compression was added to the zip file format in 2001. However, even more
recent tools (including older Python releases) may not support it, causing
21 matches
Mail list logo