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
0
Merge Requests
0
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
Nikola Balog
erp5
Commits
c7cf6f55
Commit
c7cf6f55
authored
Apr 07, 2016
by
Jérome Perrin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
linecache: add support for ipython >= 3
parent
c0a9551e
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 @
c7cf6f55
...
@@ -107,6 +107,14 @@ def patch_linecache():
...
@@ -107,6 +107,14 @@ def patch_linecache():
if
isinstance
(
m
,
str
)
and
'linecache'
in
m
:
if
isinstance
(
m
,
str
)
and
'linecache'
in
m
:
frame
=
frame
.
f_back
frame
=
frame
.
f_back
m
=
frame
.
f_globals
[
'__name__'
]
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'
:
if
m
==
'IPython.core.debugger'
:
co_name
=
frame
.
f_code
.
co_name
co_name
=
frame
.
f_code
.
co_name
if
co_name
==
'format_stack_entry'
:
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