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 philipp.freyer
Recipients philipp.freyer
Date 2021-02-22.17:03:22
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1614013402.3.0.966797647642.issue43297@roundup.psfhosted.org>
In-reply-to
Content
The documentation clearly states that bz2.open(mode='r') opens a file in binary mode. I would have to use 'rt' for text mode.

The basic Python open(mode='r') method opens a file in text mode.
This is how I would expect any open(mode='r') method to work, especially since the standard Python implementation of open() treats 'r' as a synonym to 'rt'.

IMHO the behavior of bz2.open() is a possible pitfall for many developers and should be in line with the standard open() behavior.

Sorry, if this is in the wrong place, I am happy to put this elsewhere. However, I do see that as a conceptual issue (in our case this bug was not found for years)
History
Date User Action Args
2021-02-22 17:03:22philipp.freyersetrecipients: + philipp.freyer
2021-02-22 17:03:22philipp.freyersetmessageid: <1614013402.3.0.966797647642.issue43297@roundup.psfhosted.org>
2021-02-22 17:03:22philipp.freyerlinkissue43297 messages
2021-02-22 17:03:22philipp.freyercreate