From ab745a6521046ae5b32be5c4d82264d8e1851092 2017-01-08 17:31:57 From: Srinivas Reddy Thatiparthy Date: 2017-01-08 17:31:57 Subject: [PATCH] move ulinecache.getlines function call to linecache.getlines() --- diff --git a/IPython/core/debugger.py b/IPython/core/debugger.py index 447786f..4e47c67 100644 --- a/IPython/core/debugger.py +++ b/IPython/core/debugger.py @@ -28,11 +28,12 @@ http://www.python.org/2.2.3/license.html""" import bdb import functools import inspect +import linecache import sys import warnings from IPython import get_ipython -from IPython.utils import PyColorize, ulinecache +from IPython.utils import PyColorize from IPython.utils import coloransi, py3compat from IPython.core.excolors import exception_colors from IPython.testing.skipdoctest import skip_doctest @@ -407,7 +408,7 @@ class Pdb(OldPdb): ret.append(u'%s(%s)%s\n' % (link,lineno,call)) start = lineno - 1 - context//2 - lines = ulinecache.getlines(filename) + lines = linecache.getlines(filename) start = min(start, len(lines) - context) start = max(start, 0) lines = lines[start : start + context] @@ -466,7 +467,7 @@ class Pdb(OldPdb): filename = self._exec_filename for lineno in range(first, last+1): - line = ulinecache.getline(filename, lineno) + line = linecache.getline(filename, lineno) if not line: break