Commit 775265d0 authored by Arnaud Fontaine's avatar Arnaud Fontaine

ZODB Components: Source code lines were not displayed with recent versions of ipdb.

For Python3 compatibility, IPython introduced IPython.utils.ulinecache thus
update ipdb-specific monkey patch accordingly.
parent 83f0b7c8
......@@ -102,7 +102,9 @@ def patch_linecache():
ipdb does not pass module_globals to getlines()...
"""
m = frame.f_globals['__name__']
if m == 'linecache':
# 'linecache' or 'IPython.utils.ulinecache' (may be renamed/moved in
# IPython so just check the presence of 'linecache'...)
if isinstance(m, str) and 'linecache' in m:
frame = frame.f_back
m = frame.f_globals['__name__']
if m == 'IPython.core.debugger':
......
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