[IPython-dev] Request: IPython.ext namespace
Thu Oct 25 14:41:00 CDT 2012
There's one particularly difficult issue with disparate packages sharing
a namespace: multiple install paths cause problems. For example, if you
have a system-wide ipython installation and then install a new extension
in a local folder, you can get an import error because the extension
does not exist in the first version of the namespace found by python.
This was one of the main problems that led to deprecation of the scikits
On 10/25/2012 12:28 PM, Takafumi Arakaki wrote:
> I think IPython should provide namespace for IPython extensions, so
> that extension authors can upload their extensions to PyPI. I don't
> care about what the actual name is (probably it can be ipythonext,
> IPythonContrib, IPython.extensions, or what ever). It is something
> what Sphinx does for "sphinxcontrib.*" namespace. I can think of many
> reasons why it is better for IPython extension users and authors:
> 1. When you want to use external Python module in your extension,
> currently there is no easy way to install it. If you can upload
> your extension as `IPython.ext.YOUREXT`, it can be easily solved.
> 2. Similarity, you can depends on other IPython extensions. Currently
> there is no easy way to import other IPython extensions.
> 3. It does not stop people using `%install_ext`. If your extension is
> just one file, you can just do::
> 4. You get IPython extension search engine for free. People can just do::
> pip search IPython.ext
> Try ``pip search sphinxcontrib``, for example.
> 5. It helps people avoiding namespace collision. Currently there is
> no easy way to make sure if other people not using some name.
> Sure, you can google it, but you can't be 100% sure.
> 6. IPython don't need to create any machinery for this. All you need
> to do is to put some notice in the documentation for extension
> To be fair, I will try to think the reasons why you should not do this:
> 1. It may drive lazy people away from writing it. "Oh, I need setup.py
> for IPython extension? No... I won't upload it hen."
> (But you don't need to upload your extension to pypi, if your
> extension is just one file.)
> 2. It increases the amount and complexity of documentation you need to
> maintain. You need to explain: "You can install extensions using
> `pip` (or `easy_install`, if you want). Oh, you can use
> `%install_ext` magic by the way. But it cannot be used for some
> packages blah blah blah...".
> BTW, should I post something like this in ML or github issue? As
> there was old discussion in this ML _, I am posting it here.
> ..  http://mail.scipy.org/pipermail/ipython-dev/2012-June/thread.html#9427
> Takafumi Arakaki
> IPython-dev mailing list
More information about the IPython-dev