summaryrefslogtreecommitdiffstats
path: root/contrib/python/ipython/py3/patches/04-fix-context-lines-and-lines-cmd.patch
diff options
context:
space:
mode:
authormaxim-yurchuk <[email protected]>2024-10-09 12:29:46 +0300
committermaxim-yurchuk <[email protected]>2024-10-09 13:14:22 +0300
commit9731d8a4bb7ee2cc8554eaf133bb85498a4c7d80 (patch)
treea8fb3181d5947c0d78cf402aa56e686130179049 /contrib/python/ipython/py3/patches/04-fix-context-lines-and-lines-cmd.patch
parenta44b779cd359f06c3ebbef4ec98c6b38609d9d85 (diff)
publishFullContrib: true for ydb
<HIDDEN_URL> commit_hash:c82a80ac4594723cebf2c7387dec9c60217f603e
Diffstat (limited to 'contrib/python/ipython/py3/patches/04-fix-context-lines-and-lines-cmd.patch')
-rw-r--r--contrib/python/ipython/py3/patches/04-fix-context-lines-and-lines-cmd.patch20
1 files changed, 20 insertions, 0 deletions
diff --git a/contrib/python/ipython/py3/patches/04-fix-context-lines-and-lines-cmd.patch b/contrib/python/ipython/py3/patches/04-fix-context-lines-and-lines-cmd.patch
new file mode 100644
index 00000000000..a25eb8752c6
--- /dev/null
+++ b/contrib/python/ipython/py3/patches/04-fix-context-lines-and-lines-cmd.patch
@@ -0,0 +1,20 @@
+--- contrib/python/ipython/py3/IPython/core/debugger.py (revision 12930657)
++++ contrib/python/ipython/py3/IPython/core/debugger.py (working copy)
+@@ -616,7 +616,7 @@
+ ret.append("%s(%s)%s\n" % (link, lineno, call))
+
+ start = lineno - 1 - context//2
+- lines = linecache.getlines(filename)
++ lines = linecache.getlines(filename, frame.f_globals)
+ start = min(start, len(lines) - context)
+ start = max(start, 0)
+ lines = lines[start : start + context]
+@@ -674,7 +674,7 @@
+ filename = self._exec_filename
+
+ for lineno in range(first, last+1):
+- line = linecache.getline(filename, lineno)
++ line = linecache.getline(filename, lineno, self.curframe.f_globals)
+ if not line:
+ break
+