This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: py_compile fails to read filenames from stdin
Type: behavior Stage: resolved
Components: Library (Lib) Versions: Python 3.11, Python 3.10
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: ginggs, miss-islington, serhiy.storchaka, stefanor
Priority: normal Keywords: patch

Created on 2021-10-11 07:30 by ginggs, last changed 2022-04-11 14:59 by admin. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 28848 merged ginggs, 2021-10-11 07:30
PR 28971 merged miss-islington, 2021-10-15 09:39
Messages (4)
msg403624 - (view) Author: Graham Inggs (ginggs) * Date: 2021-10-11 07:30
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.
msg403994 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2021-10-15 09:39
New changeset 59a633d3e2071d65aa6638da5cf767a5c1310271 by Graham Inggs in branch 'main':
bpo-45428: Fix reading filenames from stdin in py_compile (GH-28848)
https://github.com/python/cpython/commit/59a633d3e2071d65aa6638da5cf767a5c1310271
msg404007 - (view) Author: miss-islington (miss-islington) Date: 2021-10-15 12:14
New changeset 2b6eb8149656541044884e76212495175e061a0a by Miss Islington (bot) in branch '3.10':
bpo-45428: Fix reading filenames from stdin in py_compile (GH-28848)
https://github.com/python/cpython/commit/2b6eb8149656541044884e76212495175e061a0a
msg404009 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2021-10-15 12:37
Thank you for your contribution Graham.
History
Date User Action Args
2022-04-11 14:59:51adminsetgithub: 89591
2021-10-15 12:37:47serhiy.storchakasetstatus: open -> closed
versions: + Python 3.11
messages: + msg404009

resolution: fixed
stage: patch review -> resolved
2021-10-15 12:14:52miss-islingtonsetmessages: + msg404007
2021-10-15 09:39:16miss-islingtonsetkeywords: + patch
nosy: + miss-islington

pull_requests: + pull_request27259
stage: patch review
2021-10-15 09:39:06serhiy.storchakasetnosy: + serhiy.storchaka
messages: + msg403994
2021-10-11 19:13:30stefanorsetnosy: + stefanor
2021-10-11 07:30:08ginggscreate