[Python-modules-commits] [ipdb] 06/11: adapt to API change in IPython 5.0. closes #100
Andrey Rahmatullin
wrar at moszumanska.debian.org
Fri Aug 5 16:28:44 UTC 2016
This is an automated email from the git hooks/post-receive script.
wrar pushed a commit to branch master
in repository ipdb.
commit ad62e6ee4dda7f4aebc072d3a5bfd3f21c987640
Author: Nathan Goldbaum <ngoldbau at illinois.edu>
Date: Mon Jun 13 17:32:08 2016 -0500
adapt to API change in IPython 5.0. closes #100
---
ipdb/__main__.py | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/ipdb/__main__.py b/ipdb/__main__.py
index 04cb6c1..b003a87 100644
--- a/ipdb/__main__.py
+++ b/ipdb/__main__.py
@@ -23,8 +23,12 @@ def import_module(possible_modules, needed_module):
count -= 1
if count == 0:
raise
-
-from IPython.core.debugger import Pdb, BdbQuit_excepthook
+try:
+ # IPython 5.0 and newer
+ from IPython.terminal.debugger import TerminalPdb as Pdb
+ from IPython.core.debugger import BdbQuit_excepthook
+except ImportError:
+ from IPython.core.debugger import Pdb, BdbQuit_excepthook
possible_modules = ['IPython.terminal.ipapp', # Newer IPython
'IPython.frontend.terminal.ipapp'] # Older IPython
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/python-modules/packages/ipdb.git
More information about the Python-modules-commits
mailing list