##// END OF EJS Templates
Backport PR #9952: Some mpl backends have no corresponding GUI...
Backport PR #9952: Some mpl backends have no corresponding GUI Hopefully fixes a test failure on Windows where mpl tries to activate an `agg` gui. Should we manually define the backend2gui dict instead of inverting backends and then modifying it? Test failure: ``` Traceback (most recent call last): File "C:\Users\ADMINI~1\AppData\Local\Temp\2\1845\lib\unittest\case.py", line 58, in testPartExecutor yield File "C:\Users\ADMINI~1\AppData\Local\Temp\2\1845\lib\unittest\case.py", line 600, in run testMethod() File "C:\Users\ADMINI~1\AppData\Local\Temp\2\1845\lib\site-packages\nose\failure.py", line 39, in runTest raise self.exc_val.with_traceback(self.tb) File "C:\Users\ADMINI~1\AppData\Local\Temp\2\1845\lib\site-packages\nose\loader.py", line 418, in loadTestsFromName addr.filename, addr.module) File "C:\Users\ADMINI~1\AppData\Local\Temp\2\1845\lib\site-packages\nose\importer.py", line 47, in importFromPath return self.importFromDir(dir_path, fqname) File "C:\Users\ADMINI~1\AppData\Local\Temp\2\1845\lib\site-packages\nose\importer.py", line 94, in importFromDir mod = load_module(part_fqname, fh, filename, desc) File "C:\Users\ADMINI~1\AppData\Local\Temp\2\1845\lib\imp.py", line 234, in load_module return load_source(name, filename, file) File "C:\Users\ADMINI~1\AppData\Local\Temp\2\1845\lib\imp.py", line 172, in load_source module = _load(spec) File "<frozen importlib._bootstrap>", line 693, in _load File "<frozen importlib._bootstrap>", line 673, in _load_unlocked File "<frozen importlib._bootstrap_external>", line 665, in exec_module File "<frozen importlib._bootstrap>", line 222, in _call_with_frames_removed File "c:\jenkins\workspace\windows-multi\_pyversion\3.5\label\windows\IPython\core\tests\test_pylabtools.py", line 18, in <module> from matplotlib import pyplot as plt File "C:\Users\ADMINI~1\AppData\Local\Temp\2\1845\lib\site-packages\matplotlib\pyplot.py", line 2512, in <module> install_repl_displayhook() File "C:\Users\ADMINI~1\AppData\Local\Temp\2\1845\lib\site-packages\matplotlib\pyplot.py", line 165, in install_repl_displayhook ip.enable_gui(ipython_gui_name) File "c:\jenkins\workspace\windows-multi\_pyversion\3.5\label\windows\IPython\terminal\interactiveshell.py", line 463, in enable_gui self._inputhook = get_inputhook_func(gui) File "c:\jenkins\workspace\windows-multi\_pyversion\3.5\label\windows\IPython\terminal\pt_inputhooks\__init__.py", line 38, in get_inputhook_func raise UnknownBackend(gui) IPython.terminal.pt_inputhooks.UnknownBackend: No event loop integration for 'agg'. Supported event loops are: qt, qt4, qt5, gtk, gtk2, gtk3, tk, wx, pyglet, glut, osx ``` Signed-off-by: Thomas Kluyver <thomas@kluyver.me.uk>

File last commit:

r21515:2c9013e4
r23135:621ec5f0
Show More
parallel.py
20 lines | 634 B | text/x-python | PythonLexer
"""
Shim to maintain backwards compatibility with old IPython.parallel imports.
"""
# Copyright (c) IPython Development Team.
# Distributed under the terms of the Modified BSD License.
import sys
from warnings import warn
from IPython.utils.shimmodule import ShimModule, ShimWarning
warn("The `IPython.parallel` package has been deprecated. "
"You should import from ipyparallel instead.", ShimWarning)
# Unconditionally insert the shim into sys.modules so that further import calls
# trigger the custom attribute access above
sys.modules['IPython.parallel'] = ShimModule(
src='IPython.parallel', mirror='ipyparallel')