[issue12189] Python 2.6.6 fails to compile a source whereas pycompile 1.0 succeeds
Feth AREZKI
report at bugs.python.org
Thu May 26 20:28:25 CEST 2011
New submission from Feth AREZKI <feth at tuttu.info>:
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_win32.py', 'exec')
Traceback (most recent call last):
File "/usr/lib/python2.6/doctest.py", line 1253, in __run
compileflags, 1) in test.globs
File "<doctest testcase_a[1]>", line 1, in <module>
compile(fd.read(), 'test_win32.py', 'exec')
File "test_win32.py", line 3
^
SyntaxError: invalid syntax
"""
With Python 2.7, everything seems fine.
----------
components: Interpreter Core
files: test_win32.py
messages: 136992
nosy: feth
priority: normal
severity: normal
status: open
title: Python 2.6.6 fails to compile a source whereas pycompile 1.0 succeeds
type: compile error
versions: Python 2.6
Added file: http://bugs.python.org/file22130/test_win32.py
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue12189>
_______________________________________
More information about the Python-bugs-list
mailing list