Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Boxiang Sun
erp5
Commits
8155400e
Commit
8155400e
authored
Apr 07, 2016
by
Jérome Perrin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
linecache: add support for ipython >= 3
(cherry picked from commit 1f11442dd1d47f0eb1ab2d134efccc9ce6b42de5)
parent
ce5dafa1
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
0 deletions
+8
-0
product/ERP5Type/patches/python.py
product/ERP5Type/patches/python.py
+8
-0
No files found.
product/ERP5Type/patches/python.py
View file @
8155400e
...
...
@@ -107,6 +107,14 @@ def patch_linecache():
if
isinstance
(
m
,
str
)
and
'linecache'
in
m
:
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'
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment