[issue14371] Add support for bzip2 compression to the zipfile module

2012-04-30 Thread Roundup Robot
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 ___

[issue14371] Add support for bzip2 compression to the zipfile module

2012-04-30 Thread Martin v . Löwis
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 ___

[issue14371] Add support for bzip2 compression to the zipfile module

2012-04-19 Thread Serhiy Storchaka
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

[issue14371] Add support for bzip2 compression to the zipfile module

2012-04-19 Thread Serhiy Storchaka
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

[issue14371] Add support for bzip2 compression to the zipfile module

2012-04-18 Thread Antoine Pitrou
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,

[issue14371] Add support for bzip2 compression to the zipfile module

2012-04-17 Thread Jesús Cea Avión
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

[issue14371] Add support for bzip2 compression to the zipfile module

2012-04-17 Thread Martin v . Löwis
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 ___

[issue14371] Add support for bzip2 compression to the zipfile module

2012-03-23 Thread Nadeem Vawda
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

[issue14371] Add support for bzip2 compression to the zipfile module

2012-03-23 Thread Serhiy Storchaka
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

[issue14371] Add support for bzip2 compression to the zipfile module

2012-03-23 Thread Nadeem Vawda
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 +=

[issue14371] Add support for bzip2 compression to the zipfile module

2012-03-23 Thread Serhiy Storchaka
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

[issue14371] Add support for bzip2 compression to the zipfile module

2012-03-22 Thread Serhiy Storchaka
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:

[issue14371] Add support for bzip2 compression to the zipfile module

2012-03-22 Thread Antoine Pitrou
Changes by Antoine Pitrou pit...@free.fr: -- nosy: +nadeem.vawda stage: - patch review ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14371 ___

[issue14371] Add support for bzip2 compression to the zipfile module

2012-03-21 Thread Serhiy Storchaka
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

[issue14371] Add support for bzip2 compression to the zipfile module

2012-03-21 Thread Serhiy Storchaka
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 ___

[issue14371] Add support for bzip2 compression to the zipfile module

2012-03-20 Thread Serhiy Storchaka
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

[issue14371] Add support for bzip2 compression to the zipfile module

2012-03-20 Thread Martin v . Löwis
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 ___

[issue14371] Add support for bzip2 compression to the zipfile module

2012-03-20 Thread Martin v . Löwis
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

[issue14371] Add support for bzip2 compression to the zipfile module

2012-03-20 Thread Martin v . Löwis
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 ___

[issue14371] Add support for bzip2 compression to the zipfile module

2012-03-20 Thread Serhiy Storchaka
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

[issue14371] Add support for bzip2 compression to the zipfile module

2012-03-20 Thread Martin v . Löwis
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