[Python-Dev] Deprecate codecs.open() and StreamWriter/StreamReader

Victor Stinner victor.stinner at haypocalc.com
Tue May 24 10:31:50 CEST 2011


Le mardi 24 mai 2011 à 08:16 +0000, Vinay Sajip a écrit :
> So I would also want to keep codecs.open() and friends, at least for now

Well, I would agree to keep codecs.open() (if we patch it to reuse
TextIOWrapper and add a note to say that it is kept for backward
compatibiltiy and open() should be preferred in Python 3), but deprecate
StreamReader, StreamWriter and EncodedFile.

As I wrote, codecs.open() is useful in Python 2. But I don't know any
program or library using directly StreamReader or StreamWriter.

I found some projects (ex: twisted-mail, feeds2imap, pyflag, pygsm, ...)
implementing their own Python codec (cool!) and their codec has their
StreamReader and StreamWriter class, but I don't think that these
classes are used.

Victor



More information about the Python-Dev mailing list