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

Antoine Pitrou solipsis at pitrou.net
Tue May 24 12:39:29 CEST 2011

On Tue, 24 May 2011 20:25:11 +1000
Nick Coghlan <ncoghlan at gmail.com> wrote:
> Just as PEP 302 defines how module importers should be written, PEP
> 100 defines how text codecs should be written (i.e. in terms of
> StreamReader and StreamWriter).
> PEP 3116 then defines how such codecs can be used as part of the
> overall I/O stack as redesigned for Python 3.

The I/O stack doesn't use StreamReader and StreamWriter. That's the
whole point. Stream* have been made useless by the new I/O stack.

> Now, there may be an opportunity here to rationalise things a bit and
> re-use the *new* io module interfaces as the basis for an updated
> codec API PEP, but we shouldn't be hasty in deprecating an old API
> that is about "how to write codecs" just because it is similar to a
> shiny new one that is about "how to process I/O data".

Ok, can you explain us the difference, concretely?



More information about the Python-Dev mailing list