You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Newline in error output of py_compile.compile #41763
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
assignee='https://github.com/birkenfeld'closed_at=<Date2005-06-10.17:15:48.000>created_at=<Date2005-03-26.20:57:13.000>labels= ['library']
title='Newline in error output of py_compile.compile'updated_at=<Date2005-06-10.17:15:48.000>user='https://bugs.python.org/paulcannon'
The py_compile.compile() function, when doraise=False
and a compilation error is encountered, simply prints
the message to sys.stderr and returns. However, it
neglects to add a newline. Furthermore, judging by the
definition of PyCompileError earlier in the file and
the fact that the message will always come from an
instance of PyCompileError, the message will never
include a newline.
Some shells issue a carraige return before the command
prompt, so that would hide the output from
py_compile.compile if it were the last message to the
console.
Checking all occurences of "py_compile" in the python
source indicates they all either use compile() with
doraise=True or expect normal newline-terminated output
on error.
Activity
paulcannon commentedon Mar 26, 2005
The py_compile.compile() function, when doraise=False
and a compilation error is encountered, simply prints
the message to sys.stderr and returns. However, it
neglects to add a newline. Furthermore, judging by the
definition of PyCompileError earlier in the file and
the fact that the message will always come from an
instance of PyCompileError, the message will never
include a newline.
Some shells issue a carraige return before the command
prompt, so that would hide the output from
py_compile.compile if it were the last message to the
console.
Checking all occurences of "py_compile" in the python
source indicates they all either use compile() with
doraise=True or expect normal newline-terminated output
on error.
This patch appends the newline.
birkenfeld commentedon Jun 10, 2005
Logged In: YES
user_id=1188172
Thanks! Checked in as py_compile.py rev 1.27.