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

Newline in error output of py_compile.compile #41763

Closed
paulcannon mannequin opened this issue Mar 26, 2005 · 2 comments
Closed

Newline in error output of py_compile.compile #41763

paulcannon mannequin opened this issue Mar 26, 2005 · 2 comments
Assignees
Labels
stdlib Python modules in the Lib dir

Comments

@paulcannon
Copy link
Mannequin

paulcannon mannequin commented Mar 26, 2005

BPO 1171150
Nosy @birkenfeld, @birkenfeld
Files
  • python-py_compile.patch: patch to add a newline
  • 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 = <Date 2005-06-10.17:15:48.000>
    created_at = <Date 2005-03-26.20:57:13.000>
    labels = ['library']
    title = 'Newline in error output of py_compile.compile'
    updated_at = <Date 2005-06-10.17:15:48.000>
    user = 'https://bugs.python.org/paulcannon'

    bugs.python.org fields:

    activity = <Date 2005-06-10.17:15:48.000>
    actor = 'georg.brandl'
    assignee = 'georg.brandl'
    closed = True
    closed_date = None
    closer = None
    components = ['Library (Lib)']
    creation = <Date 2005-03-26.20:57:13.000>
    creator = 'paulcannon'
    dependencies = []
    files = ['6571']
    hgrepos = []
    issue_num = 1171150
    keywords = ['patch']
    message_count = 2.0
    messages = ['48058', '48059']
    nosy_count = 3.0
    nosy_names = ['georg.brandl', 'georg.brandl', 'paulcannon']
    pr_nums = []
    priority = 'low'
    resolution = 'accepted'
    stage = None
    status = 'closed'
    superseder = None
    type = None
    url = 'https://bugs.python.org/issue1171150'
    versions = []

    @paulcannon
    Copy link
    Mannequin Author

    paulcannon mannequin commented 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.

    @paulcannon paulcannon mannequin closed this as completed Mar 26, 2005
    @paulcannon paulcannon mannequin assigned birkenfeld Mar 26, 2005
    @paulcannon paulcannon mannequin added the stdlib Python modules in the Lib dir label Mar 26, 2005
    @paulcannon paulcannon mannequin closed this as completed Mar 26, 2005
    @paulcannon paulcannon mannequin assigned birkenfeld Mar 26, 2005
    @paulcannon paulcannon mannequin added the stdlib Python modules in the Lib dir label Mar 26, 2005
    @birkenfeld
    Copy link
    Member

    Logged In: YES
    user_id=1188172

    Thanks! Checked in as py_compile.py rev 1.27.

    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 9, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    stdlib Python modules in the Lib dir
    Projects
    None yet
    Development

    No branches or pull requests

    1 participant