diff --git a/IPython/core/extensions.py b/IPython/core/extensions.py index ce419e1..21fba40 100644 --- a/IPython/core/extensions.py +++ b/IPython/core/extensions.py @@ -88,13 +88,7 @@ class ExtensionManager(Configurable): with self.shell.builtin_trap: if module_str not in sys.modules: - with prepended_to_syspath(self.ipython_extension_dir): - mod = import_module(module_str) - if mod.__file__.startswith(self.ipython_extension_dir): - print(("Loading extensions from {dir} is deprecated. " - "We recommend managing extensions like any " - "other Python packages, in site-packages.").format( - dir=compress_user(self.ipython_extension_dir))) + mod = import_module(module_str) mod = sys.modules[module_str] if self._call_load_ipython_extension(mod): self.loaded.add(module_str) @@ -155,13 +149,3 @@ class ExtensionManager(Configurable): if hasattr(mod, 'unload_ipython_extension'): mod.unload_ipython_extension(self.shell) return True - - @undoc - def install_extension(self, url, filename=None): - """ - Deprecated. - """ - # Ensure the extension directory exists - raise DeprecationWarning( - '`install_extension` and the `install_ext` magic have been deprecated since IPython 4.0' - 'Use pip or other package managers to manage ipython extensions.') diff --git a/docs/source/config/extensions/index.rst b/docs/source/config/extensions/index.rst index e3c9cab..4b0a222 100644 --- a/docs/source/config/extensions/index.rst +++ b/docs/source/config/extensions/index.rst @@ -6,8 +6,7 @@ IPython extensions A level above configuration are IPython extensions, Python modules which modify the behaviour of the shell. They are referred to by an importable module name, -and can be placed anywhere you'd normally import from, or in -``.ipython/extensions/``. +and can be placed anywhere you'd normally import from. Getting extensions ================== @@ -71,10 +70,7 @@ Useful :class:`InteractiveShell` methods include :meth:`~IPython.core.interactiv :ref:`defining_magics` You can put your extension modules anywhere you want, as long as they can be -imported by Python's standard import mechanism. However, to make it easy to -write extensions, you can also put your extensions in :file:`extensions/` -within the :ref:`IPython directory `. This directory is -added to :data:`sys.path` automatically. +imported by Python's standard import mechanism. When your extension is ready for general use, please add it to the `extensions index `_. We also