[issue8774] tabnanny improperly handles non-ascii source files

2010-05-21 Thread STINNER Victor
STINNER Victor added the comment: Commited: r81393 (py3k), r81394 (3.1). -- resolution: -> fixed status: open -> closed ___ Python tracker ___ __

[issue8774] tabnanny improperly handles non-ascii source files

2010-05-20 Thread Benjamin Peterson
Benjamin Peterson added the comment: 2010/5/20 STINNER Victor : > > STINNER Victor added the comment: > >> You should handle the case of encoding being None. > > detect_encoding() never returns None for the encoding. If there is no cookie, > utf8 is returned by default. Ah, right. looks ok th

[issue8774] tabnanny improperly handles non-ascii source files

2010-05-20 Thread STINNER Victor
STINNER Victor added the comment: > You should handle the case of encoding being None. detect_encoding() never returns None for the encoding. If there is no cookie, utf8 is returned by default. -- ___ Python tracker

[issue8774] tabnanny improperly handles non-ascii source files

2010-05-20 Thread Benjamin Peterson
Benjamin Peterson added the comment: You should handle the case of encoding being None. -- ___ Python tracker ___ ___ Python-bugs-list

[issue8774] tabnanny improperly handles non-ascii source files

2010-05-20 Thread STINNER Victor
STINNER Victor added the comment: > The correct fix is to use tokenize.detect_encoding, > if anyone wants to provide a patch. done :-) Attached patch opens the file in binary mode to call tokenize.detect_encoding() and then use the encoding to open the file a second time (in text (unicode) m

[issue8774] tabnanny improperly handles non-ascii source files

2010-05-20 Thread Benjamin Peterson
Benjamin Peterson added the comment: The correct fix is to use tokenize.detect_encoding, if anyone wants to provide a patch. -- nosy: +benjamin.peterson ___ Python tracker ___ _

[issue8774] tabnanny improperly handles non-ascii source files

2010-05-20 Thread Dan Buch
Dan Buch added the comment: removed patch because the fix should be made to tabnanny itself -- ___ Python tracker ___ ___ Python-bugs-

[issue8774] tabnanny improperly handles non-ascii source files

2010-05-20 Thread Dan Buch
Changes by Dan Buch : Removed file: http://bugs.python.org/file17413/françois-pinard-killed-my-tabnanny.patch ___ Python tracker ___ ___ Pytho

[issue8774] tabnanny improperly handles non-ascii source files

2010-05-20 Thread Dan Buch
Changes by Dan Buch : -- title: 0xe7 in ``heapq.__about__`` causes badness -> tabnanny improperly handles non-ascii source files ___ Python tracker ___ __