Permalink
Browse files

Merge pull request #8166 from minrk/split-jupyter-client

Big Split: IPython.kernel
  • Loading branch information...
2 parents 865ed70 + ae7f208 commit 5dfda1d4eb62a5ac7c81471957af33dba97ceb06 @Carreau Carreau committed Mar 27, 2015
Showing with 5,275 additions and 3,556 deletions.
  1. +2 −1 IPython/consoleapp.py
  2. +29 −9 IPython/kernel/__init__.py
  3. +1 −1 IPython/kernel/__main__.py
  4. +1 −374 IPython/kernel/adapter.py
  5. +1 −203 IPython/kernel/channels.py
  6. +1 −49 IPython/kernel/channelsabc.py
  7. +1 −390 IPython/kernel/client.py
  8. +1 −80 IPython/kernel/clientabc.py
  9. +2 −575 IPython/kernel/connect.py
  10. +1 −237 IPython/kernel/kernelspec.py
  11. +1 −142 IPython/kernel/kernelspecapp.py
  12. +1 −226 IPython/kernel/launcher.py
  13. +1 −442 IPython/kernel/manager.py
  14. +1 −53 IPython/kernel/managerabc.py
  15. +1 −319 IPython/kernel/multikernelmanager.py
  16. +1 −111 IPython/kernel/restarter.py
  17. +6 −3 IPython/kernel/{zmq → }/session.py
  18. +1 −230 IPython/kernel/threaded.py
  19. +0 −11 IPython/kernel/zmq/__init__.py
  20. +0 −13 IPython/kernel/zmq/logtopics.rst
  21. +5 −3 IPython/testing/iptest.py
  22. +6 −4 IPython/utils/shimmodule.py
  23. +1 −0 ipython_kernel/__init__.py
  24. +3 −0 ipython_kernel/__main__.py
  25. 0 {IPython/kernel → ipython_kernel}/comm/__init__.py
  26. +3 −3 {IPython/kernel → ipython_kernel}/comm/comm.py
  27. +2 −2 {IPython/kernel → ipython_kernel}/comm/manager.py
  28. +576 −0 ipython_kernel/connect.py
  29. +4 −4 {IPython/kernel/zmq → ipython_kernel}/datapub.py
  30. +1 −1 {IPython/kernel/zmq → ipython_kernel}/displayhook.py
  31. 0 {IPython/kernel/zmq → ipython_kernel}/embed.py
  32. +1 −1 {IPython/kernel/zmq → ipython_kernel}/eventloops.py
  33. 0 {IPython/kernel/zmq → ipython_kernel}/gui/__init__.py
  34. 0 {IPython/kernel/zmq → ipython_kernel}/gui/gtk3embed.py
  35. 0 {IPython/kernel/zmq → ipython_kernel}/gui/gtkembed.py
  36. 0 {IPython/kernel/zmq → ipython_kernel}/heartbeat.py
  37. 0 {IPython/kernel → ipython_kernel}/inprocess/__init__.py
  38. +0 −1 {IPython/kernel → ipython_kernel}/inprocess/blocking.py
  39. +1 −1 {IPython/kernel → ipython_kernel}/inprocess/channels.py
  40. +6 −6 {IPython/kernel → ipython_kernel}/inprocess/client.py
  41. +8 −8 {IPython/kernel → ipython_kernel}/inprocess/ipkernel.py
  42. +8 −8 {IPython/kernel → ipython_kernel}/inprocess/manager.py
  43. 0 {IPython/kernel → ipython_kernel}/inprocess/socket.py
  44. 0 {IPython/kernel → ipython_kernel}/inprocess/tests/__init__.py
  45. +4 −4 {IPython/kernel → ipython_kernel}/inprocess/tests/test_kernel.py
  46. +2 −2 {IPython/kernel → ipython_kernel}/inprocess/tests/test_kernelmanager.py
  47. 0 {IPython/kernel/zmq → ipython_kernel}/iostream.py
  48. +2 −2 {IPython/kernel/zmq → ipython_kernel}/ipkernel.py
  49. +6 −6 {IPython/kernel/zmq → ipython_kernel}/kernelapp.py
  50. +1 −1 {IPython/kernel/zmq → ipython_kernel}/kernelbase.py
  51. +226 −0 ipython_kernel/launcher.py
  52. 0 {IPython/kernel/zmq → ipython_kernel}/log.py
  53. 0 {IPython/kernel/zmq → ipython_kernel}/parentpoller.py
  54. 0 {IPython/kernel/tests → ipython_kernel/pylab}/__init__.py
  55. 0 {IPython/kernel/zmq → ipython_kernel}/pylab/backend_inline.py
  56. 0 {IPython/kernel/zmq → ipython_kernel}/pylab/config.py
  57. BIN {IPython/kernel → ipython_kernel}/resources/logo-32x32.png
  58. BIN {IPython/kernel → ipython_kernel}/resources/logo-64x64.png
  59. +2 −3 {IPython/kernel/zmq → ipython_kernel}/serialize.py
  60. +1 −0 ipython_kernel/session.py
  61. 0 {IPython/kernel/zmq/pylab → ipython_kernel/tests}/__init__.py
  62. +1 −1 {IPython/kernel/zmq → ipython_kernel}/tests/test_embed_kernel.py
  63. 0 {IPython/kernel → ipython_kernel}/tests/test_kernel.py
  64. 0 {IPython/kernel → ipython_kernel}/tests/test_message_spec.py
  65. +1 −1 {IPython/kernel/zmq → ipython_kernel}/tests/test_serialize.py
  66. 0 {IPython/kernel/zmq → ipython_kernel}/tests/test_start_kernel.py
  67. +4 −2 {IPython/kernel → ipython_kernel}/tests/utils.py
  68. +5 −5 {IPython/kernel/zmq → ipython_kernel}/zmqshell.py
  69. +8 −0 jupyter_client/__init__.py
  70. +374 −0 jupyter_client/adapter.py
  71. 0 {IPython/kernel → jupyter_client}/blocking/__init__.py
  72. 0 {IPython/kernel → jupyter_client}/blocking/channels.py
  73. +2 −2 {IPython/kernel → jupyter_client}/blocking/client.py
  74. +203 −0 jupyter_client/channels.py
  75. +49 −0 jupyter_client/channelsabc.py
  76. +390 −0 jupyter_client/client.py
  77. +80 −0 jupyter_client/clientabc.py
  78. +576 −0 jupyter_client/connect.py
  79. 0 {IPython/kernel → jupyter_client}/ioloop/__init__.py
  80. +2 −2 {IPython/kernel → jupyter_client}/ioloop/manager.py
  81. +1 −1 {IPython/kernel → jupyter_client}/ioloop/restarter.py
  82. +237 −0 jupyter_client/kernelspec.py
  83. +142 −0 jupyter_client/kernelspecapp.py
  84. +226 −0 jupyter_client/launcher.py
  85. +442 −0 jupyter_client/manager.py
  86. +53 −0 jupyter_client/managerabc.py
  87. +319 −0 jupyter_client/multikernelmanager.py
  88. +111 −0 jupyter_client/restarter.py
  89. +884 −0 jupyter_client/session.py
  90. 0 {IPython/kernel/zmq → jupyter_client}/tests/__init__.py
  91. +2 −2 {IPython/kernel → jupyter_client}/tests/test_adapter.py
  92. +2 −2 {IPython/kernel → jupyter_client}/tests/test_connect.py
  93. +1 −1 {IPython/kernel → jupyter_client}/tests/test_kernelmanager.py
  94. +1 −1 {IPython/kernel → jupyter_client}/tests/test_kernelspec.py
  95. +1 −1 {IPython/kernel → jupyter_client}/tests/test_launcher.py
  96. +2 −2 {IPython/kernel → jupyter_client}/tests/test_multikernelmanager.py
  97. +2 −2 {IPython/kernel → jupyter_client}/tests/test_public_api.py
  98. +1 −1 {IPython/kernel/zmq → jupyter_client}/tests/test_session.py
  99. +230 −0 jupyter_client/threaded.py
  100. +1 −1 setupbase.py
View
@@ -25,7 +25,8 @@
Dict, List, Unicode, CUnicode, CBool, Any
)
from IPython.kernel.zmq.session import Session
-from IPython.kernel.connect import ConnectionFileMixin
+from IPython.kernel import connect
+ConnectionFileMixin = connect.ConnectionFileMixin
from IPython.utils.localinterfaces import localhost
View
@@ -1,11 +1,31 @@
-"""IPython kernels and associated utilities"""
+"""
+Shim to maintain backwards compatibility with old IPython.kernel imports.
+"""
+# Copyright (c) IPython Development Team.
+# Distributed under the terms of the Modified BSD License.
-# just for friendlier zmq version check
-from . import zmq
+import sys
+from warnings import warn
-from .connect import *
-from .launcher import *
-from .client import KernelClient
-from .manager import KernelManager, run_kernel
-from .blocking import BlockingKernelClient
-from .multikernelmanager import MultiKernelManager
+warn("The `IPython.kernel` package has been deprecated. "
+ "You should import from ipython_kernel or jupyter_client instead.")
+
+
+from IPython.utils.shimmodule import ShimModule
+
+# zmq subdir is gone
+sys.modules['IPython.kernel.zmq.session'] = ShimModule('session', mirror='jupyter_client.session')
+sys.modules['IPython.kernel.zmq'] = ShimModule('zmq', mirror='ipython_kernel')
+
+for pkg in ('comm', 'inprocess'):
+ sys.modules['IPython.kernel.%s' % pkg] = ShimModule(pkg, mirror='ipython_kernel.%s' % pkg)
+
+for pkg in ('ioloop', 'blocking'):
+ sys.modules['IPython.kernel.%s' % pkg] = ShimModule(pkg, mirror='jupyter_client.%s' % pkg)
+
+# required for `from IPython.kernel import PKG`
+from ipython_kernel import comm, inprocess
+from jupyter_client import ioloop, blocking
+# public API
+from ipython_kernel.connect import *
+from jupyter_client import *
@@ -1,3 +1,3 @@
if __name__ == '__main__':
- from IPython.kernel.zmq import kernelapp as app
+ from ipython_kernel.zmq import kernelapp as app
app.launch_new_instance()
Oops, something went wrong.

0 comments on commit 5dfda1d

Please sign in to comment.