[issue12189] Python 2.6.6 fails to compile a source whereas pycompile 1.0 succeeds

2011-05-26 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: The problem is probably near this code in Lib/doctest.py (in _load_testfile):: # get_data() opens files as 'rb', so one must do the equivalent # conversion as universal newlines would do. return file_contents.replace(os.linesep, '\

[issue12189] Python 2.6.6 fails to compile a source whereas pycompile 1.0 succeeds

2011-05-26 Thread Feth AREZKI
New submission from Feth AREZKI : At least on Linux debian sid, it seems that Python 2.6.6 compile builtin does not like the empty line with only '\r\n' in it. The following doctest story runs with the attached CRLF'ed file: """ >>> fd = open('test_win32.py', 'r') >>> compile(fd.read(), 'test_w