##// END OF EJS Templates
Merge pull request #8139 from minrk/split-parallel...
Min RK -
r20866:f7633888 merge
parent child Browse files
Show More
@@ -0,0 +1,20 b''
1 """
2 Shim to maintain backwards compatibility with old IPython.parallel imports.
3 """
4 # Copyright (c) IPython Development Team.
5 # Distributed under the terms of the Modified BSD License.
6
7 from __future__ import print_function
8
9 import sys
10 from warnings import warn
11
12 warn("The `IPython.parallel` package has been deprecated. "
13 "You should import from ipython_parallel instead.")
14
15 from IPython.utils.shimmodule import ShimModule
16
17 # Unconditionally insert the shim into sys.modules so that further import calls
18 # trigger the custom attribute access above
19
20 sys.modules['IPython.parallel'] = ShimModule('parallel', mirror='ipython_parallel')
@@ -170,8 +170,13 b' class TestSection(object):'
170 def will_run(self):
170 def will_run(self):
171 return self.enabled and all(have[p] for p in self.dependencies)
171 return self.enabled and all(have[p] for p in self.dependencies)
172
172
173 shims = {
174 'parallel': 'ipython_parallel',
175 }
176
173 # Name -> (include, exclude, dependencies_met)
177 # Name -> (include, exclude, dependencies_met)
174 test_sections = {n:TestSection(n, ['IPython.%s' % n]) for n in test_group_names}
178 test_sections = {n:TestSection(n, [shims.get(n, 'IPython.%s' % n)]) for n in test_group_names}
179
175
180
176 # Exclusions and dependencies
181 # Exclusions and dependencies
177 # ---------------------------
182 # ---------------------------
@@ -1,22 +1,11 b''
1 # encoding: utf-8
1 # encoding: utf-8
2 """
2 """
3 A simple utility to import something by its string name.
3 A simple utility to import something by its string name.
4
5 Authors:
6
7 * Brian Granger
8 """
4 """
9
5
10 #-----------------------------------------------------------------------------
6 # Copyright (c) IPython Development Team.
11 # Copyright (C) 2008-2011 The IPython Development Team
7 # Distributed under the terms of the Modified BSD License.
12 #
13 # Distributed under the terms of the BSD License. The full license is in
14 # the file COPYING, distributed as part of this software.
15 #-----------------------------------------------------------------------------
16
8
17 #-----------------------------------------------------------------------------
18 # Functions and classes
19 #-----------------------------------------------------------------------------
20
9
21 def import_item(name):
10 def import_item(name):
22 """Import and return ``bar`` given the string ``foo.bar``.
11 """Import and return ``bar`` given the string ``foo.bar``.
@@ -41,8 +30,8 b' def import_item(name):'
41 package, obj = parts
30 package, obj = parts
42 module = __import__(package, fromlist=[obj])
31 module = __import__(package, fromlist=[obj])
43 try:
32 try:
44 pak = module.__dict__[obj]
33 pak = getattr(module, obj)
45 except KeyError:
34 except AttributeError:
46 raise ImportError('No module named %s' % obj)
35 raise ImportError('No module named %s' % obj)
47 return pak
36 return pak
48 else:
37 else:
@@ -15,7 +15,7 b' class ShimModule(types.ModuleType):'
15 # Use the equivalent of import_item(name), see below
15 # Use the equivalent of import_item(name), see below
16 name = "%s.%s" % (self._mirror, key)
16 name = "%s.%s" % (self._mirror, key)
17
17
18 # NOTE: the code below is copied *verbatim* from
18 # NOTE: the code below was copied *verbatim* from
19 # importstring.import_item. For some very strange reason that makes no
19 # importstring.import_item. For some very strange reason that makes no
20 # sense to me, if we call it *as a function*, it doesn't work. This
20 # sense to me, if we call it *as a function*, it doesn't work. This
21 # has something to do with the deep bowels of the import machinery and
21 # has something to do with the deep bowels of the import machinery and
@@ -33,11 +33,7 b' class ShimModule(types.ModuleType):'
33 # called with 'foo.bar....'
33 # called with 'foo.bar....'
34 package, obj = parts
34 package, obj = parts
35 module = __import__(package, fromlist=[obj])
35 module = __import__(package, fromlist=[obj])
36 try:
36 return getattr(module, obj)
37 pak = module.__dict__[obj]
38 except KeyError:
39 raise AttributeError(obj)
40 return pak
41 else:
37 else:
42 # called with un-dotted string
38 # called with un-dotted string
43 return __import__(parts[0])
39 return __import__(parts[0])
@@ -25,7 +25,7 b' from IPython.utils.zmqrelated import check_for_zmq'
25
25
26 min_pyzmq = '2.1.11'
26 min_pyzmq = '2.1.11'
27
27
28 check_for_zmq(min_pyzmq, 'IPython.parallel')
28 check_for_zmq(min_pyzmq, 'ipython_parallel')
29
29
30 from IPython.utils.pickleutil import Reference
30 from IPython.utils.pickleutil import Reference
31
31
@@ -51,7 +51,7 b' def bind_kernel(**kwargs):'
51 This function returns immediately.
51 This function returns immediately.
52 """
52 """
53 from IPython.kernel.zmq.kernelapp import IPKernelApp
53 from IPython.kernel.zmq.kernelapp import IPKernelApp
54 from IPython.parallel.apps.ipengineapp import IPEngineApp
54 from ipython_parallel.apps.ipengineapp import IPEngineApp
55
55
56 # first check for IPKernelApp, in which case this should be a no-op
56 # first check for IPKernelApp, in which case this should be a no-op
57 # because there is already a bound kernel
57 # because there is already a bound kernel
1 NO CONTENT: file renamed from IPython/parallel/apps/__init__.py to ipython_parallel/apps/__init__.py
NO CONTENT: file renamed from IPython/parallel/apps/__init__.py to ipython_parallel/apps/__init__.py
@@ -1,6 +1,6 b''
1 # encoding: utf-8
1 # encoding: utf-8
2 """
2 """
3 The Base Application class for IPython.parallel apps
3 The Base Application class for ipython_parallel apps
4 """
4 """
5
5
6
6
@@ -70,7 +70,7 b' base_flags = {'
70 base_flags.update(base_ip_flags)
70 base_flags.update(base_ip_flags)
71
71
72 class BaseParallelApplication(BaseIPythonApplication):
72 class BaseParallelApplication(BaseIPythonApplication):
73 """The base Application for IPython.parallel apps
73 """The base Application for ipython_parallel apps
74
74
75 Principle extensions to BaseIPyythonApplication:
75 Principle extensions to BaseIPyythonApplication:
76
76
@@ -23,7 +23,7 b' from IPython.utils.sysinfo import num_cpus'
23 from IPython.utils.traitlets import (Integer, Unicode, Bool, CFloat, Dict, List, Any,
23 from IPython.utils.traitlets import (Integer, Unicode, Bool, CFloat, Dict, List, Any,
24 DottedObjectName)
24 DottedObjectName)
25
25
26 from IPython.parallel.apps.baseapp import (
26 from ipython_parallel.apps.baseapp import (
27 BaseParallelApplication,
27 BaseParallelApplication,
28 PIDFileError,
28 PIDFileError,
29 base_flags, base_aliases
29 base_flags, base_aliases
@@ -106,7 +106,7 b' def find_launcher_class(clsname, kind):'
106 # doesn't match necessary full class name, assume it's
106 # doesn't match necessary full class name, assume it's
107 # just 'PBS' or 'MPI' etc prefix:
107 # just 'PBS' or 'MPI' etc prefix:
108 clsname = clsname + kind + 'Launcher'
108 clsname = clsname + kind + 'Launcher'
109 clsname = 'IPython.parallel.apps.launcher.'+clsname
109 clsname = 'ipython_parallel.apps.launcher.'+clsname
110 klass = import_item(clsname)
110 klass = import_item(clsname)
111 return klass
111 return klass
112
112
@@ -228,7 +228,7 b' class IPClusterEngines(BaseParallelApplication):'
228 default_log_level = logging.INFO
228 default_log_level = logging.INFO
229 classes = List()
229 classes = List()
230 def _classes_default(self):
230 def _classes_default(self):
231 from IPython.parallel.apps import launcher
231 from ipython_parallel.apps import launcher
232 launchers = launcher.all_launchers
232 launchers = launcher.all_launchers
233 eslaunchers = [ l for l in launchers if 'EngineSet' in l.__name__]
233 eslaunchers = [ l for l in launchers if 'EngineSet' in l.__name__]
234 return [ProfileDir]+eslaunchers
234 return [ProfileDir]+eslaunchers
@@ -432,7 +432,7 b' class IPClusterStart(IPClusterEngines):'
432 help="whether to create the profile_dir if it doesn't exist")
432 help="whether to create the profile_dir if it doesn't exist")
433 classes = List()
433 classes = List()
434 def _classes_default(self,):
434 def _classes_default(self,):
435 from IPython.parallel.apps import launcher
435 from ipython_parallel.apps import launcher
436 return [ProfileDir] + [IPClusterEngines] + launcher.all_launchers
436 return [ProfileDir] + [IPClusterEngines] + launcher.all_launchers
437
437
438 clean_logs = Bool(True, config=True,
438 clean_logs = Bool(True, config=True,
@@ -562,7 +562,7 b' class IPClusterStart(IPClusterEngines):'
562 finally:
562 finally:
563 self.remove_pid_file()
563 self.remove_pid_file()
564
564
565 base='IPython.parallel.apps.ipclusterapp.IPCluster'
565 base='ipython_parallel.apps.ipclusterapp.IPCluster'
566
566
567 class IPClusterApp(BaseIPythonApplication):
567 class IPClusterApp(BaseIPythonApplication):
568 name = u'ipcluster'
568 name = u'ipcluster'
@@ -37,7 +37,7 b' from zmq.log.handlers import PUBHandler'
37
37
38 from IPython.core.profiledir import ProfileDir
38 from IPython.core.profiledir import ProfileDir
39
39
40 from IPython.parallel.apps.baseapp import (
40 from ipython_parallel.apps.baseapp import (
41 BaseParallelApplication,
41 BaseParallelApplication,
42 base_aliases,
42 base_aliases,
43 base_flags,
43 base_flags,
@@ -51,25 +51,25 b' from IPython.kernel.zmq.session import ('
51 Session, session_aliases, session_flags,
51 Session, session_aliases, session_flags,
52 )
52 )
53
53
54 from IPython.parallel.controller.heartmonitor import HeartMonitor
54 from ipython_parallel.controller.heartmonitor import HeartMonitor
55 from IPython.parallel.controller.hub import HubFactory
55 from ipython_parallel.controller.hub import HubFactory
56 from IPython.parallel.controller.scheduler import TaskScheduler,launch_scheduler
56 from ipython_parallel.controller.scheduler import TaskScheduler,launch_scheduler
57 from IPython.parallel.controller.dictdb import DictDB
57 from ipython_parallel.controller.dictdb import DictDB
58
58
59 from IPython.parallel.util import split_url, disambiguate_url, set_hwm
59 from ipython_parallel.util import split_url, disambiguate_url, set_hwm
60
60
61 # conditional import of SQLiteDB / MongoDB backend class
61 # conditional import of SQLiteDB / MongoDB backend class
62 real_dbs = []
62 real_dbs = []
63
63
64 try:
64 try:
65 from IPython.parallel.controller.sqlitedb import SQLiteDB
65 from ipython_parallel.controller.sqlitedb import SQLiteDB
66 except ImportError:
66 except ImportError:
67 pass
67 pass
68 else:
68 else:
69 real_dbs.append(SQLiteDB)
69 real_dbs.append(SQLiteDB)
70
70
71 try:
71 try:
72 from IPython.parallel.controller.mongodb import MongoDB
72 from ipython_parallel.controller.mongodb import MongoDB
73 except ImportError:
73 except ImportError:
74 pass
74 pass
75 else:
75 else:
@@ -106,13 +106,13 b' flags.update(base_flags)'
106 flags.update({
106 flags.update({
107 'usethreads' : ( {'IPControllerApp' : {'use_threads' : True}},
107 'usethreads' : ( {'IPControllerApp' : {'use_threads' : True}},
108 'Use threads instead of processes for the schedulers'),
108 'Use threads instead of processes for the schedulers'),
109 'sqlitedb' : ({'HubFactory' : {'db_class' : 'IPython.parallel.controller.sqlitedb.SQLiteDB'}},
109 'sqlitedb' : ({'HubFactory' : {'db_class' : 'ipython_parallel.controller.sqlitedb.SQLiteDB'}},
110 'use the SQLiteDB backend'),
110 'use the SQLiteDB backend'),
111 'mongodb' : ({'HubFactory' : {'db_class' : 'IPython.parallel.controller.mongodb.MongoDB'}},
111 'mongodb' : ({'HubFactory' : {'db_class' : 'ipython_parallel.controller.mongodb.MongoDB'}},
112 'use the MongoDB backend'),
112 'use the MongoDB backend'),
113 'dictdb' : ({'HubFactory' : {'db_class' : 'IPython.parallel.controller.dictdb.DictDB'}},
113 'dictdb' : ({'HubFactory' : {'db_class' : 'ipython_parallel.controller.dictdb.DictDB'}},
114 'use the in-memory DictDB backend'),
114 'use the in-memory DictDB backend'),
115 'nodb' : ({'HubFactory' : {'db_class' : 'IPython.parallel.controller.dictdb.NoDB'}},
115 'nodb' : ({'HubFactory' : {'db_class' : 'ipython_parallel.controller.dictdb.NoDB'}},
116 """use dummy DB backend, which doesn't store any information.
116 """use dummy DB backend, which doesn't store any information.
117
117
118 This is the default as of IPython 0.13.
118 This is the default as of IPython 0.13.
@@ -30,7 +30,7 b' import zmq'
30 from zmq.eventloop import ioloop
30 from zmq.eventloop import ioloop
31
31
32 from IPython.core.profiledir import ProfileDir
32 from IPython.core.profiledir import ProfileDir
33 from IPython.parallel.apps.baseapp import (
33 from ipython_parallel.apps.baseapp import (
34 BaseParallelApplication,
34 BaseParallelApplication,
35 base_aliases,
35 base_aliases,
36 base_flags,
36 base_flags,
@@ -46,8 +46,8 b' from IPython.kernel.zmq.zmqshell import ZMQInteractiveShell'
46
46
47 from IPython.config.configurable import Configurable
47 from IPython.config.configurable import Configurable
48
48
49 from IPython.parallel.engine.engine import EngineFactory
49 from ipython_parallel.engine.engine import EngineFactory
50 from IPython.parallel.util import disambiguate_ip_address
50 from ipython_parallel.util import disambiguate_ip_address
51
51
52 from IPython.utils.importstring import import_item
52 from IPython.utils.importstring import import_item
53 from IPython.utils.py3compat import cast_bytes
53 from IPython.utils.py3compat import cast_bytes
@@ -28,12 +28,12 b' import zmq'
28 from IPython.core.profiledir import ProfileDir
28 from IPython.core.profiledir import ProfileDir
29 from IPython.utils.traitlets import Bool, Dict, Unicode
29 from IPython.utils.traitlets import Bool, Dict, Unicode
30
30
31 from IPython.parallel.apps.baseapp import (
31 from ipython_parallel.apps.baseapp import (
32 BaseParallelApplication,
32 BaseParallelApplication,
33 base_aliases,
33 base_aliases,
34 catch_config_error,
34 catch_config_error,
35 )
35 )
36 from IPython.parallel.apps.logwatcher import LogWatcher
36 from ipython_parallel.apps.logwatcher import LogWatcher
37
37
38 #-----------------------------------------------------------------------------
38 #-----------------------------------------------------------------------------
39 # Module level variables
39 # Module level variables
@@ -61,19 +61,19 b" WINDOWS = os.name == 'nt'"
61 # Paths to the kernel apps
61 # Paths to the kernel apps
62 #-----------------------------------------------------------------------------
62 #-----------------------------------------------------------------------------
63
63
64 ipcluster_cmd_argv = [sys.executable, "-m", "IPython.parallel.cluster"]
64 ipcluster_cmd_argv = [sys.executable, "-m", "ipython_parallel.cluster"]
65
65
66 ipengine_cmd_argv = [sys.executable, "-m", "IPython.parallel.engine"]
66 ipengine_cmd_argv = [sys.executable, "-m", "ipython_parallel.engine"]
67
67
68 ipcontroller_cmd_argv = [sys.executable, "-m", "IPython.parallel.controller"]
68 ipcontroller_cmd_argv = [sys.executable, "-m", "ipython_parallel.controller"]
69
69
70 if WINDOWS and sys.version_info < (3,):
70 if WINDOWS and sys.version_info < (3,):
71 # `python -m package` doesn't work on Windows Python 2
71 # `python -m package` doesn't work on Windows Python 2
72 # due to weird multiprocessing bugs
72 # due to weird multiprocessing bugs
73 # and python -m module puts classes in the `__main__` module,
73 # and python -m module puts classes in the `__main__` module,
74 # so instance checks get confused
74 # so instance checks get confused
75 ipengine_cmd_argv = [sys.executable, "-c", "from IPython.parallel.engine.__main__ import main; main()"]
75 ipengine_cmd_argv = [sys.executable, "-c", "from ipython_parallel.engine.__main__ import main; main()"]
76 ipcontroller_cmd_argv = [sys.executable, "-c", "from IPython.parallel.controller.__main__ import main; main()"]
76 ipcontroller_cmd_argv = [sys.executable, "-c", "from ipython_parallel.controller.__main__ import main; main()"]
77
77
78 #-----------------------------------------------------------------------------
78 #-----------------------------------------------------------------------------
79 # Base launchers and errors
79 # Base launchers and errors
1 NO CONTENT: file renamed from IPython/parallel/apps/logwatcher.py to ipython_parallel/apps/logwatcher.py
NO CONTENT: file renamed from IPython/parallel/apps/logwatcher.py to ipython_parallel/apps/logwatcher.py
1 NO CONTENT: file renamed from IPython/parallel/apps/win32support.py to ipython_parallel/apps/win32support.py
NO CONTENT: file renamed from IPython/parallel/apps/win32support.py to ipython_parallel/apps/win32support.py
1 NO CONTENT: file renamed from IPython/parallel/apps/winhpcjob.py to ipython_parallel/apps/winhpcjob.py
NO CONTENT: file renamed from IPython/parallel/apps/winhpcjob.py to ipython_parallel/apps/winhpcjob.py
1 NO CONTENT: file renamed from IPython/parallel/client/__init__.py to ipython_parallel/client/__init__.py
NO CONTENT: file renamed from IPython/parallel/client/__init__.py to ipython_parallel/client/__init__.py
@@ -13,7 +13,7 b' from zmq import MessageTracker'
13
13
14 from IPython.core.display import clear_output, display, display_pretty
14 from IPython.core.display import clear_output, display, display_pretty
15 from decorator import decorator
15 from decorator import decorator
16 from IPython.parallel import error
16 from ipython_parallel import error
17 from IPython.utils.py3compat import string_types
17 from IPython.utils.py3compat import string_types
18
18
19
19
@@ -33,9 +33,9 b' from IPython.utils.traitlets import (HasTraits, Integer, Instance, Unicode,'
33 Dict, List, Bool, Set, Any)
33 Dict, List, Bool, Set, Any)
34 from decorator import decorator
34 from decorator import decorator
35
35
36 from IPython.parallel import Reference
36 from ipython_parallel import Reference
37 from IPython.parallel import error
37 from ipython_parallel import error
38 from IPython.parallel import util
38 from ipython_parallel import util
39
39
40 from IPython.kernel.zmq.session import Session, Message
40 from IPython.kernel.zmq.session import Session, Message
41 from IPython.kernel.zmq import serialize
41 from IPython.kernel.zmq import serialize
@@ -1197,7 +1197,7 b' class Client(HasTraits):'
1197 NOT IMPLEMENTED
1197 NOT IMPLEMENTED
1198 whether to restart engines after shutting them down.
1198 whether to restart engines after shutting them down.
1199 """
1199 """
1200 from IPython.parallel.error import NoEnginesRegistered
1200 from ipython_parallel.error import NoEnginesRegistered
1201 if restart:
1201 if restart:
1202 raise NotImplementedError("Engine restart is not yet implemented")
1202 raise NotImplementedError("Engine restart is not yet implemented")
1203
1203
1 NO CONTENT: file renamed from IPython/parallel/client/magics.py to ipython_parallel/client/magics.py
NO CONTENT: file renamed from IPython/parallel/client/magics.py to ipython_parallel/client/magics.py
1 NO CONTENT: file renamed from IPython/parallel/client/map.py to ipython_parallel/client/map.py
NO CONTENT: file renamed from IPython/parallel/client/map.py to ipython_parallel/client/map.py
1 NO CONTENT: file renamed from IPython/parallel/client/remotefunction.py to ipython_parallel/client/remotefunction.py
NO CONTENT: file renamed from IPython/parallel/client/remotefunction.py to ipython_parallel/client/remotefunction.py
@@ -20,8 +20,8 b' from IPython.utils.traitlets import ('
20 )
20 )
21 from decorator import decorator
21 from decorator import decorator
22
22
23 from IPython.parallel import util
23 from ipython_parallel import util
24 from IPython.parallel.controller.dependency import Dependency, dependent
24 from ipython_parallel.controller.dependency import Dependency, dependent
25 from IPython.utils.py3compat import string_types, iteritems, PY3
25 from IPython.utils.py3compat import string_types, iteritems, PY3
26
26
27 from . import map as Map
27 from . import map as Map
@@ -107,7 +107,7 b' class View(HasTraits):'
107 history=List()
107 history=List()
108 outstanding = Set()
108 outstanding = Set()
109 results = Dict()
109 results = Dict()
110 client = Instance('IPython.parallel.Client')
110 client = Instance('ipython_parallel.Client')
111
111
112 _socket = Instance('zmq.Socket')
112 _socket = Instance('zmq.Socket')
113 _flag_names = List(['targets', 'block', 'track'])
113 _flag_names = List(['targets', 'block', 'track'])
@@ -215,7 +215,7 b' class View(HasTraits):'
215
215
216 This method sets all apply flags via this View's attributes.
216 This method sets all apply flags via this View's attributes.
217
217
218 Returns :class:`~IPython.parallel.client.asyncresult.AsyncResult`
218 Returns :class:`~ipython_parallel.client.asyncresult.AsyncResult`
219 instance if ``self.block`` is False, otherwise the return value of
219 instance if ``self.block`` is False, otherwise the return value of
220 ``f(*args, **kwargs)``.
220 ``f(*args, **kwargs)``.
221 """
221 """
@@ -224,7 +224,7 b' class View(HasTraits):'
224 def apply_async(self, f, *args, **kwargs):
224 def apply_async(self, f, *args, **kwargs):
225 """calls ``f(*args, **kwargs)`` on remote engines in a nonblocking manner.
225 """calls ``f(*args, **kwargs)`` on remote engines in a nonblocking manner.
226
226
227 Returns :class:`~IPython.parallel.client.asyncresult.AsyncResult` instance.
227 Returns :class:`~ipython_parallel.client.asyncresult.AsyncResult` instance.
228 """
228 """
229 return self._really_apply(f, args, kwargs, block=False)
229 return self._really_apply(f, args, kwargs, block=False)
230
230
@@ -307,7 +307,7 b' class View(HasTraits):'
307 def get_result(self, indices_or_msg_ids=None, block=None, owner=True):
307 def get_result(self, indices_or_msg_ids=None, block=None, owner=True):
308 """return one or more results, specified by history index or msg_id.
308 """return one or more results, specified by history index or msg_id.
309
309
310 See :meth:`IPython.parallel.client.client.Client.get_result` for details.
310 See :meth:`ipython_parallel.client.client.Client.get_result` for details.
311 """
311 """
312
312
313 if indices_or_msg_ids is None:
313 if indices_or_msg_ids is None:
@@ -603,7 +603,7 b' class DirectView(View):'
603
603
604
604
605 If block=False
605 If block=False
606 An :class:`~IPython.parallel.client.asyncresult.AsyncMapResult` instance.
606 An :class:`~ipython_parallel.client.asyncresult.AsyncMapResult` instance.
607 An object like AsyncResult, but which reassembles the sequence of results
607 An object like AsyncResult, but which reassembles the sequence of results
608 into a single list. AsyncMapResults can be iterated through before all
608 into a single list. AsyncMapResults can be iterated through before all
609 results are complete.
609 results are complete.
@@ -832,7 +832,7 b' class DirectView(View):'
832 on the even engines.
832 on the even engines.
833 """
833 """
834
834
835 from IPython.parallel.client.magics import ParallelMagics
835 from ipython_parallel.client.magics import ParallelMagics
836
836
837 try:
837 try:
838 # This is injected into __builtins__.
838 # This is injected into __builtins__.
@@ -1099,7 +1099,7 b' class LoadBalancedView(View):'
1099 -------
1099 -------
1100
1100
1101 if block=False
1101 if block=False
1102 An :class:`~IPython.parallel.client.asyncresult.AsyncMapResult` instance.
1102 An :class:`~ipython_parallel.client.asyncresult.AsyncMapResult` instance.
1103 An object like AsyncResult, but which reassembles the sequence of results
1103 An object like AsyncResult, but which reassembles the sequence of results
1104 into a single list. AsyncMapResults can be iterated through before all
1104 into a single list. AsyncMapResults can be iterated through before all
1105 results are complete.
1105 results are complete.
@@ -1,3 +1,3 b''
1 if __name__ == '__main__':
1 if __name__ == '__main__':
2 from IPython.parallel.apps import ipclusterapp as app
2 from ipython_parallel.apps import ipclusterapp as app
3 app.launch_new_instance()
3 app.launch_new_instance()
1 NO CONTENT: file renamed from IPython/parallel/controller/__init__.py to ipython_parallel/controller/__init__.py
NO CONTENT: file renamed from IPython/parallel/controller/__init__.py to ipython_parallel/controller/__init__.py
@@ -1,5 +1,5 b''
1 def main():
1 def main():
2 from IPython.parallel.apps import ipcontrollerapp as app
2 from ipython_parallel.apps import ipcontrollerapp as app
3 app.launch_new_instance()
3 app.launch_new_instance()
4
4
5 if __name__ == '__main__':
5 if __name__ == '__main__':
@@ -13,9 +13,9 b' Authors:'
13
13
14 from types import ModuleType
14 from types import ModuleType
15
15
16 from IPython.parallel.client.asyncresult import AsyncResult
16 from ipython_parallel.client.asyncresult import AsyncResult
17 from IPython.parallel.error import UnmetDependency
17 from ipython_parallel.error import UnmetDependency
18 from IPython.parallel.util import interactive
18 from ipython_parallel.util import interactive
19 from IPython.utils import py3compat
19 from IPython.utils import py3compat
20 from IPython.utils.py3compat import string_types
20 from IPython.utils.py3compat import string_types
21 from IPython.utils.pickleutil import can, uncan
21 from IPython.utils.pickleutil import can, uncan
@@ -80,7 +80,7 b' class dependent(object):'
80 @interactive
80 @interactive
81 def _require(*modules, **mapping):
81 def _require(*modules, **mapping):
82 """Helper for @require decorator."""
82 """Helper for @require decorator."""
83 from IPython.parallel.error import UnmetDependency
83 from ipython_parallel.error import UnmetDependency
84 from IPython.utils.pickleutil import uncan
84 from IPython.utils.pickleutil import uncan
85 user_ns = globals()
85 user_ns = globals()
86 for name in modules:
86 for name in modules:
1 NO CONTENT: file renamed from IPython/parallel/controller/dictdb.py to ipython_parallel/controller/dictdb.py
NO CONTENT: file renamed from IPython/parallel/controller/dictdb.py to ipython_parallel/controller/dictdb.py
@@ -19,7 +19,7 b' from IPython.config.configurable import LoggingConfigurable'
19 from IPython.utils.py3compat import str_to_bytes
19 from IPython.utils.py3compat import str_to_bytes
20 from IPython.utils.traitlets import Set, Instance, CFloat, Integer, Dict, Bool
20 from IPython.utils.traitlets import Set, Instance, CFloat, Integer, Dict, Bool
21
21
22 from IPython.parallel.util import log_errors
22 from ipython_parallel.util import log_errors
23
23
24 class Heart(object):
24 class Heart(object):
25 """A basic heart object for responding to a HeartMonitor.
25 """A basic heart object for responding to a HeartMonitor.
@@ -27,8 +27,8 b' from IPython.utils.traitlets import ('
27 HasTraits, Any, Instance, Integer, Unicode, Dict, Set, Tuple, DottedObjectName
27 HasTraits, Any, Instance, Integer, Unicode, Dict, Set, Tuple, DottedObjectName
28 )
28 )
29
29
30 from IPython.parallel import error, util
30 from ipython_parallel import error, util
31 from IPython.parallel.factory import RegistrationFactory
31 from ipython_parallel.factory import RegistrationFactory
32
32
33 from IPython.kernel.zmq.session import SessionFactory
33 from IPython.kernel.zmq.session import SessionFactory
34
34
@@ -114,10 +114,10 b' class EngineConnector(HasTraits):'
114
114
115
115
116 _db_shortcuts = {
116 _db_shortcuts = {
117 'sqlitedb' : 'IPython.parallel.controller.sqlitedb.SQLiteDB',
117 'sqlitedb' : 'ipython_parallel.controller.sqlitedb.SQLiteDB',
118 'mongodb' : 'IPython.parallel.controller.mongodb.MongoDB',
118 'mongodb' : 'ipython_parallel.controller.mongodb.MongoDB',
119 'dictdb' : 'IPython.parallel.controller.dictdb.DictDB',
119 'dictdb' : 'ipython_parallel.controller.dictdb.DictDB',
120 'nodb' : 'IPython.parallel.controller.dictdb.NoDB',
120 'nodb' : 'ipython_parallel.controller.dictdb.NoDB',
121 }
121 }
122
122
123 class HubFactory(RegistrationFactory):
123 class HubFactory(RegistrationFactory):
@@ -211,8 +211,8 b' class HubFactory(RegistrationFactory):'
211 return max(30, int(.01 * self.heartmonitor.period))
211 return max(30, int(.01 * self.heartmonitor.period))
212
212
213 # not configurable
213 # not configurable
214 db = Instance('IPython.parallel.controller.dictdb.BaseDB')
214 db = Instance('ipython_parallel.controller.dictdb.BaseDB')
215 heartmonitor = Instance('IPython.parallel.controller.heartmonitor.HeartMonitor')
215 heartmonitor = Instance('ipython_parallel.controller.heartmonitor.HeartMonitor')
216
216
217 def _ip_changed(self, name, old, new):
217 def _ip_changed(self, name, old, new):
218 self.engine_ip = new
218 self.engine_ip = new
1 NO CONTENT: file renamed from IPython/parallel/controller/mongodb.py to ipython_parallel/controller/mongodb.py
NO CONTENT: file renamed from IPython/parallel/controller/mongodb.py to ipython_parallel/controller/mongodb.py
@@ -32,9 +32,9 b' from IPython.config.loader import Config'
32 from IPython.utils.traitlets import Instance, Dict, List, Set, Integer, Enum, CBytes
32 from IPython.utils.traitlets import Instance, Dict, List, Set, Integer, Enum, CBytes
33 from IPython.utils.py3compat import cast_bytes
33 from IPython.utils.py3compat import cast_bytes
34
34
35 from IPython.parallel import error, util
35 from ipython_parallel import error, util
36 from IPython.parallel.factory import SessionFactory
36 from ipython_parallel.factory import SessionFactory
37 from IPython.parallel.util import connect_logger, local_logger
37 from ipython_parallel.util import connect_logger, local_logger
38
38
39 from .dependency import Dependency
39 from .dependency import Dependency
40
40
1 NO CONTENT: file renamed from IPython/parallel/controller/sqlitedb.py to ipython_parallel/controller/sqlitedb.py
NO CONTENT: file renamed from IPython/parallel/controller/sqlitedb.py to ipython_parallel/controller/sqlitedb.py
1 NO CONTENT: file renamed from IPython/parallel/engine/__init__.py to ipython_parallel/engine/__init__.py
NO CONTENT: file renamed from IPython/parallel/engine/__init__.py to ipython_parallel/engine/__init__.py
@@ -1,5 +1,5 b''
1 def main():
1 def main():
2 from IPython.parallel.apps import ipengineapp as app
2 from ipython_parallel.apps import ipengineapp as app
3 app.launch_new_instance()
3 app.launch_new_instance()
4
4
5 if __name__ == '__main__':
5 if __name__ == '__main__':
@@ -21,9 +21,9 b' from IPython.utils.traitlets import ('
21 )
21 )
22 from IPython.utils.py3compat import cast_bytes
22 from IPython.utils.py3compat import cast_bytes
23
23
24 from IPython.parallel.controller.heartmonitor import Heart
24 from ipython_parallel.controller.heartmonitor import Heart
25 from IPython.parallel.factory import RegistrationFactory
25 from ipython_parallel.factory import RegistrationFactory
26 from IPython.parallel.util import disambiguate_url
26 from ipython_parallel.util import disambiguate_url
27
27
28 from IPython.kernel.zmq.ipkernel import IPythonKernel as Kernel
28 from IPython.kernel.zmq.ipkernel import IPythonKernel as Kernel
29 from IPython.kernel.zmq.kernelapp import IPKernelApp
29 from IPython.kernel.zmq.kernelapp import IPKernelApp
@@ -4,7 +4,7 b''
4
4
5 Inheritance diagram:
5 Inheritance diagram:
6
6
7 .. inheritance-diagram:: IPython.parallel.error
7 .. inheritance-diagram:: ipython_parallel.error
8 :parts: 3
8 :parts: 3
9
9
10 Authors:
10 Authors:
@@ -19,7 +19,7 b' Authors:'
19 from IPython.utils.localinterfaces import localhost
19 from IPython.utils.localinterfaces import localhost
20 from IPython.utils.traitlets import Integer, Unicode
20 from IPython.utils.traitlets import Integer, Unicode
21
21
22 from IPython.parallel.util import select_random_ports
22 from ipython_parallel.util import select_random_ports
23 from IPython.kernel.zmq.session import SessionFactory
23 from IPython.kernel.zmq.session import SessionFactory
24
24
25 #-----------------------------------------------------------------------------
25 #-----------------------------------------------------------------------------
@@ -1,3 +1,3 b''
1 if __name__ == '__main__':
1 if __name__ == '__main__':
2 from IPython.parallel.apps import iploggerapp as app
2 from ipython_parallel.apps import iploggerapp as app
3 app.launch_new_instance()
3 app.launch_new_instance()
@@ -20,8 +20,8 b' from subprocess import Popen, PIPE, STDOUT'
20 import nose
20 import nose
21
21
22 from IPython.utils.path import get_ipython_dir
22 from IPython.utils.path import get_ipython_dir
23 from IPython.parallel import Client, error
23 from ipython_parallel import Client, error
24 from IPython.parallel.apps.launcher import (LocalProcessLauncher,
24 from ipython_parallel.apps.launcher import (LocalProcessLauncher,
25 ipengine_cmd_argv,
25 ipengine_cmd_argv,
26 ipcontroller_cmd_argv,
26 ipcontroller_cmd_argv,
27 SIGKILL,
27 SIGKILL,
@@ -24,10 +24,10 b' from zmq.tests import BaseZMQTestCase'
24
24
25 from decorator import decorator
25 from decorator import decorator
26
26
27 from IPython.parallel import error
27 from ipython_parallel import error
28 from IPython.parallel import Client
28 from ipython_parallel import Client
29
29
30 from IPython.parallel.tests import launchers, add_engines
30 from ipython_parallel.tests import launchers, add_engines
31
31
32 # simple tasks for use in apply tests
32 # simple tasks for use in apply tests
33
33
@@ -9,9 +9,9 b' import nose.tools as nt'
9
9
10 from IPython.utils.io import capture_output
10 from IPython.utils.io import capture_output
11
11
12 from IPython.parallel.error import TimeoutError
12 from ipython_parallel.error import TimeoutError
13 from IPython.parallel import error, Client
13 from ipython_parallel import error, Client
14 from IPython.parallel.tests import add_engines
14 from ipython_parallel.tests import add_engines
15 from .clienttest import ClusterTestCase
15 from .clienttest import ClusterTestCase
16 from IPython.utils.py3compat import iteritems
16 from IPython.utils.py3compat import iteritems
17
17
@@ -11,10 +11,10 b' from datetime import datetime'
11 import zmq
11 import zmq
12
12
13 from IPython import parallel
13 from IPython import parallel
14 from IPython.parallel.client import client as clientmod
14 from ipython_parallel.client import client as clientmod
15 from IPython.parallel import error
15 from ipython_parallel import error
16 from IPython.parallel import AsyncResult, AsyncHubResult
16 from ipython_parallel import AsyncResult, AsyncHubResult
17 from IPython.parallel import LoadBalancedView, DirectView
17 from ipython_parallel import LoadBalancedView, DirectView
18
18
19 from .clienttest import ClusterTestCase, segfault, wait, add_engines
19 from .clienttest import ClusterTestCase, segfault, wait, add_engines
20
20
@@ -26,10 +26,10 b' import time'
26 from datetime import datetime, timedelta
26 from datetime import datetime, timedelta
27 from unittest import TestCase
27 from unittest import TestCase
28
28
29 from IPython.parallel import error
29 from ipython_parallel import error
30 from IPython.parallel.controller.dictdb import DictDB
30 from ipython_parallel.controller.dictdb import DictDB
31 from IPython.parallel.controller.sqlitedb import SQLiteDB
31 from ipython_parallel.controller.sqlitedb import SQLiteDB
32 from IPython.parallel.controller.hub import init_record, empty_record
32 from ipython_parallel.controller.hub import init_record, empty_record
33
33
34 from IPython.testing import decorators as dec
34 from IPython.testing import decorators as dec
35 from IPython.kernel.zmq.session import Session
35 from IPython.kernel.zmq.session import Session
@@ -23,10 +23,10 b' import os'
23
23
24 from IPython.utils.pickleutil import can, uncan
24 from IPython.utils.pickleutil import can, uncan
25
25
26 import IPython.parallel as pmod
26 import ipython_parallel as pmod
27 from IPython.parallel.util import interactive
27 from ipython_parallel.util import interactive
28
28
29 from IPython.parallel.tests import add_engines
29 from ipython_parallel.tests import add_engines
30 from .clienttest import ClusterTestCase
30 from .clienttest import ClusterTestCase
31
31
32 def setup():
32 def setup():
@@ -31,7 +31,7 b' from nose import SkipTest'
31
31
32 from IPython.config import Config
32 from IPython.config import Config
33
33
34 from IPython.parallel.apps import launcher
34 from ipython_parallel.apps import launcher
35
35
36 from IPython.testing import decorators as dec
36 from IPython.testing import decorators as dec
37 from IPython.utils.py3compat import string_types
37 from IPython.utils.py3compat import string_types
@@ -24,9 +24,9 b' from nose import SkipTest'
24 from nose.plugins.attrib import attr
24 from nose.plugins.attrib import attr
25
25
26 from IPython import parallel as pmod
26 from IPython import parallel as pmod
27 from IPython.parallel import error
27 from ipython_parallel import error
28
28
29 from IPython.parallel.tests import add_engines
29 from ipython_parallel.tests import add_engines
30
30
31 from .clienttest import ClusterTestCase, crash, wait, skip_without
31 from .clienttest import ClusterTestCase, crash, wait, skip_without
32
32
@@ -24,9 +24,9 b' from IPython.testing import decorators as dec'
24 from IPython.utils.io import capture_output
24 from IPython.utils.io import capture_output
25
25
26 from IPython import parallel as pmod
26 from IPython import parallel as pmod
27 from IPython.parallel import AsyncResult
27 from ipython_parallel import AsyncResult
28
28
29 from IPython.parallel.tests import add_engines
29 from ipython_parallel.tests import add_engines
30
30
31 from .clienttest import ClusterTestCase, generate_output
31 from .clienttest import ClusterTestCase, generate_output
32
32
@@ -23,7 +23,7 b' from unittest import TestCase'
23 from nose import SkipTest
23 from nose import SkipTest
24
24
25 from pymongo import Connection
25 from pymongo import Connection
26 from IPython.parallel.controller.mongodb import MongoDB
26 from ipython_parallel.controller.mongodb import MongoDB
27
27
28 from . import test_db
28 from . import test_db
29
29
@@ -19,11 +19,11 b' from IPython.utils.io import capture_output'
19 from IPython.utils.py3compat import unicode_type
19 from IPython.utils.py3compat import unicode_type
20
20
21 from IPython import parallel as pmod
21 from IPython import parallel as pmod
22 from IPython.parallel import error
22 from ipython_parallel import error
23 from IPython.parallel import AsyncResult, AsyncHubResult, AsyncMapResult
23 from ipython_parallel import AsyncResult, AsyncHubResult, AsyncMapResult
24 from IPython.parallel.util import interactive
24 from ipython_parallel.util import interactive
25
25
26 from IPython.parallel.tests import add_engines
26 from ipython_parallel.tests import add_engines
27
27
28 from .clienttest import ClusterTestCase, crash, wait, skip_without
28 from .clienttest import ClusterTestCase, crash, wait, skip_without
29
29
@@ -799,7 +799,7 b' class TestView(ClusterTestCase):'
799
799
800 def test_return_namedtuple(self):
800 def test_return_namedtuple(self):
801 def namedtuplify(x, y):
801 def namedtuplify(x, y):
802 from IPython.parallel.tests.test_view import point
802 from ipython_parallel.tests.test_view import point
803 return point(x, y)
803 return point(x, y)
804
804
805 view = self.client[-1]
805 view = self.client[-1]
1 NO CONTENT: file renamed from IPython/parallel/util.py to ipython_parallel/util.py
NO CONTENT: file renamed from IPython/parallel/util.py to ipython_parallel/util.py
General Comments 0
You need to be logged in to leave comments. Login now