aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/python/ipython/py3/IPython/kernel
diff options
context:
space:
mode:
authorDevtools Arcadia <arcadia-devtools@yandex-team.ru>2022-02-07 18:08:42 +0300
committerDevtools Arcadia <arcadia-devtools@mous.vla.yp-c.yandex.net>2022-02-07 18:08:42 +0300
commit1110808a9d39d4b808aef724c861a2e1a38d2a69 (patch)
treee26c9fed0de5d9873cce7e00bc214573dc2195b7 /contrib/python/ipython/py3/IPython/kernel
downloadydb-1110808a9d39d4b808aef724c861a2e1a38d2a69.tar.gz
intermediate changes
ref:cde9a383711a11544ce7e107a78147fb96cc4029
Diffstat (limited to 'contrib/python/ipython/py3/IPython/kernel')
-rw-r--r--contrib/python/ipython/py3/IPython/kernel/__init__.py35
-rw-r--r--contrib/python/ipython/py3/IPython/kernel/__main__.py3
-rw-r--r--contrib/python/ipython/py3/IPython/kernel/adapter.py1
-rw-r--r--contrib/python/ipython/py3/IPython/kernel/channels.py1
-rw-r--r--contrib/python/ipython/py3/IPython/kernel/channelsabc.py1
-rw-r--r--contrib/python/ipython/py3/IPython/kernel/client.py1
-rw-r--r--contrib/python/ipython/py3/IPython/kernel/clientabc.py1
-rw-r--r--contrib/python/ipython/py3/IPython/kernel/connect.py2
-rw-r--r--contrib/python/ipython/py3/IPython/kernel/kernelspec.py1
-rw-r--r--contrib/python/ipython/py3/IPython/kernel/kernelspecapp.py1
-rw-r--r--contrib/python/ipython/py3/IPython/kernel/launcher.py1
-rw-r--r--contrib/python/ipython/py3/IPython/kernel/manager.py1
-rw-r--r--contrib/python/ipython/py3/IPython/kernel/managerabc.py1
-rw-r--r--contrib/python/ipython/py3/IPython/kernel/multikernelmanager.py1
-rw-r--r--contrib/python/ipython/py3/IPython/kernel/restarter.py1
-rw-r--r--contrib/python/ipython/py3/IPython/kernel/threaded.py1
16 files changed, 53 insertions, 0 deletions
diff --git a/contrib/python/ipython/py3/IPython/kernel/__init__.py b/contrib/python/ipython/py3/IPython/kernel/__init__.py
new file mode 100644
index 00000000000..70a05ed4aa5
--- /dev/null
+++ b/contrib/python/ipython/py3/IPython/kernel/__init__.py
@@ -0,0 +1,35 @@
+"""
+Shim to maintain backwards compatibility with old IPython.kernel 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.kernel` package has been deprecated since IPython 4.0."
+ "You should import from ipykernel or jupyter_client instead.", ShimWarning)
+
+
+# zmq subdir is gone
+sys.modules['IPython.kernel.zmq.session'] = ShimModule(
+ src='IPython.kernel.zmq.session', mirror='jupyter_client.session')
+sys.modules['IPython.kernel.zmq'] = ShimModule(
+ src='IPython.kernel.zmq', mirror='ipykernel')
+
+for pkg in ('comm', 'inprocess'):
+ src = 'IPython.kernel.%s' % pkg
+ sys.modules[src] = ShimModule(src=src, mirror='ipykernel.%s' % pkg)
+
+for pkg in ('ioloop', 'blocking'):
+ src = 'IPython.kernel.%s' % pkg
+ sys.modules[src] = ShimModule(src=src, mirror='jupyter_client.%s' % pkg)
+
+# required for `from IPython.kernel import PKG`
+from ipykernel import comm, inprocess
+from jupyter_client import ioloop, blocking
+# public API
+from ipykernel.connect import *
+from jupyter_client import *
diff --git a/contrib/python/ipython/py3/IPython/kernel/__main__.py b/contrib/python/ipython/py3/IPython/kernel/__main__.py
new file mode 100644
index 00000000000..d1f0cf53340
--- /dev/null
+++ b/contrib/python/ipython/py3/IPython/kernel/__main__.py
@@ -0,0 +1,3 @@
+if __name__ == '__main__':
+ from ipykernel import kernelapp as app
+ app.launch_new_instance()
diff --git a/contrib/python/ipython/py3/IPython/kernel/adapter.py b/contrib/python/ipython/py3/IPython/kernel/adapter.py
new file mode 100644
index 00000000000..3b8c046b2d1
--- /dev/null
+++ b/contrib/python/ipython/py3/IPython/kernel/adapter.py
@@ -0,0 +1 @@
+from jupyter_client.adapter import *
diff --git a/contrib/python/ipython/py3/IPython/kernel/channels.py b/contrib/python/ipython/py3/IPython/kernel/channels.py
new file mode 100644
index 00000000000..8c7fe2a0630
--- /dev/null
+++ b/contrib/python/ipython/py3/IPython/kernel/channels.py
@@ -0,0 +1 @@
+from jupyter_client.channels import *
diff --git a/contrib/python/ipython/py3/IPython/kernel/channelsabc.py b/contrib/python/ipython/py3/IPython/kernel/channelsabc.py
new file mode 100644
index 00000000000..88944012d44
--- /dev/null
+++ b/contrib/python/ipython/py3/IPython/kernel/channelsabc.py
@@ -0,0 +1 @@
+from jupyter_client.channelsabc import *
diff --git a/contrib/python/ipython/py3/IPython/kernel/client.py b/contrib/python/ipython/py3/IPython/kernel/client.py
new file mode 100644
index 00000000000..a98690b74cc
--- /dev/null
+++ b/contrib/python/ipython/py3/IPython/kernel/client.py
@@ -0,0 +1 @@
+from jupyter_client.client import *
diff --git a/contrib/python/ipython/py3/IPython/kernel/clientabc.py b/contrib/python/ipython/py3/IPython/kernel/clientabc.py
new file mode 100644
index 00000000000..e0cf06c9420
--- /dev/null
+++ b/contrib/python/ipython/py3/IPython/kernel/clientabc.py
@@ -0,0 +1 @@
+from jupyter_client.clientabc import *
diff --git a/contrib/python/ipython/py3/IPython/kernel/connect.py b/contrib/python/ipython/py3/IPython/kernel/connect.py
new file mode 100644
index 00000000000..5b6d40a5d34
--- /dev/null
+++ b/contrib/python/ipython/py3/IPython/kernel/connect.py
@@ -0,0 +1,2 @@
+from ipykernel.connect import *
+from jupyter_client.connect import *
diff --git a/contrib/python/ipython/py3/IPython/kernel/kernelspec.py b/contrib/python/ipython/py3/IPython/kernel/kernelspec.py
new file mode 100644
index 00000000000..123419b2f54
--- /dev/null
+++ b/contrib/python/ipython/py3/IPython/kernel/kernelspec.py
@@ -0,0 +1 @@
+from jupyter_client.kernelspec import *
diff --git a/contrib/python/ipython/py3/IPython/kernel/kernelspecapp.py b/contrib/python/ipython/py3/IPython/kernel/kernelspecapp.py
new file mode 100644
index 00000000000..28cd33abd35
--- /dev/null
+++ b/contrib/python/ipython/py3/IPython/kernel/kernelspecapp.py
@@ -0,0 +1 @@
+from jupyter_client.kernelspecapp import *
diff --git a/contrib/python/ipython/py3/IPython/kernel/launcher.py b/contrib/python/ipython/py3/IPython/kernel/launcher.py
new file mode 100644
index 00000000000..1953bc4809e
--- /dev/null
+++ b/contrib/python/ipython/py3/IPython/kernel/launcher.py
@@ -0,0 +1 @@
+from jupyter_client.launcher import *
diff --git a/contrib/python/ipython/py3/IPython/kernel/manager.py b/contrib/python/ipython/py3/IPython/kernel/manager.py
new file mode 100644
index 00000000000..c88097cff64
--- /dev/null
+++ b/contrib/python/ipython/py3/IPython/kernel/manager.py
@@ -0,0 +1 @@
+from jupyter_client.manager import *
diff --git a/contrib/python/ipython/py3/IPython/kernel/managerabc.py b/contrib/python/ipython/py3/IPython/kernel/managerabc.py
new file mode 100644
index 00000000000..6b40827ff88
--- /dev/null
+++ b/contrib/python/ipython/py3/IPython/kernel/managerabc.py
@@ -0,0 +1 @@
+from jupyter_client.managerabc import *
diff --git a/contrib/python/ipython/py3/IPython/kernel/multikernelmanager.py b/contrib/python/ipython/py3/IPython/kernel/multikernelmanager.py
new file mode 100644
index 00000000000..ce576e27eaf
--- /dev/null
+++ b/contrib/python/ipython/py3/IPython/kernel/multikernelmanager.py
@@ -0,0 +1 @@
+from jupyter_client.multikernelmanager import *
diff --git a/contrib/python/ipython/py3/IPython/kernel/restarter.py b/contrib/python/ipython/py3/IPython/kernel/restarter.py
new file mode 100644
index 00000000000..dc24117c3ad
--- /dev/null
+++ b/contrib/python/ipython/py3/IPython/kernel/restarter.py
@@ -0,0 +1 @@
+from jupyter_client.restarter import *
diff --git a/contrib/python/ipython/py3/IPython/kernel/threaded.py b/contrib/python/ipython/py3/IPython/kernel/threaded.py
new file mode 100644
index 00000000000..4a1072f7fe3
--- /dev/null
+++ b/contrib/python/ipython/py3/IPython/kernel/threaded.py
@@ -0,0 +1 @@
+from jupyter_client.threaded import *