Skip to content

Commit

Permalink
Merge pull request #101 from ivanov/ipython-deprecation
Browse files Browse the repository at this point in the history
fix IPython deprecation warning in 1.0+
  • Loading branch information
asmeurer committed Jan 25, 2014
2 parents 3696365 + 75a339c commit 5767d71
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions pudb/shell.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,9 +113,15 @@ def run_ipython_shell_v11(locals, globals, first_time):
else:
banner = ""

from IPython.frontend.terminal.interactiveshell import \
TerminalInteractiveShell
from IPython.frontend.terminal.ipapp import load_default_config
try:
# IPython 1.0 got rid of the frontend intermediary, and complains with
# a deprecated warning when you use it.
from IPython.terminal.interactiveshell import TerminalInteractiveShell
from IPython.terminal.ipapp import load_default_config
except ImportError:
from IPython.frontend.terminal.interactiveshell import \
TerminalInteractiveShell
from IPython.frontend.terminal.ipapp import load_default_config
# XXX: in the future it could be useful to load a 'pudb' config for the
# user (if it exists) that could contain the user's macros and other
# niceities.
Expand Down

0 comments on commit 5767d71

Please sign in to comment.