##// END OF EJS Templates
Merge pull request #8408 from minrk/inspect-found...
Merge pull request #8408 from minrk/inspect-found add missing 'found' key to inspect_reply

File last commit:

r20990:233a2e54
r21331:a7d74cfd merge
Show More
__init__.py
35 lines | 1.1 KiB | text/x-python | PythonLexer
"""
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
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(
src='IPython.kernel.zmq.session', mirror='jupyter_client.session')
sys.modules['IPython.kernel.zmq'] = ShimModule(
src='IPython.kernel.zmq', mirror='ipython_kernel')
for pkg in ('comm', 'inprocess'):
src = 'IPython.kernel.%s' % pkg
sys.modules[src] = ShimModule(src=src, mirror='ipython_kernel.%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 ipython_kernel import comm, inprocess
from jupyter_client import ioloop, blocking
# public API
from ipython_kernel.connect import *
from jupyter_client import *