STINNER Victor added the comment:

-exec(compile(open(__file__).read().replace('\\r\\n', '\\n'), __file__, 'exec'))
+exec(compile(open(__file__,encoding='utf_8').read().replace('\\r\\n', '\\n'), 
__file__, 'exec'))

The fix is not correct, the script may use a different encoding.

Replace open() with tokenize.open(), available since Python 3.2.

.replace('\\r\\n', '\\n') is probably useless in Python 3 which uses universal 
newlines by default.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue19685>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to