[issue29783] Modify codecs.open() to use the io module instead of codecs.StreamReaderWriter()

STINNER Victor report at bugs.python.org
Fri Mar 10 10:46:26 EST 2017


STINNER Victor added the comment:

Serhiy Storchaka added the comment:
> I agree that it is better to use directly the module implementing the codecs. But old third-party code still can use non-text codecs.
>
> There should be good reasons for breaking backward compatibility. Wouldn't be better to deprecate codecs.open()?

I'm not sure that I understood. Do you consider that using
codecs.open() with a non-text codecs is a "legit" use case or not?

I understood that you suggest a smoother transition using a
deprecation to give more time to developers to update their code.

But what do you want to deprecate? The whole codecs.open() function?
Or using non-text codecs with codecs.open()? Or using text codecs with
codecs.open()?

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue29783>
_______________________________________


More information about the Python-bugs-list mailing list