Commit graph

23 commits

Author SHA1 Message Date
Nadeem Vawda
4907b0a2e0 bz2 module: Rewrap docstrings at 72 columns, as per PEP 8. 2012-10-08 20:31:34 +02:00
Nadeem Vawda
3b4a4f5199 Stylistic tweaks to the bz2 module to make it easier to transplant changes from
it to http://pypi.python.org/pypi/bz2file.
2012-10-08 19:20:49 +02:00
Nadeem Vawda
eb70be2b46 Issue #16304: Further optimize BZ2File.readlines?(). 2012-10-01 23:05:32 +02:00
Nadeem Vawda
138ad5066d Fix error handling in new fast path of BZ2File.readline(). 2012-10-01 23:04:11 +02:00
Nadeem Vawda
452add08a1 Issue #16304: Another performance optimization for BZ2File.
Patch by Serhiy Storchaka.
2012-10-01 23:02:50 +02:00
Nadeem Vawda
b7a0bfe912 Issue #16304: Further performance improvements for BZ2File.
Optimizations suggested by Serhiy Storchaka.
2012-09-30 23:58:01 +02:00
Nadeem Vawda
9e2a28ea54 Fix the return value of BZ2File._read_block() to be consistent with comments. 2012-09-30 13:41:29 +02:00
Nadeem Vawda
6c57318c3a Issue #16034: Fix performance regressions in the new BZ2File implementation.
Thanks to Victor Hooi for the bug report, and Serhiy Storchaka for the initial patch.
2012-09-30 03:57:33 +02:00
Nadeem Vawda
8280b4ba02 #15546: Fix BZ2File.read1()'s handling of pathological input data. 2012-08-04 15:29:28 +02:00
Nadeem Vawda
af518c198e Add a function bz2.open(), to match gzip.open(). 2012-06-04 23:32:38 +02:00
Nadeem Vawda
50cb936bd0 Clarify acceptable values for BZ2File.__init__'s mode argument. 2012-06-04 23:31:22 +02:00
Nadeem Vawda
aebcdba829 Make BZ2File's fileobj support easier to use.
The fileobj argument was added during the 3.3 development cycle, so this change
does not break backward compatibility with 3.2.
2012-06-04 23:31:20 +02:00
Nadeem Vawda
ae557d767f Fix seekable() in BZ2File and LZMAFile to check whether the underlying file supports seek(). 2012-02-12 01:51:38 +02:00
Nadeem Vawda
54d8144bb0 Make BZ2File.__init__()'s fileobj argument keyword-only. 2012-02-04 13:58:07 +02:00
Nadeem Vawda
cac8909d0c Update docstring for BZ2File.__init__(). 2012-02-04 13:08:11 +02:00
Nadeem Vawda
72750a85f9 Issue #13809: Make bz2 module work with threads disabled.
Original patch by Amaury Forgeot d'Arc.
2012-01-18 01:57:14 +02:00
Nadeem Vawda
44ae4a2a22 Make error handling in BZ2File.{readable,seekable,writable,fileno} consistent with TextIOWrapper.
Also, add tests for these methods.
2011-11-30 17:39:30 +02:00
Nadeem Vawda
249ab5e8d1 BZ2File now uses the compresslevel argument given by the caller,
instead of ignoring it and always using a compression level of 9.
2011-09-11 22:38:11 +02:00
Nadeem Vawda
98838bac9c Miscellaneous cleanups to bz2 and test_bz2 following issue #1625.
* In bz2.decompress(), concatenate partial results in a way that should
   be more friendly to other Python implementations
* Remove redundant comments in test_bz2
* Use 'while True:' instead of 'while 1:'
2011-05-30 01:12:24 +02:00
Nadeem Vawda
55b4338874 Issue #1625: BZ2File and bz2.decompress() now support multi-stream files.
Initial patch by Nir Aides.
2011-05-27 01:52:15 +02:00
Nadeem Vawda
f1a1af21eb Fix typo in bz2 module. 2011-05-25 00:32:08 +02:00
Antoine Pitrou
24ce386387 Fix whitespace 2011-04-03 17:08:49 +02:00
Antoine Pitrou
37dc5f85b8 Issue #5863: Rewrite BZ2File in pure Python, and allow it to accept
file-like objects using a new `fileobj` constructor argument.  Patch by
Nadeem Vawda.
2011-04-03 17:05:46 +02:00