[issue20404] Delayed exception using non-text encodings with TextIOWrapper

2015-05-31 Thread Roundup Robot
Roundup Robot added the comment: New changeset cf6e782a7f94 by Serhiy Storchaka in branch '2.7': Issue #19543: Emit deprecation warning for known non-text encodings. https://hg.python.org/cpython/rev/cf6e782a7f94 -- ___ Python tracker

[issue20404] Delayed exception using non-text encodings with TextIOWrapper

2014-03-02 Thread Roundup Robot
Roundup Robot added the comment: New changeset 140a69d950eb by Georg Brandl in branch '3.3': Issue #20404: reject non-text encodings early in TextIOWrapper. http://hg.python.org/cpython/rev/140a69d950eb -- ___ Python tracker

[issue20404] Delayed exception using non-text encodings with TextIOWrapper

2014-02-25 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Here is backported to 3.3 patch. -- nosy: +georg.brandl Added file: http://bugs.python.org/file34221/issue20404_check_valid_textio_codec-3.3.patch ___ Python tracker ___

[issue20404] Delayed exception using non-text encodings with TextIOWrapper

2014-02-04 Thread Roundup Robot
Roundup Robot added the comment: New changeset f3ec00d2b75e by Nick Coghlan in branch 'default': Close #20404: blacklist non-text encodings in io.TextIOWrapper http://hg.python.org/cpython/rev/f3ec00d2b75e -- nosy: +python-dev resolution: -> fixed stage: commit review -> committed/rejec

[issue20404] Delayed exception using non-text encodings with TextIOWrapper

2014-02-04 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: LGTM. -- stage: test needed -> commit review ___ Python tracker ___ ___ Python-bugs-list mailing l

[issue20404] Delayed exception using non-text encodings with TextIOWrapper

2014-02-04 Thread Nick Coghlan
Nick Coghlan added the comment: v3: - prefix for internal helper APIs is now _PyCodecInfo_ to better distinguish them from the ones that take an encoding name - error check is now just for "is not a text encoding" - tweaked the name and comment in the error test to be clear that it is codecs t

[issue20404] Delayed exception using non-text encodings with TextIOWrapper

2014-02-02 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: The _PyCodec_GetIncrementalDecoder name looks too similar to PyCodec_IncrementalDecoder. It would be better to use more different name. And please note my minor comments on Rietveld. -- ___ Python tracker

[issue20404] Delayed exception using non-text encodings with TextIOWrapper

2014-02-01 Thread Nick Coghlan
Nick Coghlan added the comment: Ah, just noticed the test case is still using the overly specific check for the exception wording. I'll fix that, too. -- ___ Python tracker ___

[issue20404] Delayed exception using non-text encodings with TextIOWrapper

2014-02-01 Thread Nick Coghlan
Nick Coghlan added the comment: Revised patch that avoids doing multiple lookups of the same codec name while creating the stream. Absent any comments, I'll commit this version with appropriate NEWS and What's New updates tomorrow. -- Added file: http://bugs.python.org/file33856/issu

[issue20404] Delayed exception using non-text encodings with TextIOWrapper

2014-01-27 Thread Nick Coghlan
Nick Coghlan added the comment: Attached patch checks the requested encoding is a valid text encoding in TextIOWrapper.__init__. Two additional test changes were needed: - the one that checks handling of non-text-encodings at runtime now tweaks quopri to lie about being a text encoding when c

[issue20404] Delayed exception using non-text encodings with TextIOWrapper

2014-01-26 Thread Nick Coghlan
Nick Coghlan added the comment: I also created issue 20405 as an RFE for 3.5, since it seems there is a possible gap in capability relative to Python 2 here. -- ___ Python tracker _

[issue20404] Delayed exception using non-text encodings with TextIOWrapper

2014-01-26 Thread Nick Coghlan
New submission from Nick Coghlan: TextIOWrapper doesn't check the codec type early the way the convenience methods now do, so the open() method currently still suffers from the problems Victor described in issue 19619 for str.encode() and bytes.decode(): >>> with open("hex.txt", 'w') as f: ...