[issue4021] tokenize.detect_encoding(): raise SyntaxError on codecs.lookup() error

2008-12-11 Thread Benjamin Peterson
Benjamin Peterson added the comment: Fixed in r67711. -- nosy: +benjamin.peterson resolution: -> fixed status: open -> closed ___ Python tracker ___

[issue4021] tokenize.detect_encoding(): raise SyntaxError on codecs.lookup() error

2008-12-11 Thread STINNER Victor
STINNER Victor added the comment: New version of the patch: - remove utf8_bom (was already replaced by codecs.BOM_UTF8) - include the regression test from amaury.forgeotdarc Can anyone review the new patch (which is very similar to the first one) and commit it? Added file: http://bugs.pytho

[issue4021] tokenize.detect_encoding(): raise SyntaxError on codecs.lookup() error

2008-10-02 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc <[EMAIL PROTECTED]> added the comment: This patch seems good to me, it fixes the following test: Index: Lib/test/test_tokenize.py === --- Lib/test/test_tokenize.py (revision 66701) +++ Lib/test/test_tokenize.p

[issue4021] tokenize.detect_encoding(): raise SyntaxError on codecs.lookup() error

2008-10-02 Thread STINNER Victor
New submission from STINNER Victor <[EMAIL PROTECTED]>: tokenize.detect_encoding() raises a LookupError() if the charset is unknown whereas Python raises a SyntaxError. So this patch mimics Python behaviour for tokenize module. Extra: reuse BOM_UTF8 from the codecs module. -- files: t