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
When attempting to run py_compile using its CLI (python3 -m py_compile test.py) on file with erroneous indentation, ex:
# test.pyprint("hello world")
# unexpected space characters before `print`
An error will be printed to stderr, but without a newline at the end.
Although the py_compile documentation does not specify the error message format, the lack of newline is unconventional and can lead to unexpected behavior of scripts dependent on it.
Activity
yuanx749 commentedon Jun 6, 2026
Friendly ping: gh-149008 is open with a regression test, if someone has time to review.
gh-118158: Fix missing newline in py_compile CLI error output (#149008)
pythongh-118158: Fix missing newline in py_compile CLI error output (p…