Skip to content

Commit

Permalink
Merge pull request #1287 from astrofrog/fix-ipython-import-error
Browse files Browse the repository at this point in the history
Fixed import of IPython UnknownBackend for IPython 4.0
  • Loading branch information
astrofrog committed Apr 20, 2017
1 parent fc2f928 commit 0ced699
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
2 changes: 2 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ v0.10.3 (unreleased)

* Fixed bugs with saving and restoring of various types of subset states. [#1285]

* Fixed a bug that caused glue to not open when IPython 4.0 was installed. [#1287]

v0.10.2 (2017-03-22)
--------------------

Expand Down
9 changes: 8 additions & 1 deletion glue/app/qt/application.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,14 @@ def _fix_ipython_pylab():
return

from IPython.core.error import UsageError
from IPython.terminal.pt_inputhooks import UnknownBackend

# UnknownBackend exists only in IPython 5.0 and above, so if it doesn't
# exist we just set UnknownBackend to be a fake exception class
try:
from IPython.terminal.pt_inputhooks import UnknownBackend
except ImportError:
class UnknownBackend(Exception):
pass

try:
shell.enable_pylab('inline', import_all=True)
Expand Down

0 comments on commit 0ced699

Please sign in to comment.