re-import lsprof.py
John Arbash Meinel
john at arbash-meinel.com
Mon Aug 14 14:31:51 BST 2006
...
> Yes, I know that extension and it is quite cool. FWIW I attached the
> patch that makes lsprof not crash for me (basically the same fix is in
> Armin's latest version of lsprof.py).
>
> Nevertheless, I think that in the long run (especially when Python 2.5
> comes out) it would be much nicer to support cProfile, since Python 2.5
> will ship that and people wouldn't have to install something separately.
>
> Cheers,
>
> Carl Friedrich
I think needing a new pstats would be enough for us to delay for a
while. When 2.5 comes out, we might work out a way to switch over to it.
But we currently expose the profiler name in the command line 'bzr
--lsprof foo' and 'bzr selftest --benchmark --lsprof-timed'. It would be
a little weird for 'bzr --lsprof' to run cProfile :)
> ------------------------------------------------------------------------
>
> === modified file 'bzrlib/lsprof.py'
> --- bzrlib/lsprof.py 2006-07-01 19:03:33 +0000
> +++ bzrlib/lsprof.py 2006-08-14 10:28:40 +0000
> @@ -162,7 +162,7 @@
> try:
> mname = _fn2mod[code.co_filename]
> except KeyError:
> - for k, v in sys.modules.iteritems():
> + for k, v in sys.modules.items():
> if v is None:
> continue
> if not hasattr(v, '__file__'):
>
In the mean time, if this is a reasonable fix, +1 from me. Anyone else?
John
=:->
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 254 bytes
Desc: OpenPGP digital signature
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20060814/61f4f1d3/attachment.pgp
More information about the bazaar
mailing list