diff --git a/IPython/__init__.py b/IPython/__init__.py index 5df72f8..5d656e4 100644 --- a/IPython/__init__.py +++ b/IPython/__init__.py @@ -140,5 +140,12 @@ def start_kernel(argv=None, **kwargs): Any other kwargs will be passed to the Application constructor, such as `config`. """ - from IPython.kernel.zmq.kernelapp import launch_new_instance + import warnings + + warnings.warn( + "start_kernel is deprecated since IPython 8.0, use from `ipykernel.kernelapp.launch_new_instance`", + DeprecationWarning, + stacklevel=2, + ) + from ipykernel.kernelapp import launch_new_instance return launch_new_instance(argv=argv, **kwargs) diff --git a/IPython/kernel/__init__.py b/IPython/kernel/__init__.py deleted file mode 100644 index 70a05ed..0000000 --- a/IPython/kernel/__init__.py +++ /dev/null @@ -1,35 +0,0 @@ -""" -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/IPython/kernel/__main__.py b/IPython/kernel/__main__.py deleted file mode 100644 index d1f0cf5..0000000 --- a/IPython/kernel/__main__.py +++ /dev/null @@ -1,3 +0,0 @@ -if __name__ == '__main__': - from ipykernel import kernelapp as app - app.launch_new_instance() diff --git a/IPython/kernel/adapter.py b/IPython/kernel/adapter.py deleted file mode 100644 index 3b8c046..0000000 --- a/IPython/kernel/adapter.py +++ /dev/null @@ -1 +0,0 @@ -from jupyter_client.adapter import * diff --git a/IPython/kernel/channels.py b/IPython/kernel/channels.py deleted file mode 100644 index 8c7fe2a..0000000 --- a/IPython/kernel/channels.py +++ /dev/null @@ -1 +0,0 @@ -from jupyter_client.channels import * diff --git a/IPython/kernel/channelsabc.py b/IPython/kernel/channelsabc.py deleted file mode 100644 index 8894401..0000000 --- a/IPython/kernel/channelsabc.py +++ /dev/null @@ -1 +0,0 @@ -from jupyter_client.channelsabc import * diff --git a/IPython/kernel/client.py b/IPython/kernel/client.py deleted file mode 100644 index a98690b..0000000 --- a/IPython/kernel/client.py +++ /dev/null @@ -1 +0,0 @@ -from jupyter_client.client import * diff --git a/IPython/kernel/clientabc.py b/IPython/kernel/clientabc.py deleted file mode 100644 index e0cf06c..0000000 --- a/IPython/kernel/clientabc.py +++ /dev/null @@ -1 +0,0 @@ -from jupyter_client.clientabc import * diff --git a/IPython/kernel/connect.py b/IPython/kernel/connect.py deleted file mode 100644 index 5b6d40a..0000000 --- a/IPython/kernel/connect.py +++ /dev/null @@ -1,2 +0,0 @@ -from ipykernel.connect import * -from jupyter_client.connect import * diff --git a/IPython/kernel/kernelspec.py b/IPython/kernel/kernelspec.py deleted file mode 100644 index 123419b..0000000 --- a/IPython/kernel/kernelspec.py +++ /dev/null @@ -1 +0,0 @@ -from jupyter_client.kernelspec import * diff --git a/IPython/kernel/kernelspecapp.py b/IPython/kernel/kernelspecapp.py deleted file mode 100644 index 28cd33a..0000000 --- a/IPython/kernel/kernelspecapp.py +++ /dev/null @@ -1 +0,0 @@ -from jupyter_client.kernelspecapp import * diff --git a/IPython/kernel/launcher.py b/IPython/kernel/launcher.py deleted file mode 100644 index 1953bc4..0000000 --- a/IPython/kernel/launcher.py +++ /dev/null @@ -1 +0,0 @@ -from jupyter_client.launcher import * diff --git a/IPython/kernel/manager.py b/IPython/kernel/manager.py deleted file mode 100644 index c88097c..0000000 --- a/IPython/kernel/manager.py +++ /dev/null @@ -1 +0,0 @@ -from jupyter_client.manager import * diff --git a/IPython/kernel/managerabc.py b/IPython/kernel/managerabc.py deleted file mode 100644 index 6b40827..0000000 --- a/IPython/kernel/managerabc.py +++ /dev/null @@ -1 +0,0 @@ -from jupyter_client.managerabc import * diff --git a/IPython/kernel/multikernelmanager.py b/IPython/kernel/multikernelmanager.py deleted file mode 100644 index ce576e2..0000000 --- a/IPython/kernel/multikernelmanager.py +++ /dev/null @@ -1 +0,0 @@ -from jupyter_client.multikernelmanager import * diff --git a/IPython/kernel/restarter.py b/IPython/kernel/restarter.py deleted file mode 100644 index dc24117..0000000 --- a/IPython/kernel/restarter.py +++ /dev/null @@ -1 +0,0 @@ -from jupyter_client.restarter import * diff --git a/IPython/kernel/threaded.py b/IPython/kernel/threaded.py deleted file mode 100644 index 4a1072f..0000000 --- a/IPython/kernel/threaded.py +++ /dev/null @@ -1 +0,0 @@ -from jupyter_client.threaded import *