aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/python/ipython/py2/patches/03-fix-context-lines.patch
diff options
context:
space:
mode:
authormaxim-yurchuk <maxim-yurchuk@yandex-team.com>2024-10-09 12:29:46 +0300
committermaxim-yurchuk <maxim-yurchuk@yandex-team.com>2024-10-09 13:14:22 +0300
commit9731d8a4bb7ee2cc8554eaf133bb85498a4c7d80 (patch)
treea8fb3181d5947c0d78cf402aa56e686130179049 /contrib/python/ipython/py2/patches/03-fix-context-lines.patch
parenta44b779cd359f06c3ebbef4ec98c6b38609d9d85 (diff)
downloadydb-9731d8a4bb7ee2cc8554eaf133bb85498a4c7d80.tar.gz
publishFullContrib: true for ydb
<HIDDEN_URL> commit_hash:c82a80ac4594723cebf2c7387dec9c60217f603e
Diffstat (limited to 'contrib/python/ipython/py2/patches/03-fix-context-lines.patch')
-rw-r--r--contrib/python/ipython/py2/patches/03-fix-context-lines.patch11
1 files changed, 11 insertions, 0 deletions
diff --git a/contrib/python/ipython/py2/patches/03-fix-context-lines.patch b/contrib/python/ipython/py2/patches/03-fix-context-lines.patch
new file mode 100644
index 0000000000..4627040e00
--- /dev/null
+++ b/contrib/python/ipython/py2/patches/03-fix-context-lines.patch
@@ -0,0 +1,11 @@
+--- contrib/python/ipython/py2/IPython/core/debugger.py (revision 12930657)
++++ contrib/python/ipython/py2/IPython/core/debugger.py (working copy)
+@@ -408,7 +408,7 @@
+ ret.append(u'%s(%s)%s\n' % (link,lineno,call))
+
+ start = lineno - 1 - context//2
+- lines = ulinecache.getlines(filename)
++ lines = ulinecache.getlines(filename, frame.f_globals)
+ start = min(start, len(lines) - context)
+ start = max(start, 0)
+ lines = lines[start : start + context]