Skip to content

Commit 34c7092

Browse files
committed
COMP: Fix runtime warning from ipython
IPython/parallel.py:13: ShimWarning: The `IPython.parallel` package has been deprecated. You should import from ipyparallel instead. https://github.com/ipython/ipyparallel https://ipyparallel.readthedocs.org/en/latest/
1 parent 11111cd commit 34c7092

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

nipype/pipeline/plugins/ipython.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
IPython_not_loaded = False
1111
try:
1212
from IPython import __version__ as IPyversion
13-
from IPython.parallel.error import TimeoutError
13+
from ipyparallel.error import TimeoutError
1414
except:
1515
IPython_not_loaded = True
1616

@@ -42,7 +42,7 @@ class IPythonPlugin(DistributedPluginBase):
4242

4343
def __init__(self, plugin_args=None):
4444
if IPython_not_loaded:
45-
raise ImportError('IPython parallel could not be imported')
45+
raise ImportError('ipyparallel could not be imported')
4646
super(IPythonPlugin, self).__init__(plugin_args=plugin_args)
4747
self.iparallel = None
4848
self.taskclient = None
@@ -51,11 +51,11 @@ def __init__(self, plugin_args=None):
5151

5252
def run(self, graph, config, updatehash=False):
5353
"""Executes a pre-defined pipeline is distributed approaches
54-
based on IPython's parallel processing interface
54+
based on IPython's ipyparallel processing interface
5555
"""
5656
# retrieve clients again
5757
try:
58-
name = 'IPython.parallel'
58+
name = 'ipyparallel'
5959
__import__(name)
6060
self.iparallel = sys.modules[name]
6161
except ImportError:

nipype/pipeline/plugins/ipythonx.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,14 @@ class IPythonXPlugin(DistributedPluginBase):
2121

2222
def __init__(self, plugin_args=None):
2323
if IPython_not_loaded:
24-
raise ImportError('IPython parallel could not be imported')
24+
raise ImportError('ipyparallel could not be imported')
2525
super(IPythonXPlugin, self).__init__(plugin_args=plugin_args)
2626
self.ipyclient = None
2727
self.taskclient = None
2828

2929
def run(self, graph, config, updatehash=False):
3030
"""Executes a pre-defined pipeline is distributed approaches
31-
based on IPython's parallel processing interface
31+
based on IPython's ipyparallel processing interface
3232
"""
3333
# retrieve clients again
3434
try:

0 commit comments

Comments
 (0)