Skip to content

Commit

Permalink
Fix import error on IPython 3
Browse files Browse the repository at this point in the history
  • Loading branch information
ccordoba12 committed Aug 20, 2015
1 parent bb7a60b commit 4c272f3
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 6 deletions.
9 changes: 6 additions & 3 deletions spyderlib/spyder.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,12 @@
# Don't show IPython ShimWarning's to our users
# TODO: Move to Jupyter imports in 3.1
#==============================================================================
import warnings
from IPython.utils.shimmodule import ShimWarning
warnings.simplefilter('ignore', ShimWarning)
try:
import warnings
from IPython.utils.shimmodule import ShimWarning
warnings.simplefilter('ignore', ShimWarning)
except:
pass


#==============================================================================
Expand Down
9 changes: 6 additions & 3 deletions spyderlib/widgets/externalshell/start_ipython_kernel.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,12 @@
import os.path as osp

# TODO: Move to Jupyter imports in 3.1
import warnings
from IPython.utils.shimmodule import ShimWarning
warnings.simplefilter('ignore', ShimWarning)
try:
import warnings
from IPython.utils.shimmodule import ShimWarning
warnings.simplefilter('ignore', ShimWarning)
except:
pass


def sympy_config(mpl_backend):
Expand Down

0 comments on commit 4c272f3

Please sign in to comment.