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

Victor Stinner victor.stinner at haypocalc.com
Fri May 27 17:08:06 CEST 2011


Le vendredi 27 mai 2011 15:33:07, Benjamin Peterson a écrit :
> 2011/5/27 Victor Stinner <victor.stinner at haypocalc.com>:
> > You have until the release of Python 3.3 to prove that StreamReader
> > and/or StreamWriter can be faster than TextIOWrapper. If you can prove
> > it using a patch and a benchmark, I will be ok to revert my commit.
> 
> Please don't hold commits over someone's head.

Tell me if I am wrong, but only Marc-Andre is against deprecating StreamReader 
and StreamWriter. Walter and Antoine are in favor of using TextIOWrapper 
instead of StreamReader/StreamWriter.

Different people would like to be able to call codecs.open() in Python 2 and 3, 
so I kept the function with its API unchanged, and I documented that open() 
should be preferred (but I did not deprecated codecs.open).

Victor


More information about the Python-Dev mailing list