Commit 726ada8d authored by Jérome Perrin's avatar Jérome Perrin

linecache: add support for ipython >= 3

parent 3d21799a
......@@ -105,6 +105,14 @@ def patch_linecache():
if m == 'linecache':
frame = frame.f_back
m = frame.f_globals['__name__']
if m == 'IPython.utils.ulinecache':
frame = frame.f_back
m = frame.f_globals['__name__']
# IPython.utils.ulinecache.getline (used in `list` pdb command) call IPython.utils.ulinecache.getlines
# so we may have two frames in IPython.utils.ulinecache module
if m == 'IPython.utils.ulinecache':
frame = frame.f_back
m = frame.f_globals['__name__']
if m == 'IPython.core.debugger':
co_name = frame.f_code.co_name
if co_name == 'format_stack_entry':
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment