##// END OF EJS Templates
shims for jupyter_client
Min RK -
Show More
@@ -0,0 +1,67 b''
1 """IPython kernels and associated utilities
2
3 For connecting to kernels, use jupyter_client
4 """
5
6 # Copyright (c) IPython Development Team.
7 # Distributed under the terms of the Modified BSD License.
8
9 # Shim to maintain backwards compatibility with old IPython.kernel imports.
10
11 import sys
12 from warnings import warn
13
14 warn("The `IPython.kernel` package has been deprecated. "
15 "You should import from ipython_kernel or jupyter_client instead.")
16
17 from IPython.utils.shimmodule import ShimModule
18
19 # Shims for jupyter_client
20 # Can't do a single shim, because the package didn't move all together
21
22 for name in (
23 'adapter',
24 'blocking',
25 'channels',
26 'channelsabc',
27 'client',
28 'clientabc',
29 'connect',
30 'ioloop',
31 'kernelspec',
32 'kernelspecapp',
33 'launcher',
34 'manager',
35 'managerabc',
36 'multikernelmanager',
37 'restarter',
38 'threaded',
39 'tests.test_adapter',
40 'tests.test_connect',
41 'tests.test_kernelmanager',
42 'tests.test_kernelspec',
43 'tests.test_launcher',
44 'tests.test_multikernelmanager',
45 'tests.test_public_api',
46 ):
47 sys.modules['IPython.kernel.%s' % name] = \
48 ShimModule(name, mirror='jupyter_client.%s' % name)
49
50 # some files moved out of the zmq prefix
51 for name in (
52 'session',
53 'tests.test_session',
54 ):
55 sys.modules['IPython.kernel.zmq.%s' % name] = \
56 ShimModule(name, mirror='jupyter_client.%s' % name)
57 # preserve top-level API modules, all from jupyter_client
58
59 # just for friendlier zmq version check
60 from . import zmq
61
62 from jupyter_client.connect import *
63 from jupyter_client.launcher import *
64 from jupyter_client.client import KernelClient
65 from jupyter_client.manager import KernelManager, run_kernel
66 from jupyter_client.blocking import BlockingKernelClient
67 from jupyter_client.multikernelmanager import MultiKernelManager
General Comments 0
You need to be logged in to leave comments. Login now