This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Newline in error output of py_compile.compile
Type: Stage:
Components: Library (Lib) Versions:
process
Status: closed Resolution: accepted
Dependencies: Superseder:
Assigned To: georg.brandl Nosy List: georg.brandl, georg.brandl, paulcannon
Priority: low Keywords: patch

Created on 2005-03-26 20:57 by paulcannon, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
python-py_compile.patch paulcannon, 2005-03-26 20:57 patch to add a newline
Messages (2)
msg48058 - (view) Author: paul cannon (paulcannon) Date: 2005-03-26 20:57
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.
msg48059 - (view) Author: Georg Brandl (georg.brandl) * (Python committer) Date: 2005-06-10 17:15
Logged In: YES 
user_id=1188172

Thanks! Checked in as py_compile.py rev 1.27.
History
Date User Action Args
2022-04-11 14:56:10adminsetgithub: 41763
2005-03-26 20:57:13paulcannoncreate