classification
Title: test.pythoninfo prints a stack trace and exits with 1 when the compiler does not exist
Type: behavior Stage: resolved
Components: Library (Lib) Versions: Python 3.8, Python 3.7, Python 2.7
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: vstinner, xdegaye
Priority: normal Keywords: patch

Created on 2019-02-09 21:06 by xdegaye, last changed 2019-04-29 13:21 by vstinner. This issue is now closed.

Files
File name Uploaded Description Edit
pythoninfo_api_24.txt xdegaye, 2019-04-29 11:20
Pull Requests
URL Status Linked Edit
PR 13007 merged xdegaye, 2019-04-29 10:50
PR 13009 merged vstinner, 2019-04-29 12:56
PR 13010 merged vstinner, 2019-04-29 13:19
Messages (5)
msg335139 - (view) Author: Xavier de Gaye (xdegaye) * (Python triager) Date: 2019-02-09 21:06
The call to subprocess.Popen() in collect_cc() of Lib/test/pythoninfo.py raises an exception when the compiler that has been used to build python is not present on the host running python. In that case pythoninfo prints a stack trace and exits with an error.

On the other side if the execution of the compiler to get its version fails, the error is silently ignored. It seems the exception should be ignored as well.
msg341068 - (view) Author: Xavier de Gaye (xdegaye) * (Python triager) Date: 2019-04-29 11:20
Attached pythoninfo_api_24.txt, the output of pythoninfo for Android API 24 with PR 13007.
msg341074 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2019-04-29 12:53
New changeset a86e06433a010f873dfd7957e0f87a39539876ee by Victor Stinner (xdegaye) in branch 'master':
bpo-35952: Fix test.pythoninfo when the compiler is missing (GH-13007)
https://github.com/python/cpython/commit/a86e06433a010f873dfd7957e0f87a39539876ee
msg341077 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2019-04-29 13:20
New changeset 5e09a9973b46cd6361a25877e0ca8dd0ab82d678 by Victor Stinner in branch '3.7':
bpo-35952: Sync test.pythoninfo from master (GH-13009)
https://github.com/python/cpython/commit/5e09a9973b46cd6361a25877e0ca8dd0ab82d678
msg341078 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2019-04-29 13:20
New changeset be6cbfb7670c852ef8abf52b63989442b6942dbb by Victor Stinner in branch '2.7':
bpo-35952: Sync test.pythoninfo from master (GH-13010)
https://github.com/python/cpython/commit/be6cbfb7670c852ef8abf52b63989442b6942dbb
History
Date User Action Args
2019-04-29 13:21:29vstinnersetstatus: open -> closed
stage: patch review -> resolved
resolution: fixed
versions: + Python 2.7, Python 3.7
2019-04-29 13:20:40vstinnersetmessages: + msg341078
2019-04-29 13:20:29vstinnersetmessages: + msg341077
2019-04-29 13:19:29vstinnersetpull_requests: + pull_request12931
2019-04-29 12:56:31vstinnersetpull_requests: + pull_request12930
2019-04-29 12:53:35vstinnersetmessages: + msg341074
2019-04-29 11:20:07xdegayesetfiles: + pythoninfo_api_24.txt
nosy: + vstinner
messages: + msg341068

2019-04-29 10:50:03xdegayesetkeywords: + patch
stage: patch review
pull_requests: + pull_request12928
2019-02-09 21:06:05xdegayecreate