Show More
@@ -1,19 +1,19 b'' | |||||
1 | """ |
|
1 | """ | |
2 | Shim to maintain backwards compatibility with old IPython.config imports. |
|
2 | Shim to maintain backwards compatibility with old IPython.config imports. | |
3 | """ |
|
3 | """ | |
4 | # Copyright (c) IPython Development Team. |
|
4 | # Copyright (c) IPython Development Team. | |
5 | # Distributed under the terms of the Modified BSD License. |
|
5 | # Distributed under the terms of the Modified BSD License. | |
6 |
|
6 | |||
7 | import sys |
|
7 | import sys | |
8 | from warnings import warn |
|
8 | from warnings import warn | |
9 |
|
9 | |||
10 | from IPython.utils.shimmodule import ShimModule, ShimWarning |
|
10 | from IPython.utils.shimmodule import ShimModule, ShimWarning | |
11 |
|
11 | |||
12 | warn("The `IPython.config` package has been deprecated. " |
|
12 | warn("The `IPython.config` package has been deprecated since IPython 4.0. " | |
13 | "You should import from traitlets.config instead.", ShimWarning) |
|
13 | "You should import from traitlets.config instead.", ShimWarning) | |
14 |
|
14 | |||
15 |
|
15 | |||
16 | # Unconditionally insert the shim into sys.modules so that further import calls |
|
16 | # Unconditionally insert the shim into sys.modules so that further import calls | |
17 | # trigger the custom attribute access above |
|
17 | # trigger the custom attribute access above | |
18 |
|
18 | |||
19 | sys.modules['IPython.config'] = ShimModule(src='IPython.config', mirror='traitlets.config') |
|
19 | sys.modules['IPython.config'] = ShimModule(src='IPython.config', mirror='traitlets.config') |
@@ -1,29 +1,29 b'' | |||||
1 | """ |
|
1 | """ | |
2 | Shim to maintain backwards compatibility with old frontend imports. |
|
2 | Shim to maintain backwards compatibility with old frontend imports. | |
3 |
|
3 | |||
4 | We have moved all contents of the old `frontend` subpackage into top-level |
|
4 | We have moved all contents of the old `frontend` subpackage into top-level | |
5 | subpackages (`html`, `qt` and `terminal`), and flattened the notebook into |
|
5 | subpackages (`html`, `qt` and `terminal`), and flattened the notebook into | |
6 | just `IPython.html`, formerly `IPython.frontend.html.notebook`. |
|
6 | just `IPython.html`, formerly `IPython.frontend.html.notebook`. | |
7 |
|
7 | |||
8 | This will let code that was making `from IPython.frontend...` calls continue |
|
8 | This will let code that was making `from IPython.frontend...` calls continue | |
9 | working, though a warning will be printed. |
|
9 | working, though a warning will be printed. | |
10 | """ |
|
10 | """ | |
11 |
|
11 | |||
12 | # Copyright (c) IPython Development Team. |
|
12 | # Copyright (c) IPython Development Team. | |
13 | # Distributed under the terms of the Modified BSD License. |
|
13 | # Distributed under the terms of the Modified BSD License. | |
14 |
|
14 | |||
15 | import sys |
|
15 | import sys | |
16 | from warnings import warn |
|
16 | from warnings import warn | |
17 |
|
17 | |||
18 | from IPython.utils.shimmodule import ShimModule, ShimWarning |
|
18 | from IPython.utils.shimmodule import ShimModule, ShimWarning | |
19 |
|
19 | |||
20 | warn("The top-level `frontend` package has been deprecated. " |
|
20 | warn("The top-level `frontend` package has been deprecated since IPython 1.0. " | |
21 | "All its subpackages have been moved to the top `IPython` level.", ShimWarning) |
|
21 | "All its subpackages have been moved to the top `IPython` level.", ShimWarning) | |
22 |
|
22 | |||
23 | # Unconditionally insert the shim into sys.modules so that further import calls |
|
23 | # Unconditionally insert the shim into sys.modules so that further import calls | |
24 | # trigger the custom attribute access above |
|
24 | # trigger the custom attribute access above | |
25 |
|
25 | |||
26 | sys.modules['IPython.frontend.html.notebook'] = ShimModule( |
|
26 | sys.modules['IPython.frontend.html.notebook'] = ShimModule( | |
27 | src='IPython.frontend.html.notebook', mirror='IPython.html') |
|
27 | src='IPython.frontend.html.notebook', mirror='IPython.html') | |
28 | sys.modules['IPython.frontend'] = ShimModule( |
|
28 | sys.modules['IPython.frontend'] = ShimModule( | |
29 | src='IPython.frontend', mirror='IPython') |
|
29 | src='IPython.frontend', mirror='IPython') |
@@ -1,28 +1,28 b'' | |||||
1 | """ |
|
1 | """ | |
2 | Shim to maintain backwards compatibility with old IPython.html imports. |
|
2 | Shim to maintain backwards compatibility with old IPython.html imports. | |
3 | """ |
|
3 | """ | |
4 | # Copyright (c) IPython Development Team. |
|
4 | # Copyright (c) IPython Development Team. | |
5 | # Distributed under the terms of the Modified BSD License. |
|
5 | # Distributed under the terms of the Modified BSD License. | |
6 |
|
6 | |||
7 | import sys |
|
7 | import sys | |
8 | from warnings import warn |
|
8 | from warnings import warn | |
9 |
|
9 | |||
10 | from IPython.utils.shimmodule import ShimModule, ShimWarning |
|
10 | from IPython.utils.shimmodule import ShimModule, ShimWarning | |
11 |
|
11 | |||
12 | warn("The `IPython.html` package has been deprecated. " |
|
12 | warn("The `IPython.html` package has been deprecated since IPython 4.0. " | |
13 | "You should import from `notebook` instead. " |
|
13 | "You should import from `notebook` instead. " | |
14 | "`IPython.html.widgets` has moved to `ipywidgets`.", ShimWarning) |
|
14 | "`IPython.html.widgets` has moved to `ipywidgets`.", ShimWarning) | |
15 |
|
15 | |||
16 | _widgets = sys.modules['IPython.html.widgets'] = ShimModule( |
|
16 | _widgets = sys.modules['IPython.html.widgets'] = ShimModule( | |
17 | src='IPython.html.widgets', mirror='ipywidgets') |
|
17 | src='IPython.html.widgets', mirror='ipywidgets') | |
18 |
|
18 | |||
19 | _html = ShimModule( |
|
19 | _html = ShimModule( | |
20 | src='IPython.html', mirror='notebook') |
|
20 | src='IPython.html', mirror='notebook') | |
21 |
|
21 | |||
22 | # hook up widgets |
|
22 | # hook up widgets | |
23 | _html.widgets = _widgets |
|
23 | _html.widgets = _widgets | |
24 | sys.modules['IPython.html'] = _html |
|
24 | sys.modules['IPython.html'] = _html | |
25 |
|
25 | |||
26 | if __name__ == '__main__': |
|
26 | if __name__ == '__main__': | |
27 | from notebook import notebookapp as app |
|
27 | from notebook import notebookapp as app | |
28 | app.launch_new_instance() |
|
28 | app.launch_new_instance() |
@@ -1,35 +1,35 b'' | |||||
1 | """ |
|
1 | """ | |
2 | Shim to maintain backwards compatibility with old IPython.kernel imports. |
|
2 | Shim to maintain backwards compatibility with old IPython.kernel imports. | |
3 | """ |
|
3 | """ | |
4 | # Copyright (c) IPython Development Team. |
|
4 | # Copyright (c) IPython Development Team. | |
5 | # Distributed under the terms of the Modified BSD License. |
|
5 | # Distributed under the terms of the Modified BSD License. | |
6 |
|
6 | |||
7 | import sys |
|
7 | import sys | |
8 | from warnings import warn |
|
8 | from warnings import warn | |
9 |
|
9 | |||
10 | from IPython.utils.shimmodule import ShimModule, ShimWarning |
|
10 | from IPython.utils.shimmodule import ShimModule, ShimWarning | |
11 |
|
11 | |||
12 |
warn("The `IPython.kernel` package has been deprecated |
|
12 | warn("The `IPython.kernel` package has been deprecated since IPython 4.0." | |
13 | "You should import from ipykernel or jupyter_client instead.", ShimWarning) |
|
13 | "You should import from ipykernel or jupyter_client instead.", ShimWarning) | |
14 |
|
14 | |||
15 |
|
15 | |||
16 | # zmq subdir is gone |
|
16 | # zmq subdir is gone | |
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='ipykernel') |
|
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='ipykernel.%s' % pkg) |
|
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 ipykernel import comm, inprocess |
|
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 ipykernel.connect import * |
|
34 | from ipykernel.connect import * | |
35 | from jupyter_client import * |
|
35 | from jupyter_client import * |
@@ -1,19 +1,19 b'' | |||||
1 | """ |
|
1 | """ | |
2 | Shim to maintain backwards compatibility with old IPython.nbconvert imports. |
|
2 | Shim to maintain backwards compatibility with old IPython.nbconvert imports. | |
3 | """ |
|
3 | """ | |
4 | # Copyright (c) IPython Development Team. |
|
4 | # Copyright (c) IPython Development Team. | |
5 | # Distributed under the terms of the Modified BSD License. |
|
5 | # Distributed under the terms of the Modified BSD License. | |
6 |
|
6 | |||
7 | import sys |
|
7 | import sys | |
8 | from warnings import warn |
|
8 | from warnings import warn | |
9 |
|
9 | |||
10 | from IPython.utils.shimmodule import ShimModule, ShimWarning |
|
10 | from IPython.utils.shimmodule import ShimModule, ShimWarning | |
11 |
|
11 | |||
12 | warn("The `IPython.nbconvert` package has been deprecated. " |
|
12 | warn("The `IPython.nbconvert` package has been deprecated since IPython 4.0. " | |
13 | "You should import from nbconvert instead.", ShimWarning) |
|
13 | "You should import from nbconvert instead.", ShimWarning) | |
14 |
|
14 | |||
15 | # Unconditionally insert the shim into sys.modules so that further import calls |
|
15 | # Unconditionally insert the shim into sys.modules so that further import calls | |
16 | # trigger the custom attribute access above |
|
16 | # trigger the custom attribute access above | |
17 |
|
17 | |||
18 | sys.modules['IPython.nbconvert'] = ShimModule( |
|
18 | sys.modules['IPython.nbconvert'] = ShimModule( | |
19 | src='IPython.nbconvert', mirror='nbconvert') |
|
19 | src='IPython.nbconvert', mirror='nbconvert') |
@@ -1,19 +1,19 b'' | |||||
1 | """ |
|
1 | """ | |
2 | Shim to maintain backwards compatibility with old IPython.nbformat imports. |
|
2 | Shim to maintain backwards compatibility with old IPython.nbformat imports. | |
3 | """ |
|
3 | """ | |
4 | # Copyright (c) IPython Development Team. |
|
4 | # Copyright (c) IPython Development Team. | |
5 | # Distributed under the terms of the Modified BSD License. |
|
5 | # Distributed under the terms of the Modified BSD License. | |
6 |
|
6 | |||
7 | import sys |
|
7 | import sys | |
8 | from warnings import warn |
|
8 | from warnings import warn | |
9 |
|
9 | |||
10 | from IPython.utils.shimmodule import ShimModule, ShimWarning |
|
10 | from IPython.utils.shimmodule import ShimModule, ShimWarning | |
11 |
|
11 | |||
12 | warn("The `IPython.nbformat` package has been deprecated. " |
|
12 | warn("The `IPython.nbformat` package has been deprecated since IPython 4.0. " | |
13 | "You should import from nbformat instead.", ShimWarning) |
|
13 | "You should import from nbformat instead.", ShimWarning) | |
14 |
|
14 | |||
15 | # Unconditionally insert the shim into sys.modules so that further import calls |
|
15 | # Unconditionally insert the shim into sys.modules so that further import calls | |
16 | # trigger the custom attribute access above |
|
16 | # trigger the custom attribute access above | |
17 |
|
17 | |||
18 | sys.modules['IPython.nbformat'] = ShimModule( |
|
18 | sys.modules['IPython.nbformat'] = ShimModule( | |
19 | src='IPython.nbformat', mirror='nbformat') |
|
19 | src='IPython.nbformat', mirror='nbformat') |
@@ -1,20 +1,20 b'' | |||||
1 | """ |
|
1 | """ | |
2 | Shim to maintain backwards compatibility with old IPython.parallel imports. |
|
2 | Shim to maintain backwards compatibility with old IPython.parallel imports. | |
3 | """ |
|
3 | """ | |
4 | # Copyright (c) IPython Development Team. |
|
4 | # Copyright (c) IPython Development Team. | |
5 | # Distributed under the terms of the Modified BSD License. |
|
5 | # Distributed under the terms of the Modified BSD License. | |
6 |
|
6 | |||
7 | import sys |
|
7 | import sys | |
8 | from warnings import warn |
|
8 | from warnings import warn | |
9 |
|
9 | |||
10 | from IPython.utils.shimmodule import ShimModule, ShimWarning |
|
10 | from IPython.utils.shimmodule import ShimModule, ShimWarning | |
11 |
|
11 | |||
12 | warn("The `IPython.parallel` package has been deprecated. " |
|
12 | warn("The `IPython.parallel` package has been deprecated since IPython 4.0. " | |
13 | "You should import from ipyparallel instead.", ShimWarning) |
|
13 | "You should import from ipyparallel instead.", ShimWarning) | |
14 |
|
14 | |||
15 | # Unconditionally insert the shim into sys.modules so that further import calls |
|
15 | # Unconditionally insert the shim into sys.modules so that further import calls | |
16 | # trigger the custom attribute access above |
|
16 | # trigger the custom attribute access above | |
17 |
|
17 | |||
18 | sys.modules['IPython.parallel'] = ShimModule( |
|
18 | sys.modules['IPython.parallel'] = ShimModule( | |
19 | src='IPython.parallel', mirror='ipyparallel') |
|
19 | src='IPython.parallel', mirror='ipyparallel') | |
20 |
|
20 |
@@ -1,24 +1,24 b'' | |||||
1 | """ |
|
1 | """ | |
2 | Shim to maintain backwards compatibility with old IPython.qt imports. |
|
2 | Shim to maintain backwards compatibility with old IPython.qt imports. | |
3 | """ |
|
3 | """ | |
4 | # Copyright (c) IPython Development Team. |
|
4 | # Copyright (c) IPython Development Team. | |
5 | # Distributed under the terms of the Modified BSD License. |
|
5 | # Distributed under the terms of the Modified BSD License. | |
6 |
|
6 | |||
7 | import sys |
|
7 | import sys | |
8 | from warnings import warn |
|
8 | from warnings import warn | |
9 |
|
9 | |||
10 | from IPython.utils.shimmodule import ShimModule, ShimWarning |
|
10 | from IPython.utils.shimmodule import ShimModule, ShimWarning | |
11 |
|
11 | |||
12 | warn("The `IPython.qt` package has been deprecated. " |
|
12 | warn("The `IPython.qt` package has been deprecated since IPython 4.0. " | |
13 | "You should import from qtconsole instead.", ShimWarning) |
|
13 | "You should import from qtconsole instead.", ShimWarning) | |
14 |
|
14 | |||
15 | # Unconditionally insert the shim into sys.modules so that further import calls |
|
15 | # Unconditionally insert the shim into sys.modules so that further import calls | |
16 | # trigger the custom attribute access above |
|
16 | # trigger the custom attribute access above | |
17 |
|
17 | |||
18 | _console = sys.modules['IPython.qt.console'] = ShimModule( |
|
18 | _console = sys.modules['IPython.qt.console'] = ShimModule( | |
19 | src='IPython.qt.console', mirror='qtconsole') |
|
19 | src='IPython.qt.console', mirror='qtconsole') | |
20 |
|
20 | |||
21 | _qt = ShimModule(src='IPython.qt', mirror='qtconsole') |
|
21 | _qt = ShimModule(src='IPython.qt', mirror='qtconsole') | |
22 |
|
22 | |||
23 | _qt.console = _console |
|
23 | _qt.console = _console | |
24 | sys.modules['IPython.qt'] = _qt |
|
24 | sys.modules['IPython.qt'] = _qt |
@@ -1,19 +1,19 b'' | |||||
1 | """ |
|
1 | """ | |
2 | Shim to maintain backwards compatibility with old IPython.terminal.console imports. |
|
2 | Shim to maintain backwards compatibility with old IPython.terminal.console imports. | |
3 | """ |
|
3 | """ | |
4 | # Copyright (c) IPython Development Team. |
|
4 | # Copyright (c) IPython Development Team. | |
5 | # Distributed under the terms of the Modified BSD License. |
|
5 | # Distributed under the terms of the Modified BSD License. | |
6 |
|
6 | |||
7 | import sys |
|
7 | import sys | |
8 | from warnings import warn |
|
8 | from warnings import warn | |
9 |
|
9 | |||
10 | from IPython.utils.shimmodule import ShimModule, ShimWarning |
|
10 | from IPython.utils.shimmodule import ShimModule, ShimWarning | |
11 |
|
11 | |||
12 | warn("The `IPython.terminal.console` package has been deprecated. " |
|
12 | warn("The `IPython.terminal.console` package has been deprecated since IPython 4.0. " | |
13 | "You should import from jupyter_console instead.", ShimWarning) |
|
13 | "You should import from jupyter_console instead.", ShimWarning) | |
14 |
|
14 | |||
15 | # Unconditionally insert the shim into sys.modules so that further import calls |
|
15 | # Unconditionally insert the shim into sys.modules so that further import calls | |
16 | # trigger the custom attribute access above |
|
16 | # trigger the custom attribute access above | |
17 |
|
17 | |||
18 | sys.modules['IPython.terminal.console'] = ShimModule( |
|
18 | sys.modules['IPython.terminal.console'] = ShimModule( | |
19 | src='IPython.terminal.console', mirror='jupyter_console') |
|
19 | src='IPython.terminal.console', mirror='jupyter_console') |
General Comments 0
You need to be logged in to leave comments.
Login now