Show More
@@ -88,13 +88,7 b' class ExtensionManager(Configurable):' | |||
|
88 | 88 | |
|
89 | 89 | with self.shell.builtin_trap: |
|
90 | 90 | if module_str not in sys.modules: |
|
91 | with prepended_to_syspath(self.ipython_extension_dir): | |
|
92 | 91 |
|
|
93 | if mod.__file__.startswith(self.ipython_extension_dir): | |
|
94 | print(("Loading extensions from {dir} is deprecated. " | |
|
95 | "We recommend managing extensions like any " | |
|
96 | "other Python packages, in site-packages.").format( | |
|
97 | dir=compress_user(self.ipython_extension_dir))) | |
|
98 | 92 | mod = sys.modules[module_str] |
|
99 | 93 | if self._call_load_ipython_extension(mod): |
|
100 | 94 | self.loaded.add(module_str) |
@@ -155,13 +149,3 b' class ExtensionManager(Configurable):' | |||
|
155 | 149 | if hasattr(mod, 'unload_ipython_extension'): |
|
156 | 150 | mod.unload_ipython_extension(self.shell) |
|
157 | 151 | return True |
|
158 | ||
|
159 | @undoc | |
|
160 | def install_extension(self, url, filename=None): | |
|
161 | """ | |
|
162 | Deprecated. | |
|
163 | """ | |
|
164 | # Ensure the extension directory exists | |
|
165 | raise DeprecationWarning( | |
|
166 | '`install_extension` and the `install_ext` magic have been deprecated since IPython 4.0' | |
|
167 | 'Use pip or other package managers to manage ipython extensions.') |
@@ -6,8 +6,7 b' IPython extensions' | |||
|
6 | 6 | |
|
7 | 7 | A level above configuration are IPython extensions, Python modules which modify |
|
8 | 8 | the behaviour of the shell. They are referred to by an importable module name, |
|
9 |
and can be placed anywhere you'd normally import from |
|
|
10 | ``.ipython/extensions/``. | |
|
9 | and can be placed anywhere you'd normally import from. | |
|
11 | 10 | |
|
12 | 11 | Getting extensions |
|
13 | 12 | ================== |
@@ -71,10 +70,7 b' Useful :class:`InteractiveShell` methods include :meth:`~IPython.core.interactiv' | |||
|
71 | 70 | :ref:`defining_magics` |
|
72 | 71 | |
|
73 | 72 | You can put your extension modules anywhere you want, as long as they can be |
|
74 |
imported by Python's standard import mechanism. |
|
|
75 | write extensions, you can also put your extensions in :file:`extensions/` | |
|
76 | within the :ref:`IPython directory <ipythondir>`. This directory is | |
|
77 | added to :data:`sys.path` automatically. | |
|
73 | imported by Python's standard import mechanism. | |
|
78 | 74 | |
|
79 | 75 | When your extension is ready for general use, please add it to the `extensions |
|
80 | 76 | index <https://github.com/ipython/ipython/wiki/Extensions-Index>`_. We also |
General Comments 0
You need to be logged in to leave comments.
Login now