Storemagic plugin #1073

Merged
merged 4 commits into from Dec 12, 2011

Conversation

Projects
None yet
3 participants
@takluyver
Member

takluyver commented Nov 30, 2011

This makes the storemagic extension a plugin, so there's a configurable option for autorestoring variables on startup (default False).

It also adds a non-configurable default_extensions trait to InteractiveShellApp, for extensions we want to always load as part of IPython. I considered just having a default value for the extensions trait, but I think that's too easy to clobber unintentionally in config, e.g. c.InteractiveShellApp.extensions = ['sympyprinting'].

I think this is a shortcoming of the extension system, that there isn't a simple way to add values to a container - you have to do the little dance with hasattr, and then assign or use extend.

@takluyver

This comment has been minimized.

Show comment
Hide comment
@takluyver

takluyver Dec 1, 2011

Member

Actually, I'm not completely happy about this. Because extensions are loaded by the application, %store won't be available when it's embedded. I think the always-on extensions should be loaded by the shell.

Member

takluyver commented Dec 1, 2011

Actually, I'm not completely happy about this. Because extensions are loaded by the application, %store won't be available when it's embedded. I think the always-on extensions should be loaded by the shell.

@fperez

This comment has been minimized.

Show comment
Hide comment
@fperez

fperez Dec 6, 2011

Member

Agreed, those should be shell-level. Do you want to do that here or in a different PR?

Member

fperez commented Dec 6, 2011

Agreed, those should be shell-level. Do you want to do that here or in a different PR?

@minrk

This comment has been minimized.

Show comment
Hide comment
@minrk

minrk Dec 7, 2011

Member

Related: should extensions just be attached to the InteractiveShell in general, rather than the app? That seems to make more sense.

Member

minrk commented Dec 7, 2011

Related: should extensions just be attached to the InteractiveShell in general, rather than the app? That seems to make more sense.

@fperez

This comment has been minimized.

Show comment
Hide comment
@fperez

fperez Dec 7, 2011

Member

I agree, @minrk.

Member

fperez commented Dec 7, 2011

I agree, @minrk.

@minrk

This comment has been minimized.

Show comment
Hide comment
@minrk

minrk Dec 7, 2011

Member

Okay, then if we do move extensions to InteractiveShell from App, there should be a deprecation similar to the one we did for InteractiveShell.prompt_x.

Member

minrk commented Dec 7, 2011

Okay, then if we do move extensions to InteractiveShell from App, there should be a deprecation similar to the one we did for InteractiveShell.prompt_x.

@minrk

This comment has been minimized.

Show comment
Hide comment
@minrk

minrk Dec 12, 2011

Member

opened #1144 for moving extensions to Shell, merging this.

Member

minrk commented Dec 12, 2011

opened #1144 for moving extensions to Shell, merging this.

minrk added a commit that referenced this pull request Dec 12, 2011

Merge pull request #1073 from takluyver/storemagic-plugin
* %store is now a plugin
* adds a 'default_extensions' list for extensions that should always be loaded.

@minrk minrk merged commit d3ded1a into ipython:master Dec 12, 2011

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

Merge pull request #1073 from takluyver/storemagic-plugin
* %store is now a plugin
* adds a 'default_extensions' list for extensions that should always be loaded.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment