[Python-Dev] py3benchmark not working
Mark Shannon
mark at hotpy.org
Mon Jan 9 09:56:56 CET 2012
Christian Heimes wrote:
> Hello,
>
> I tried to compare the py3k baseline with my randomhash branch but the
> benchmark suite is failing.
>
> I've follewed the instruction
>
> # hg clone http://hg.python.org/benchmarks/ py2benchmarks
> # mkdir py3benchmarks;
> # cd py3benchmarks
> # ../py2benchmarks/make_perf3.sh ../py2benchmarks
> # python3.1 perf.py -b py3k old_py3k new_py3k
>
> but the suite immediately bails out:
>
[snip]
> "/media/ssd/heimes/python/py3benchmarks/lib/2to3/lib2to3/fixes/fix_operator.py",
> line 89, in _check_method
> method = getattr(self, "_" + results["method"][0].value.encode("ascii"))
> TypeError: Can't convert 'bytes' object to str implicitly
>
You can temporarily "fix" this by removing the .encode("ascii")
from line 89 in lib2to3/fixes/fix_operator.py
I'm not sure if this is a bug in 2to3 or the benchmark.
Cheers,
Mark
More information about the Python-Dev
mailing list