Closed basepi closed 1 year ago
Which command line did you use to trigger this error?
We're triggering the runner with our own script. That script calls another script with the relevant pyperf
args (such as --tracemalloc
), which we parse here. The actual pyperf invocation we're using is runner.bench_func()
.
It's an odd way of invoking pyperf, I'll be the first to admit. This is legacy code I've been slowly cleaning up and modernizing. Perhaps using parse_args()
this way without actually using the pyperf
command is not supported. But it worked until #131. That is the only place in the arg handling code where args.action
is accessed, so upgrading pyperf
resulted in an AttributeError
for us.
@vstinner Is there anything else pending here that I can help with?
@vstinner Can we get this merged?
Ref #131
We're using the
Runner
's argument parsing, but without usingpyperf
directly. This is resulting in an undefinedaction
, which means that when we use the--tracemalloc
argument, we get the following error:This PR checks for the attribute before accessing it.