[issue5863] bz2.BZ2File should accept other file-like objects.

Nadeem Vawda report at bugs.python.org
Tue Jan 25 14:51:03 CET 2011


Nadeem Vawda <nadeem.vawda at gmail.com> added the comment:

> Interesting! If you are motivated, a further approach would be to expose
> the compressor and decompressor objects from the C extension, and write
> the file object in Python (as in Lib/gzip.py).
I had initially considered doing something that, but I decided not to for reasons that I can't quite remember. However, in hindsight it seems like it would have been a better approach than doing everything in C. I'll start on it ASAP.

>> On a related note, the 'buffering' argument to __init__() is ignored, 
>> and I was wondering whether this should be documented explicitly?
> Yes, it should probably be deprecated if it's not useful anymore.
How would I go about doing this? Would it be sufficient to raise a DeprecationWarning if the argument is provided by the caller, and add a note to the docstring and documentation?

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue5863>
_______________________________________


More information about the Python-bugs-list mailing list