[Python-Dev] Draft PEP: Deprecate codecs.StreamReader and codecs.StreamWriter (original) (raw)
Nick Coghlan ncoghlan at gmail.com
Thu Jul 7 10:29:26 CEST 2011
- Previous message: [Python-Dev] Draft PEP: Deprecate codecs.StreamReader and codecs.StreamWriter
- Next message: [Python-Dev] Draft PEP: Deprecate codecs.StreamReader and codecs.StreamWriter
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Thu, Jul 7, 2011 at 1:51 PM, Benjamin Peterson <benjamin at python.org> wrote:
2011/7/6 Nick Coghlan <ncoghlan at gmail.com>:
On Thu, Jul 7, 2011 at 11:16 AM, Benjamin Peterson <benjamin at python.org> wrote:
2011/7/6 Victor Stinner <victor.stinner at haypocalc.com>:
codecs.open() will be changed to reuse the builtin open() function (TextIOWrapper).
This doesn't strike me as particularly backwards compatible, since you've just enumerated the differences between StreamWriter/Reader and TextIOWrapper. The API of the resulting object is the same (i.e. they're file-like objects). The behavioural differences are due to cases where the codec-specific classes are currently broken. Yes, but as we all know too well, people are surely relying on whatever behavior there is, broken or not.
True, but that's why changes like this are always a judgement call - is the gain in correctness worth the risk of breakage? We sometimes break workarounds when we fix bugs, too. From the discussion last time around, that particular change wasn't very controversial, which is why it is already in the 3.3 development tree.
Unless somebody steps forward to fix them, the Stream* classes have to go (albeit with a suitable period of deprecation). They're actively harmful in their current state, so retaining the status quo is not a viable option in this case.
Cheers, Nick.
-- Nick Coghlan | ncoghlan at gmail.com | Brisbane, Australia
- Previous message: [Python-Dev] Draft PEP: Deprecate codecs.StreamReader and codecs.StreamWriter
- Next message: [Python-Dev] Draft PEP: Deprecate codecs.StreamReader and codecs.StreamWriter
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]