[issue1625] bz2.BZ2File doesn't support multiple streams
David Bonner added the comment: Picking this back up again. There's actually no docs changes necessary...the docs never mentioned that the module didn't support multiple logical streams, and I didn't see any other mentions in the docs that seemed to need updating. I supposed I could add something along the lines of "BZ2File supports multiple logical streams in a single compressed file", if that's what you/re looking for. Working on a patch for trunk as well. -- ___ Python tracker <http://bugs.python.org/issue1625> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1625] bz2.BZ2File doesn't support multiple streams
David Bonner added the comment: I've got a patch that fixes this. It allows BZ2File to read multi-stream files as generated by pbzip2, allows BZ2File to open files in append mode, and also updates bz2.decompress to allow it to handle multi-stream chunks of data. We originally wrote it against 2.5, but I've updated the patch to py3k trunk, and attached it here. If there's interest in a patch against 2.7 trunk, please let me know. -- nosy: +dbonner versions: +Python 2.5, Python 3.2 Added file: http://bugs.python.org/file15000/bz2_patch.tar.bz2 ___ Python tracker <http://bugs.python.org/issue1625> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1625] bz2.BZ2File doesn't support multiple streams
Changes by David Bonner : Removed file: http://bugs.python.org/file15000/bz2_patch.tar.bz2 ___ Python tracker <http://bugs.python.org/issue1625> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1625] bz2.BZ2File doesn't support multiple streams
David Bonner added the comment: sorry, the previous patch was from an old version. attaching the correct version now. apologies for the noise. -- Added file: http://bugs.python.org/file15001/bz2_patch.tar.bz2 ___ Python tracker <http://bugs.python.org/issue1625> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1625] bz2.BZ2File doesn't support multiple streams
David Bonner added the comment: Thanks for the reply. My company's legal dept. told me that we needed to put the boilerplate into the files as part of releasing it under the apache license. I used a tarball because they also recommended including a full copy of the license with the patch. I'm reattaching just the patch to the bug now. I'll check with legal and see if they'd have a problem with removing the boilerplate. -- keywords: +patch Added file: http://bugs.python.org/file15014/py3k_bz2.patch ___ Python tracker <http://bugs.python.org/issue1625> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1625] bz2.BZ2File doesn't support multiple streams
David Bonner added the comment: I can remove the boilerplate from the code as long as I add the following to the submittal: VMware, Inc. is providing this bz2 module patch to you under the terms of the Apache License 2.0 with the understanding that you plan to re-license this under the terms and conditions of the Python License. This patch is provided as is, with no warranties or support. VMware disclaims all liability in connection with the use/inability to use this patch. Any use of the attached is considered acceptance of the above. -- Added file: http://bugs.python.org/file15075/py3k_bz2.patch ___ Python tracker <http://bugs.python.org/issue1625> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1625] bz2.BZ2File doesn't support multiple streams
David Bonner added the comment: Hrm...yeah, I should probably be setting it to closed as soon as BZ2_bzReadClose() returns, and then back to open once BZ2_bzReadOpen succeeds. Wasn't intentional...thanks for the catch. You guys need a new patch with that change in it? I'll try and get a 2.7 patch done and uploaded in a day or two. -- ___ Python tracker <http://bugs.python.org/issue1625> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1625] bz2.BZ2File doesn't support multiple streams
David Bonner added the comment: Understandable. New patch attached. -- Added file: http://bugs.python.org/file15177/py3k_bz2.patch ___ Python tracker <http://bugs.python.org/issue1625> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1625] bz2.BZ2File doesn't support multiple streams
David Bonner added the comment: That was mostly just out of paranoia, since the comments mentioned multiple calls to close being legal. Looking at it again, that particular case isn't an issue, since we don't hit that call when the mode is MODE_CLOSED. The testsuite runs happily with those changes reverted. Should I upload a new patch? -- ___ Python tracker <http://bugs.python.org/issue1625> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com