Avoid importing from IPython.parallel in core #2221

Closed
takluyver opened this Issue Jul 30, 2012 · 1 comment

Comments

Projects
None yet
2 participants
@takluyver
Member

takluyver commented Jul 30, 2012

IPython.core.interactiveshell imports an error class from IPython.parallel:

https://github.com/ipython/ipython/blob/master/IPython/core/interactiveshell.py#L89

This pulls in the parallel machinery, zmq, numpy, paramiko, and so on, so it adds significantly to startup time and memory use.

The comment in the file suggests a better way of handling it - move the error class into IPython.core.errors, and have IPython.parallel import it from there.

@minrk

This comment has been minimized.

Show comment Hide comment
@minrk

minrk Jul 30, 2012

Member

This should be fixed when #2044 is taken care of.

Member

minrk commented Jul 30, 2012

This should be fixed when #2044 is taken care of.

@takluyver takluyver closed this in 06c27d8 Jul 31, 2012

minrk added a commit that referenced this issue Aug 4, 2012

Backport PR #2223: Custom tracebacks
Rather than special casing IPython.parallel errors (which led to issue #2221), this adds a simple API where exception classes can offer a custom traceback, by defining a `_render_traceback_(self)` method.

It also adds some documentation on how third parties can integrate packages with IPython. 'Configuration & customisation' seemed the most natural home for this.

We should remember to close #2221 when we merge this - I forgot to put it in a commit message.

minrk added a commit that referenced this issue Sep 1, 2012

Backport PR #2223: Custom tracebacks
Rather than special casing IPython.parallel errors (which led to issue #2221), this adds a simple API where exception classes can offer a custom traceback, by defining a `_render_traceback_(self)` method.

It also adds some documentation on how third parties can integrate packages with IPython. 'Configuration & customisation' seemed the most natural home for this.

We should remember to close #2221 when we merge this - I forgot to put it in a commit message.

mattvonrocketstein pushed a commit to mattvonrocketstein/ipython that referenced this issue Nov 3, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment