From 1bd554a615c4d1a5ca5c67ffea092b2b38558a4e 2021-12-09 19:29:47 From: Matthias Bussonnier Date: 2021-12-09 19:29:47 Subject: [PATCH] Merge pull request #13387 from Carreau/remove-deprecated-modules-x remove a number of other deprecated modules --- diff --git a/IPython/external/mathjax.py b/IPython/external/mathjax.py deleted file mode 100644 index 1b9b809..0000000 --- a/IPython/external/mathjax.py +++ /dev/null @@ -1,13 +0,0 @@ -#!/usr/bin/python -""" -`IPython.external.mathjax` is deprecated with IPython 4.0+ - -mathjax is now install by default with the notebook package - -""" - -import sys - -if __name__ == '__main__' : - sys.exit("IPython.external.mathjax is deprecated, Mathjax is now installed by default with the notebook package") - diff --git a/IPython/frontend.py b/IPython/frontend.py deleted file mode 100644 index 9cc3eaf..0000000 --- a/IPython/frontend.py +++ /dev/null @@ -1,29 +0,0 @@ -""" -Shim to maintain backwards compatibility with old frontend imports. - -We have moved all contents of the old `frontend` subpackage into top-level -subpackages (`html`, `qt` and `terminal`), and flattened the notebook into -just `IPython.html`, formerly `IPython.frontend.html.notebook`. - -This will let code that was making `from IPython.frontend...` calls continue -working, though a warning will be printed. -""" - -# 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 top-level `frontend` package has been deprecated since IPython 1.0. " - "All its subpackages have been moved to the top `IPython` level.", ShimWarning) - -# Unconditionally insert the shim into sys.modules so that further import calls -# trigger the custom attribute access above - -sys.modules['IPython.frontend.html.notebook'] = ShimModule( - src='IPython.frontend.html.notebook', mirror='IPython.html') -sys.modules['IPython.frontend'] = ShimModule( - src='IPython.frontend', mirror='IPython') diff --git a/IPython/lib/kernel.py b/IPython/lib/kernel.py deleted file mode 100644 index af98276..0000000 --- a/IPython/lib/kernel.py +++ /dev/null @@ -1,13 +0,0 @@ -"""[DEPRECATED] Utilities for connecting to kernels - -Moved to IPython.kernel.connect -""" - -import warnings -warnings.warn("IPython.lib.kernel moved to IPython.kernel.connect in IPython 1.0," - " and will be removed in IPython 6.0.", - DeprecationWarning -) - -from ipykernel.connect import * - diff --git a/IPython/parallel.py b/IPython/parallel.py deleted file mode 100644 index 0f10012..0000000 --- a/IPython/parallel.py +++ /dev/null @@ -1,20 +0,0 @@ -""" -Shim to maintain backwards compatibility with old IPython.parallel 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.parallel` package has been deprecated since IPython 4.0. " - "You should import from ipyparallel instead.", ShimWarning) - -# Unconditionally insert the shim into sys.modules so that further import calls -# trigger the custom attribute access above - -sys.modules['IPython.parallel'] = ShimModule( - src='IPython.parallel', mirror='ipyparallel') - diff --git a/IPython/qt.py b/IPython/qt.py deleted file mode 100644 index 7557a3f..0000000 --- a/IPython/qt.py +++ /dev/null @@ -1,24 +0,0 @@ -""" -Shim to maintain backwards compatibility with old IPython.qt 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.qt` package has been deprecated since IPython 4.0. " - "You should import from qtconsole instead.", ShimWarning) - -# Unconditionally insert the shim into sys.modules so that further import calls -# trigger the custom attribute access above - -_console = sys.modules['IPython.qt.console'] = ShimModule( - src='IPython.qt.console', mirror='qtconsole') - -_qt = ShimModule(src='IPython.qt', mirror='qtconsole') - -_qt.console = _console -sys.modules['IPython.qt'] = _qt