Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

py_compile CLI error message missing newline #118158

Open
bartex00001 opened this issue Apr 22, 2024 · 0 comments
Open

py_compile CLI error message missing newline #118158

bartex00001 opened this issue Apr 22, 2024 · 0 comments
Labels
type-bug An unexpected behavior, bug, or error

Comments

@bartex00001
Copy link

bartex00001 commented Apr 22, 2024

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:

# test.py
  print("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.

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

@bartex00001 bartex00001 added the type-bug An unexpected behavior, bug, or error label Apr 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type-bug An unexpected behavior, bug, or error
Projects
None yet
Development

No branches or pull requests

1 participant