Author eric.araujo
Recipients amaury.forgeotdarc, eric.araujo, mnewman, r.david.murray, tati_alchueyr, vstinner
Date 2012-03-13.15:20:46
SpamBayes Score 3.09834e-09
Marked as misclassified No
Message-id <1331652047.49.0.531766126935.issue5758@psf.upfronthosting.co.za>
In-reply-to
Content
> For 3.2 could we use the same fix, but without exposing the ability to *change* the encoding?
> That is, we use TextIOWrapper but always with the default None for encoding.
Yes!

> It also occurs to me that this really exposes a weakness in the design.  What if the user wants to
> specify other open parameters?  I wonder if we should say that for better future-proofing openhooks
> should always take **kw.  You could even envision fileinput accepting **kw and passing them along
> to the openhook.  I think charset is the most important open paramenter in this context, though, so
> I don't think we have to solve the general problem in this fix.
I concur.  I’ve never had to care about buffering for example, but mode is another parameter of open that people may want to give.  I’ll commit the minimal fix to 3.2 and merge in 3.3, and then we can discuss on a new RFE bug about adding encoding vs. **kwargs for 3.3.

Agreed on deprecating the charset hook when it becomes redundant.

Will fix the doc bug about codecs.open too.
History
Date User Action Args
2012-03-13 15:20:47eric.araujosetrecipients: + eric.araujo, amaury.forgeotdarc, vstinner, r.david.murray, mnewman, tati_alchueyr
2012-03-13 15:20:47eric.araujosetmessageid: <1331652047.49.0.531766126935.issue5758@psf.upfronthosting.co.za>
2012-03-13 15:20:46eric.araujolinkissue5758 messages
2012-03-13 15:20:46eric.araujocreate