New submission from Stefan Behnel:

In changeset 88b6ef9aa9e9, a new function ported_lib() was added that crashes 
on error reporting in Py3 because it tries to do this:

    raise RuntimeError("Benchmark died: " + err)

"err" is a bytes object that comes straight from the subprocess pipe.

The reason why I noticed this is because the new function assumes that it can 
run "python" with the "-c" option and pass an arbitrary Python command string. 
That may not be true if it is actually executing some wrapper script (as we do 
for Cython, for example). Currently, the only requirement for the external 
Python command is that it can run a Python script that it receives on the 
command line. We shouldn't unnecessarily extend that interface.

I'm not sure how to best fix this, but the only way I can currently see is to 
run an external Python script that prints the requested information.

----------
components: Benchmarks
messages: 198487
nosy: brett.cannon, pitrou, scoder
priority: normal
severity: normal
status: open
title: Benchmark runner tries to execute external Python command and fails on 
error reporting
type: behavior

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue19108>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to