[issue4874] decoding functions in _codecs module accept str arguments

2009-01-22 Thread Antoine Pitrou
Antoine Pitrou added the comment: Committed in r68857, r68858. -- resolution: -> fixed status: open -> closed ___ Python tracker ___

[issue4874] decoding functions in _codecs module accept str arguments

2009-01-22 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: The patch looks good. I think the missing b in test_errorcallback_longindex is an overlook when the tests were updated for py3k. You are right to change the test. ___ Python tracker

[issue4874] decoding functions in _codecs module accept str arguments

2009-01-22 Thread Antoine Pitrou
Antoine Pitrou added the comment: "Fixing" multibytecodec.c produces a TypeError in the following test: def test_errorcallback_longindex(self): dec = codecs.getdecoder('euc-kr') myreplace = lambda exc: ('', sys.maxsize+1) codecs.register_error('test.cjktest', myrepl

[issue4874] decoding functions in _codecs module accept str arguments

2009-01-22 Thread Antoine Pitrou
Antoine Pitrou added the comment: Right, I hadn't thought of that. -- resolution: fixed -> status: closed -> open ___ Python tracker ___

[issue4874] decoding functions in _codecs module accept str arguments

2009-01-22 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: IMO, Modules/cjkcodecs/multibytecodec.c should be changed as well. -- nosy: +amaury.forgeotdarc ___ Python tracker ___ ___

[issue4874] decoding functions in _codecs module accept str arguments

2009-01-22 Thread Antoine Pitrou
Antoine Pitrou added the comment: Committed in r68855, r68856. Thanks! -- resolution: accepted -> fixed status: open -> closed ___ Python tracker ___

[issue4874] decoding functions in _codecs module accept str arguments

2009-01-22 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- assignee: -> pitrou resolution: -> accepted ___ Python tracker ___ ___ Python-bugs-list mailing list U

[issue4874] decoding functions in _codecs module accept str arguments

2009-01-16 Thread STINNER Victor
Changes by STINNER Victor : Removed file: http://bugs.python.org/file12641/_codecs_bytes.patch ___ Python tracker ___ ___ Python-bugs-list mail

[issue4874] decoding functions in _codecs module accept str arguments

2009-01-16 Thread STINNER Victor
STINNER Victor added the comment: New patch: - Leave unicode_escape_decode() and raw_unicode_escape_decode() unchanged (still accept unicode string) - Test changes (reject unicode for most codecs decode functions) - Write tests for unicode_escape_decode() and raw_unicode_escape_decode() (th

[issue4874] decoding functions in _codecs module accept str arguments

2009-01-14 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: On 2009-01-13 14:14, Antoine Pitrou wrote: > Antoine Pitrou added the comment: > > The patch is probably fine, but it would be nice to add some unit tests > for the new behaviour. +1 from my side. Thanks for the patch, Viktor. __

[issue4874] decoding functions in _codecs module accept str arguments

2009-01-13 Thread Antoine Pitrou
Antoine Pitrou added the comment: The patch is probably fine, but it would be nice to add some unit tests for the new behaviour. ___ Python tracker ___ ___

[issue4874] decoding functions in _codecs module accept str arguments

2009-01-08 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: On 2009-01-08 01:59, STINNER Victor wrote: > STINNER Victor added the comment: > > Patch replacing "s*" parsing format by "y*" for: > - utf_7_decode() > - utf_8_decode() > - utf_16_decode() > - utf_16_le_decode() > - utf_16_be_decode() > - utf_16_ex_

[issue4874] decoding functions in _codecs module accept str arguments

2009-01-07 Thread STINNER Victor
STINNER Victor added the comment: Patch replacing "s*" parsing format by "y*" for: - utf_7_decode() - utf_8_decode() - utf_16_decode() - utf_16_le_decode() - utf_16_be_decode() - utf_16_ex_decode() - utf_32_decode() - utf_32_le_decode() - utf_32_be_decode() - utf_32_ex_decode() - unic

[issue4874] decoding functions in _codecs module accept str arguments

2009-01-07 Thread Antoine Pitrou
New submission from Antoine Pitrou : The following function calls should raise a TypeError instead. Encoding functions are fine (they only accept str). >>> import codecs >>> codecs.utf_8_decode('aa') ('aa', 2) >>> codecs.utf_8_decode('éé') ('éé', 4) >>> codecs.latin_1_decode('éé') ('éé', 4) -