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 martin.panter
Recipients ezio.melotti, lemburg, martin.panter, serhiy.storchaka, vstinner
Date 2017-03-11.00:41:55
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1489192915.17.0.113302835188.issue29783@psf.upfronthosting.co.za>
In-reply-to
Content
I agree that it would be better to hold off deprecating codecs.open until Python 2 is no longer supported. This deprecation also discussed in Issue 8796.

There is more to compatability than the missing attributes. The most obvious one to me is that the TextIOBase.read’s parameter (read size) seems to correspond best with the second parameter (chars) to StreamReader.read.

The rot-13 codec is not relevant to codecs.open, because rot-13 is a text-to-text codec. Codecs.open is documented as opening files in “binary” (i.e. bytes) mode. I don’t think this is a bug with the rot-13 StreamWriter.

The documentation gives the impression that bytes-to-bytes codecs should work, including stateful usage such as with codecs.open. So I would consider that usage legitimate. But see Issue 20132 about problems with various (mainly bytes–bytes) stateful codecs. Either the problems should be treated as bugs to be fixed, or the documentation should be clarified to say they represent missing features.
History
Date User Action Args
2017-03-11 00:41:55martin.pantersetrecipients: + martin.panter, lemburg, vstinner, ezio.melotti, serhiy.storchaka
2017-03-11 00:41:55martin.pantersetmessageid: <1489192915.17.0.113302835188.issue29783@psf.upfronthosting.co.za>
2017-03-11 00:41:55martin.panterlinkissue29783 messages
2017-03-11 00:41:55martin.pantercreate