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 fails to read filenames from stdin #89591

Closed
ginggs mannequin opened this issue Oct 11, 2021 · 4 comments
Closed

py_compile fails to read filenames from stdin #89591

ginggs mannequin opened this issue Oct 11, 2021 · 4 comments
Labels
3.10 only security fixes 3.11 only security fixes stdlib Python modules in the Lib dir type-bug An unexpected behavior, bug, or error

Comments

@ginggs
Copy link
Mannequin

ginggs mannequin commented Oct 11, 2021

BPO 45428
Nosy @stefanor, @serhiy-storchaka, @miss-islington, @ginggs
PRs
  • bpo-45428: Strip trailing '\n' from filename #28848
  • [3.10] bpo-45428: Fix reading filenames from stdin in py_compile (GH-28848) #28971
  • 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 = None
    closed_at = <Date 2021-10-15.12:37:47.851>
    created_at = <Date 2021-10-11.07:30:08.538>
    labels = ['type-bug', 'library', '3.10', '3.11']
    title = 'py_compile fails to read filenames from stdin'
    updated_at = <Date 2021-10-15.12:37:47.850>
    user = 'https://github.com/ginggs'

    bugs.python.org fields:

    activity = <Date 2021-10-15.12:37:47.850>
    actor = 'serhiy.storchaka'
    assignee = 'none'
    closed = True
    closed_date = <Date 2021-10-15.12:37:47.851>
    closer = 'serhiy.storchaka'
    components = ['Library (Lib)']
    creation = <Date 2021-10-11.07:30:08.538>
    creator = 'ginggs'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 45428
    keywords = ['patch']
    message_count = 4.0
    messages = ['403624', '403994', '404007', '404009']
    nosy_count = 4.0
    nosy_names = ['stefanor', 'serhiy.storchaka', 'miss-islington', 'ginggs']
    pr_nums = ['28848', '28971']
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'behavior'
    url = 'https://bugs.python.org/issue45428'
    versions = ['Python 3.10', 'Python 3.11']

    @ginggs
    Copy link
    Mannequin Author

    ginggs mannequin commented Oct 11, 2021

    py_compile fails to read a list of filenames to be compiled from standard input. This is a regression in 3.10.

    example

    files-to-compile.txt is a text file containing hello.py and goodbye.py on separate lines. hello.py and goodbye.py must exist.

    python3.10 -m py_compile - <files-to-compile.txt
    [Errno 2] No such file or directory: 'hello.py\n'

    python3.9 -m py_compile - <files-to-compile.txt

    python3.9 produces no output, but a __pycache__ directory is created and contains the byte-code files.

    @ginggs ginggs mannequin added 3.10 only security fixes stdlib Python modules in the Lib dir type-bug An unexpected behavior, bug, or error labels Oct 11, 2021
    @serhiy-storchaka
    Copy link
    Member

    New changeset 59a633d by Graham Inggs in branch 'main':
    bpo-45428: Fix reading filenames from stdin in py_compile (GH-28848)
    59a633d

    @miss-islington
    Copy link
    Contributor

    New changeset 2b6eb81 by Miss Islington (bot) in branch '3.10':
    bpo-45428: Fix reading filenames from stdin in py_compile (GH-28848)
    2b6eb81

    @serhiy-storchaka
    Copy link
    Member

    Thank you for your contribution Graham.

    @serhiy-storchaka serhiy-storchaka added the 3.11 only security fixes label Oct 15, 2021
    @serhiy-storchaka serhiy-storchaka added the 3.11 only security fixes label Oct 15, 2021
    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    3.10 only security fixes 3.11 only security fixes stdlib Python modules in the Lib dir type-bug An unexpected behavior, bug, or error
    Projects
    None yet
    Development

    No branches or pull requests

    2 participants