homepage

This issue tracker has been migrated to GitHub , and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author pitrou
Recipients MizardX, antlong, eric.araujo, nadeem.vawda, niemeyer, pitrou, rhettinger, wrobell, xuanji
Date 2011年01月25日.13:07:35
SpamBayes Score 3.3699605e-06
Marked as misclassified No
Message-id <1295960856.71.0.0641141621157.issue5863@psf.upfronthosting.co.za>
In-reply-to
Content
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).
> One thing I was unsure of is how to handle exceptions that occur in
> BZ2File_dealloc(). Does the error status need to be cleared before it
> returns?
Yes, it should. Actually, it would be better to write out the exception using PyErr_WriteUnraisable().
> 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.
By the way, the current patch produces reference leaks:
$ ./python -m test -R 3:2 test_bz2
[1/1] test_bz2
beginning 5 repetitions
12345
.....
test_bz2 leaked [44, 44] references, sum=88
History
Date User Action Args
2011年01月25日 13:07:36pitrousetrecipients: + pitrou, rhettinger, niemeyer, wrobell, nadeem.vawda, eric.araujo, MizardX, antlong, xuanji
2011年01月25日 13:07:36pitrousetmessageid: <1295960856.71.0.0641141621157.issue5863@psf.upfronthosting.co.za>
2011年01月25日 13:07:35pitroulinkissue5863 messages
2011年01月25日 13:07:35pitroucreate

AltStyle によって変換されたページ (->オリジナル) /