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 jojko.sivek
Recipients jojko.sivek
Date 2015-05-21.09:16:55
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1432199816.0.0.178283144298.issue24258@psf.upfronthosting.co.za>
In-reply-to
Content
Unlike GzipFile the BZ2File does not have defined name attribute. The reading of this attribute results in: "AttributeError: 'BZ2File' object has no attribute 'name'".

This is truly missing feature and wrong behaviour, compare:
https://hg.python.org/releasing/3.4.3/file/933c3041d548/Lib/gzip.py
and 
https://hg.python.org/releasing/3.4.3/file/933c3041d548/Lib/bz2.py

In addition to that the BZ2File did have name attribute in python 2.7.* .

In attachment there is tar ball with example files, expected results in python 3 and results in python 2.
History
Date User Action Args
2015-05-21 09:16:56jojko.siveksetrecipients: + jojko.sivek
2015-05-21 09:16:55jojko.siveksetmessageid: <1432199816.0.0.178283144298.issue24258@psf.upfronthosting.co.za>
2015-05-21 09:16:55jojko.siveklinkissue24258 messages
2015-05-21 09:16:55jojko.sivekcreate