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.
Bug report
Bug description:
When attempting to run py_compile using its CLI (
python3 -m py_compile test.py
) on file with erroneous indentation, ex: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.
The same issue was already raised twice:
in both instances the newline was added thus the lack of one now seems to be unintentional.
If this is confirmed to be a bug I will attempt to write a fix for it.
CPython versions tested on:
3.12
Operating systems tested on:
Linux
The text was updated successfully, but these errors were encountered: