[IPython-dev] How to handle extensions

Brian Granger ellisonbg.net@gmail....
Fri Oct 9 13:00:59 CDT 2009


We have started to get questions about we will handle ipython extensions
with all the API changes that have happened.  There are some unresolved
issues that I wanted to bring up here.

In the past, IPython.extensions was a general dumping ground for IPython
code.
It contained many types of things:

* Part of the core IPython functionality.
* Third party extensions.
* Many other things...

To force us to deal with these things I have moved everything from
IPython.extensions
to either IPython.deathrow or IPython.quarantine.

The purposes of these 2 sub-packages are documented here:

http://bazaar.launchpad.net/~ipython-dev/ipython/trunk/annotate/head%3A/docs/source/development/reorg.txt

We now have an official extension API that is described here:

http://bazaar.launchpad.net/~ipython-dev/ipython/trunk/annotate/head%3A/docs/source/config/ipython.txt

For things to be moved back into IPython.extensions they need to adhere to
this new API.
But...not all things that adhere to this API should be let into
IPython.extensions.
Here is my current thinking, but I wanted to get feedback from others.  The
context of this
is that a user wants to know if ipy_profile_zope.py could be put back into
extensions.

Here is my thought...

* To in extensions, it has to be an extension.  Profiles are something
completely different now.
A profile is simply a config file with a special name.  Profiles can load
extensions though.
We currently have a place for custom profiles (IPython.config.profile).

* To be in IPython.extensions or IPython.config.profile a module has to
satisfy a few things:

- There has to be willingness amongst the core IPython developers to
maintain the code.
- The code needs to be reviewed (tests, docs, etc.)
- If the code should be in IPython.core, it shouldn't be in extensions.
- If an extension/profile can be distributed as a third party package, it
should be.  Thus,
the custom completer for enthough.traits should ship with enthought.traits.
Things related
to numpy should ship with numpy.  The only case where an extension/profile
should
be included with IPython is if i) there is no third party package that it
makes sense to
ship it with and ii) the majority of IPython users want the functionality
but iii) the
functionality shouldn't go into IPython.core.

These decisions will need to be made on a case by case basis as people start
asking about their favorite extensions being in quarantine or deathrow.

But, I wanted to see what people though about the overall approach.


Cheers,

Brian
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/ipython-dev/attachments/20091009/7523b71c/attachment.html 


More information about the IPython-dev mailing list