[pypy-issue] [issue1307] pyprof2calltree depends on CPython internals not provided by PyPy

Allen Short tracker at bugs.pypy.org
Mon Oct 29 15:11:22 CET 2012


New submission from Allen Short <washort42 at gmail.com>:

There's a few failure modes to this.

Code to reproduce:

import cProfile
import pyprof2calltree

p = cProfile.Profile()
p.runctx("1 + 1", globals(), globals())
pyprof2calltree.convert(p, "foo.kgrind")

Error:


Traceback (most recent call last):
  File "app_main.py", line 51, in run_toplevel
  File "eparse.py", line 15, in <module>
    pyprof2calltree.convert(pf, "foo.kgrind")
  File "/home/washort/pypy-1.9/site-packages/pyprof2calltree.py", line 274, in
convert
    converter.output(f)
  File "/home/washort/pypy-1.9/site-packages/pyprof2calltree.py", line 104, in
output
    self._print_summary()
  File "/home/washort/pypy-1.9/site-packages/pyprof2calltree.py", line 133, in
_print_summary
    for entry in self.entries:
TypeError: 'Profile' object is not iterable


Using 'profile' instead of 'cProfile' gives "Iteration over non-sequence".

----------
messages: 4920
nosy: pypy-issue, washort
priority: bug
status: chatting
title: pyprof2calltree depends on CPython internals not provided by PyPy

________________________________________
PyPy bug tracker <tracker at bugs.pypy.org>
<https://bugs.pypy.org/issue1307>
________________________________________


More information about the pypy-issue mailing list