[Bug 4573] New: lsprof support broken with pypy

mercurial-bugs at selenic.com mercurial-bugs at selenic.com
Wed Mar 18 02:31:27 CDT 2015


http://bz.selenic.com/show_bug.cgi?id=4573

          Priority: normal
            Bug ID: 4573
                CC: mercurial-devel at selenic.com
          Assignee: bugzilla at selenic.com
           Summary: lsprof support broken with pypy
          Severity: bug
    Classification: Unclassified
                OS: Linux
          Reporter: pierre-yves.david at ens-lyon.org
          Hardware: PC
            Status: UNCONFIRMED
           Version: earlier
         Component: Mercurial
           Product: Mercurial

The pypy built ins _lsprof module does not have a 'profiler_entry' attribute.
I'm not sure why and how, but this makes --profile crash when pypy is used

> hg st --profile --traceback
Traceback (most recent call last):
  File "/home/pyd/lib/python/mercurial/dispatch.py", line 160, in _runcatch
    return _dispatch(req)
  File "/home/pyd/lib/python/mercurial/dispatch.py", line 885, in _dispatch
    cmdpats, cmdoptions)
  File "/home/pyd/lib/python/mercurial/extensions.py", line 245, in wrap
    return wrapper(origfn, *args, **kwargs)
  File "/home/pyd/src/hgsmb/smb.py", line 103, in wrapruncommand
    cmdoptions)
  File "/home/pyd/lib/python/mercurial/dispatch.py", line 646, in runcommand
    ret = _runcommand(ui, options, cmd, d)
  File "/home/pyd/lib/python/mercurial/extensions.py", line 245, in wrap
    return wrapper(origfn, *args, **kwargs)
  File "/home/pyd/lib/python/hgext/color.py", line 523, in colorcmd
    return orig(ui_, opts, cmd, cmdfunc)
  File "/home/pyd/lib/python/mercurial/dispatch.py", line 969, in _runcommand
    return lsprofile(ui, checkargs, fp)
  File "/home/pyd/lib/python/mercurial/dispatch.py", line 921, in lsprofile
    stats.sort(field)
  File "/home/pyd/lib/python/mercurial/lsprof.py", line 25, in sort
    if crit not in profiler_entry.__dict__:
  File "/home/pyd/lib/python/mercurial/demandimport.py", line 106, in
__getattribute__
    self._load()
  File "/home/pyd/lib/python/mercurial/demandimport.py", line 78, in _load
    mod = _hgextimport(_import, head, globals, locals, None, level)
  File "/home/pyd/lib/python/mercurial/demandimport.py", line 47, in
_hgextimport
    return importfunc(name, globals, *args)
ImportError: No module named profiler_entry
abort: No module named profiler_entry!

(yes I've apparently been running my mercurial with pypy since I smoke-tested 
390410a6545d)

-- 
You are receiving this mail because:
You are on the CC list for the bug.


More information about the Mercurial-devel mailing list