Show More
@@ -86,7 +86,7 b' def embed_kernel(module=None, local_ns=None, **kwargs):' | |||||
86 | local_ns = caller_locals |
|
86 | local_ns = caller_locals | |
87 |
|
87 | |||
88 | # Only import .zmq when we really need it |
|
88 | # Only import .zmq when we really need it | |
89 |
from ipy |
|
89 | from ipykernel.embed import embed_kernel as real_embed_kernel | |
90 | real_embed_kernel(module=module, local_ns=local_ns, **kwargs) |
|
90 | real_embed_kernel(module=module, local_ns=local_ns, **kwargs) | |
91 |
|
91 | |||
92 | def start_ipython(argv=None, **kwargs): |
|
92 | def start_ipython(argv=None, **kwargs): |
@@ -932,7 +932,7 b' def set_matplotlib_formats(*formats, **kwargs):' | |||||
932 | from IPython.core.pylabtools import select_figure_formats |
|
932 | from IPython.core.pylabtools import select_figure_formats | |
933 | # build kwargs, starting with InlineBackend config |
|
933 | # build kwargs, starting with InlineBackend config | |
934 | kw = {} |
|
934 | kw = {} | |
935 |
from ipy |
|
935 | from ipykernel.pylab.config import InlineBackend | |
936 | cfg = InlineBackend.instance() |
|
936 | cfg = InlineBackend.instance() | |
937 | kw.update(cfg.print_figure_kwargs) |
|
937 | kw.update(cfg.print_figure_kwargs) | |
938 | kw.update(**kwargs) |
|
938 | kw.update(**kwargs) | |
@@ -961,7 +961,7 b' def set_matplotlib_close(close=True):' | |||||
961 | Should all matplotlib figures be automatically closed after each cell is |
|
961 | Should all matplotlib figures be automatically closed after each cell is | |
962 | run? |
|
962 | run? | |
963 | """ |
|
963 | """ | |
964 |
from ipy |
|
964 | from ipykernel.pylab.config import InlineBackend | |
965 | cfg = InlineBackend.instance() |
|
965 | cfg = InlineBackend.instance() | |
966 | cfg.close_figures = close |
|
966 | cfg.close_figures = close | |
967 |
|
967 |
@@ -261,7 +261,7 b' class ProfileCreate(BaseIPythonApplication):' | |||||
261 | from IPython.terminal.ipapp import TerminalIPythonApp |
|
261 | from IPython.terminal.ipapp import TerminalIPythonApp | |
262 | apps = [TerminalIPythonApp] |
|
262 | apps = [TerminalIPythonApp] | |
263 | for app_path in ( |
|
263 | for app_path in ( | |
264 |
'ipy |
|
264 | 'ipykernel.kernelapp.IPKernelApp', | |
265 | ): |
|
265 | ): | |
266 | app = self._import_app(app_path) |
|
266 | app = self._import_app(app_path) | |
267 | if app is not None: |
|
267 | if app is not None: |
@@ -23,7 +23,7 b" backends = {'tk': 'TkAgg'," | |||||
23 | 'osx': 'MacOSX', |
|
23 | 'osx': 'MacOSX', | |
24 | 'nbagg': 'nbAgg', |
|
24 | 'nbagg': 'nbAgg', | |
25 | 'notebook': 'nbAgg', |
|
25 | 'notebook': 'nbAgg', | |
26 |
'inline' : 'module://ipy |
|
26 | 'inline' : 'module://ipykernel.pylab.backend_inline'} | |
27 |
|
27 | |||
28 | # We also need a reverse backends2guis mapping that will properly choose which |
|
28 | # We also need a reverse backends2guis mapping that will properly choose which | |
29 | # GUI support to activate based on the desired matplotlib backend. For the |
|
29 | # GUI support to activate based on the desired matplotlib backend. For the | |
@@ -182,7 +182,7 b' def select_figure_formats(shell, formats, **kwargs):' | |||||
182 | Extra keyword arguments to be passed to fig.canvas.print_figure. |
|
182 | Extra keyword arguments to be passed to fig.canvas.print_figure. | |
183 | """ |
|
183 | """ | |
184 | from matplotlib.figure import Figure |
|
184 | from matplotlib.figure import Figure | |
185 |
from ipy |
|
185 | from ipykernel.pylab import backend_inline | |
186 |
|
186 | |||
187 | svg_formatter = shell.display_formatter.formatters['image/svg+xml'] |
|
187 | svg_formatter = shell.display_formatter.formatters['image/svg+xml'] | |
188 | png_formatter = shell.display_formatter.formatters['image/png'] |
|
188 | png_formatter = shell.display_formatter.formatters['image/png'] | |
@@ -233,7 +233,7 b' def find_gui_and_backend(gui=None, gui_select=None):' | |||||
233 | Returns |
|
233 | Returns | |
234 | ------- |
|
234 | ------- | |
235 | A tuple of (gui, backend) where backend is one of ('TkAgg','GTKAgg', |
|
235 | A tuple of (gui, backend) where backend is one of ('TkAgg','GTKAgg', | |
236 |
'WXAgg','Qt4Agg','module://ipy |
|
236 | 'WXAgg','Qt4Agg','module://ipykernel.pylab.backend_inline'). | |
237 | """ |
|
237 | """ | |
238 |
|
238 | |||
239 | import matplotlib |
|
239 | import matplotlib | |
@@ -334,7 +334,7 b' def configure_inline_support(shell, backend):' | |||||
334 | # continuing (such as in terminal-only shells in environments without |
|
334 | # continuing (such as in terminal-only shells in environments without | |
335 | # zeromq available). |
|
335 | # zeromq available). | |
336 | try: |
|
336 | try: | |
337 |
from ipy |
|
337 | from ipykernel.pylab.backend_inline import InlineBackend | |
338 | except ImportError: |
|
338 | except ImportError: | |
339 | return |
|
339 | return | |
340 | from matplotlib import pyplot |
|
340 | from matplotlib import pyplot | |
@@ -345,7 +345,7 b' def configure_inline_support(shell, backend):' | |||||
345 | shell.configurables.append(cfg) |
|
345 | shell.configurables.append(cfg) | |
346 |
|
346 | |||
347 | if backend == backends['inline']: |
|
347 | if backend == backends['inline']: | |
348 |
from ipy |
|
348 | from ipykernel.pylab.backend_inline import flush_figures | |
349 | shell.events.register('post_execute', flush_figures) |
|
349 | shell.events.register('post_execute', flush_figures) | |
350 |
|
350 | |||
351 | # Save rcParams that will be overwrittern |
|
351 | # Save rcParams that will be overwrittern | |
@@ -355,7 +355,7 b' def configure_inline_support(shell, backend):' | |||||
355 | # load inline_rc |
|
355 | # load inline_rc | |
356 | pyplot.rcParams.update(cfg.rc) |
|
356 | pyplot.rcParams.update(cfg.rc) | |
357 | else: |
|
357 | else: | |
358 |
from ipy |
|
358 | from ipykernel.pylab.backend_inline import flush_figures | |
359 | try: |
|
359 | try: | |
360 | shell.events.unregister('post_execute', flush_figures) |
|
360 | shell.events.unregister('post_execute', flush_figures) | |
361 | except ValueError: |
|
361 | except ValueError: |
@@ -60,7 +60,7 b' def test_image_filename_defaults():' | |||||
60 | nt.assert_is_none(img._repr_jpeg_()) |
|
60 | nt.assert_is_none(img._repr_jpeg_()) | |
61 |
|
61 | |||
62 | def _get_inline_config(): |
|
62 | def _get_inline_config(): | |
63 |
from ipy |
|
63 | from ipykernel.pylab.config import InlineBackend | |
64 | return InlineBackend.instance() |
|
64 | return InlineBackend.instance() | |
65 |
|
65 | |||
66 | @dec.skip_without('matplotlib') |
|
66 | @dec.skip_without('matplotlib') |
@@ -609,7 +609,7 b' class TestModules(unittest.TestCase, tt.TempFileMixin):' | |||||
609 | self.mktmp("import sys\n" |
|
609 | self.mktmp("import sys\n" | |
610 | "print('numpy' in sys.modules)\n" |
|
610 | "print('numpy' in sys.modules)\n" | |
611 | "print('ipyparallel' in sys.modules)\n" |
|
611 | "print('ipyparallel' in sys.modules)\n" | |
612 |
"print('ipy |
|
612 | "print('ipykernel' in sys.modules)\n" | |
613 | ) |
|
613 | ) | |
614 | out = "False\nFalse\nFalse\n" |
|
614 | out = "False\nFalse\nFalse\n" | |
615 | tt.ipexec_validate(self.fname, out) |
|
615 | tt.ipexec_validate(self.fname, out) |
@@ -8,7 +8,7 b' import sys' | |||||
8 | from warnings import warn |
|
8 | from warnings import warn | |
9 |
|
9 | |||
10 | warn("The `IPython.kernel` package has been deprecated. " |
|
10 | warn("The `IPython.kernel` package has been deprecated. " | |
11 |
"You should import from ipy |
|
11 | "You should import from ipykernel or jupyter_client instead.") | |
12 |
|
12 | |||
13 |
|
13 | |||
14 | from IPython.utils.shimmodule import ShimModule |
|
14 | from IPython.utils.shimmodule import ShimModule | |
@@ -17,19 +17,19 b' from IPython.utils.shimmodule import ShimModule' | |||||
17 | sys.modules['IPython.kernel.zmq.session'] = ShimModule( |
|
17 | sys.modules['IPython.kernel.zmq.session'] = ShimModule( | |
18 | src='IPython.kernel.zmq.session', mirror='jupyter_client.session') |
|
18 | src='IPython.kernel.zmq.session', mirror='jupyter_client.session') | |
19 | sys.modules['IPython.kernel.zmq'] = ShimModule( |
|
19 | sys.modules['IPython.kernel.zmq'] = ShimModule( | |
20 |
src='IPython.kernel.zmq', mirror='ipy |
|
20 | src='IPython.kernel.zmq', mirror='ipykernel') | |
21 |
|
21 | |||
22 | for pkg in ('comm', 'inprocess'): |
|
22 | for pkg in ('comm', 'inprocess'): | |
23 | src = 'IPython.kernel.%s' % pkg |
|
23 | src = 'IPython.kernel.%s' % pkg | |
24 |
sys.modules[src] = ShimModule(src=src, mirror='ipy |
|
24 | sys.modules[src] = ShimModule(src=src, mirror='ipykernel.%s' % pkg) | |
25 |
|
25 | |||
26 | for pkg in ('ioloop', 'blocking'): |
|
26 | for pkg in ('ioloop', 'blocking'): | |
27 | src = 'IPython.kernel.%s' % pkg |
|
27 | src = 'IPython.kernel.%s' % pkg | |
28 | sys.modules[src] = ShimModule(src=src, mirror='jupyter_client.%s' % pkg) |
|
28 | sys.modules[src] = ShimModule(src=src, mirror='jupyter_client.%s' % pkg) | |
29 |
|
29 | |||
30 | # required for `from IPython.kernel import PKG` |
|
30 | # required for `from IPython.kernel import PKG` | |
31 |
from ipy |
|
31 | from ipykernel import comm, inprocess | |
32 | from jupyter_client import ioloop, blocking |
|
32 | from jupyter_client import ioloop, blocking | |
33 | # public API |
|
33 | # public API | |
34 |
from ipy |
|
34 | from ipykernel.connect import * | |
35 | from jupyter_client import * |
|
35 | from jupyter_client import * |
@@ -1,3 +1,3 b'' | |||||
1 | if __name__ == '__main__': |
|
1 | if __name__ == '__main__': | |
2 |
from ipy |
|
2 | from ipykernel import kernelapp as app | |
3 | app.launch_new_instance() |
|
3 | app.launch_new_instance() |
@@ -1,2 +1,2 b'' | |||||
1 |
from ipy |
|
1 | from ipykernel.connect import * | |
2 | from jupyter_client.connect import * |
|
2 | from jupyter_client.connect import * |
@@ -8,5 +8,5 b' warnings.warn("IPython.lib.kernel moved to IPython.kernel.connect in IPython 1.0' | |||||
8 | DeprecationWarning |
|
8 | DeprecationWarning | |
9 | ) |
|
9 | ) | |
10 |
|
10 | |||
11 |
from ipy |
|
11 | from ipykernel.connect import * | |
12 |
|
12 |
@@ -216,7 +216,7 b' class TerminalIPythonApp(BaseIPythonApplication, InteractiveShellApp):' | |||||
216 | profile = ("IPython.core.profileapp.ProfileApp", |
|
216 | profile = ("IPython.core.profileapp.ProfileApp", | |
217 | "Create and manage IPython profiles." |
|
217 | "Create and manage IPython profiles." | |
218 | ), |
|
218 | ), | |
219 |
kernel = ("ipy |
|
219 | kernel = ("ipykernel.kernelapp.IPKernelApp", | |
220 | "Start a kernel without an attached frontend." |
|
220 | "Start a kernel without an attached frontend." | |
221 | ), |
|
221 | ), | |
222 | console=('jupyter_console.app.ZMQTerminalIPythonApp', |
|
222 | console=('jupyter_console.app.ZMQTerminalIPythonApp', |
@@ -1,5 +1,5 b'' | |||||
1 | from warnings import warn |
|
1 | from warnings import warn | |
2 |
|
2 | |||
3 |
warn("IPython.utils.pickleutil has moved to ipy |
|
3 | warn("IPython.utils.pickleutil has moved to ipykernel.pickleutil") | |
4 |
|
4 | |||
5 |
from ipy |
|
5 | from ipykernel.pickleutil import * |
@@ -206,7 +206,7 b' extras_require = dict(' | |||||
206 | doc = ['Sphinx>=1.1', 'numpydoc'], |
|
206 | doc = ['Sphinx>=1.1', 'numpydoc'], | |
207 | test = ['nose>=0.10.1', 'requests'], |
|
207 | test = ['nose>=0.10.1', 'requests'], | |
208 | terminal = [], |
|
208 | terminal = [], | |
209 |
kernel = ['ipy |
|
209 | kernel = ['ipykernel'], | |
210 | nbformat = ['jupyter_nbformat'], |
|
210 | nbformat = ['jupyter_nbformat'], | |
211 | notebook = ['jupyter_notebook'], |
|
211 | notebook = ['jupyter_notebook'], | |
212 | nbconvert = ['jupyter_nbconvert'] |
|
212 | nbconvert = ['jupyter_nbconvert'] |
General Comments 0
You need to be logged in to leave comments.
Login now