Skip to content

Commit 03608cd

Browse files
committed
ipython_kernel is now ipykernel
1 parent a7d74cf commit 03608cd

13 files changed

Lines changed: 24 additions & 24 deletions

File tree

IPython/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ def embed_kernel(module=None, local_ns=None, **kwargs):
8686
local_ns = caller_locals
8787

8888
# Only import .zmq when we really need it
89-
from ipython_kernel.embed import embed_kernel as real_embed_kernel
89+
from ipykernel.embed import embed_kernel as real_embed_kernel
9090
real_embed_kernel(module=module, local_ns=local_ns, **kwargs)
9191

9292
def start_ipython(argv=None, **kwargs):

IPython/core/display.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -932,7 +932,7 @@ def set_matplotlib_formats(*formats, **kwargs):
932932
from IPython.core.pylabtools import select_figure_formats
933933
# build kwargs, starting with InlineBackend config
934934
kw = {}
935-
from ipython_kernel.pylab.config import InlineBackend
935+
from ipykernel.pylab.config import InlineBackend
936936
cfg = InlineBackend.instance()
937937
kw.update(cfg.print_figure_kwargs)
938938
kw.update(**kwargs)
@@ -961,7 +961,7 @@ def set_matplotlib_close(close=True):
961961
Should all matplotlib figures be automatically closed after each cell is
962962
run?
963963
"""
964-
from ipython_kernel.pylab.config import InlineBackend
964+
from ipykernel.pylab.config import InlineBackend
965965
cfg = InlineBackend.instance()
966966
cfg.close_figures = close
967967

IPython/core/profileapp.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,7 @@ def init_config_files(self):
261261
from IPython.terminal.ipapp import TerminalIPythonApp
262262
apps = [TerminalIPythonApp]
263263
for app_path in (
264-
'ipython_kernel.kernelapp.IPKernelApp',
264+
'ipykernel.kernelapp.IPKernelApp',
265265
):
266266
app = self._import_app(app_path)
267267
if app is not None:

IPython/core/pylabtools.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
'osx': 'MacOSX',
2424
'nbagg': 'nbAgg',
2525
'notebook': 'nbAgg',
26-
'inline' : 'module://ipython_kernel.pylab.backend_inline'}
26+
'inline' : 'module://ipykernel.pylab.backend_inline'}
2727

2828
# We also need a reverse backends2guis mapping that will properly choose which
2929
# GUI support to activate based on the desired matplotlib backend. For the
@@ -182,7 +182,7 @@ def select_figure_formats(shell, formats, **kwargs):
182182
Extra keyword arguments to be passed to fig.canvas.print_figure.
183183
"""
184184
from matplotlib.figure import Figure
185-
from ipython_kernel.pylab import backend_inline
185+
from ipykernel.pylab import backend_inline
186186

187187
svg_formatter = shell.display_formatter.formatters['image/svg+xml']
188188
png_formatter = shell.display_formatter.formatters['image/png']
@@ -233,7 +233,7 @@ def find_gui_and_backend(gui=None, gui_select=None):
233233
Returns
234234
-------
235235
A tuple of (gui, backend) where backend is one of ('TkAgg','GTKAgg',
236-
'WXAgg','Qt4Agg','module://ipython_kernel.pylab.backend_inline').
236+
'WXAgg','Qt4Agg','module://ipykernel.pylab.backend_inline').
237237
"""
238238

239239
import matplotlib
@@ -334,7 +334,7 @@ def configure_inline_support(shell, backend):
334334
# continuing (such as in terminal-only shells in environments without
335335
# zeromq available).
336336
try:
337-
from ipython_kernel.pylab.backend_inline import InlineBackend
337+
from ipykernel.pylab.backend_inline import InlineBackend
338338
except ImportError:
339339
return
340340
from matplotlib import pyplot
@@ -345,7 +345,7 @@ def configure_inline_support(shell, backend):
345345
shell.configurables.append(cfg)
346346

347347
if backend == backends['inline']:
348-
from ipython_kernel.pylab.backend_inline import flush_figures
348+
from ipykernel.pylab.backend_inline import flush_figures
349349
shell.events.register('post_execute', flush_figures)
350350

351351
# Save rcParams that will be overwrittern
@@ -355,7 +355,7 @@ def configure_inline_support(shell, backend):
355355
# load inline_rc
356356
pyplot.rcParams.update(cfg.rc)
357357
else:
358-
from ipython_kernel.pylab.backend_inline import flush_figures
358+
from ipykernel.pylab.backend_inline import flush_figures
359359
try:
360360
shell.events.unregister('post_execute', flush_figures)
361361
except ValueError:

IPython/core/tests/test_display.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ def test_image_filename_defaults():
6060
nt.assert_is_none(img._repr_jpeg_())
6161

6262
def _get_inline_config():
63-
from ipython_kernel.pylab.config import InlineBackend
63+
from ipykernel.pylab.config import InlineBackend
6464
return InlineBackend.instance()
6565

6666
@dec.skip_without('matplotlib')

IPython/core/tests/test_interactiveshell.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -609,7 +609,7 @@ def test_extraneous_loads(self):
609609
self.mktmp("import sys\n"
610610
"print('numpy' in sys.modules)\n"
611611
"print('ipyparallel' in sys.modules)\n"
612-
"print('ipython_kernel' in sys.modules)\n"
612+
"print('ipykernel' in sys.modules)\n"
613613
)
614614
out = "False\nFalse\nFalse\n"
615615
tt.ipexec_validate(self.fname, out)

IPython/kernel/__init__.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
from warnings import warn
99

1010
warn("The `IPython.kernel` package has been deprecated. "
11-
"You should import from ipython_kernel or jupyter_client instead.")
11+
"You should import from ipykernel or jupyter_client instead.")
1212

1313

1414
from IPython.utils.shimmodule import ShimModule
@@ -17,19 +17,19 @@
1717
sys.modules['IPython.kernel.zmq.session'] = ShimModule(
1818
src='IPython.kernel.zmq.session', mirror='jupyter_client.session')
1919
sys.modules['IPython.kernel.zmq'] = ShimModule(
20-
src='IPython.kernel.zmq', mirror='ipython_kernel')
20+
src='IPython.kernel.zmq', mirror='ipykernel')
2121

2222
for pkg in ('comm', 'inprocess'):
2323
src = 'IPython.kernel.%s' % pkg
24-
sys.modules[src] = ShimModule(src=src, mirror='ipython_kernel.%s' % pkg)
24+
sys.modules[src] = ShimModule(src=src, mirror='ipykernel.%s' % pkg)
2525

2626
for pkg in ('ioloop', 'blocking'):
2727
src = 'IPython.kernel.%s' % pkg
2828
sys.modules[src] = ShimModule(src=src, mirror='jupyter_client.%s' % pkg)
2929

3030
# required for `from IPython.kernel import PKG`
31-
from ipython_kernel import comm, inprocess
31+
from ipykernel import comm, inprocess
3232
from jupyter_client import ioloop, blocking
3333
# public API
34-
from ipython_kernel.connect import *
34+
from ipykernel.connect import *
3535
from jupyter_client import *

IPython/kernel/__main__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
if __name__ == '__main__':
2-
from ipython_kernel import kernelapp as app
2+
from ipykernel import kernelapp as app
33
app.launch_new_instance()

IPython/kernel/connect.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
from ipython_kernel.connect import *
1+
from ipykernel.connect import *
22
from jupyter_client.connect import *

IPython/lib/kernel.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,5 @@
88
DeprecationWarning
99
)
1010

11-
from ipython_kernel.connect import *
11+
from ipykernel.connect import *
1212

0 commit comments

Comments
 (0)