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 <>
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/

> 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
test_bz2 leaked [44, 44] references, sum=88
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: <>
2011-01-25 13:07:35pitroulinkissue5863 messages
2011-01-25 13:07:35pitroucreate