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'].
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.
Use plugin API for storemagic, so autorestore is configurable.
Add mechanism to have extensions always loaded.
Update docs on %store magic.
Skip useless doctest for %store magic.
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.
Agreed, those should be shell-level. Do you want to do that here or in a different PR?
Related: should extensions just be attached to the InteractiveShell in general, rather than the app? That seems to make more sense.
I agree, @minrk.
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.
opened #1144 for moving extensions to Shell, merging this.