add compatibility with ipython 0.11 #7

Merged
merged 1 commit into from Oct 4, 2011

Conversation

Projects
None yet
3 participants

try to use 0.11 and 0.10 api to open embedded ipython shell

add compatibility with ipython 0.11
try to use 0.11 and 0.10 api to open embedded ipython shell

bbangert added a commit that referenced this pull request Oct 4, 2011

Merge pull request #7 from juliantaylor/ipython-0.11
add compatibility with ipython 0.11

@bbangert bbangert merged commit 2fb4d52 into Pylons:master Oct 4, 2011

Just a heads up, there's a minor API change coming in IPython 0.12. The global_ns parameter (in shell(local_ns=locs, global_ns={})) has been replaced by a module parameter. This parameter was already optional in 0.11, so as you're just passing it an empty dictionary, I recommend you don't use a global_ns parameter at all.

Sorry to break the API again. If you've got any questions, please get in touch via mailing lists or IRC.

Update: My mistake, calling it without global_ns in 0.11 will take the global namespace of the module it's called from, which probably isn't what you want. This might require an extra try/except to decide whether to pass an empty global_ns dict or a new types.ModuleType() object. Alternatively, in 0.12, you will be able to pass the namespace on instantiating the embedded shell, rather than on creating it, in which case only one option needs to be specified.

Another update: e're thinking of restoring the global_ns option for backwards compatibility, so don't worry about this for the moment. I'll post again when it's decided.

We've decided to leave the global_ns parameter in for 0.12. It may be removed in a future release, but there's no timetable for doing so.

@pedersen pedersen referenced this pull request in TurboGears/tg2devtools Sep 24, 2012

Closed

paster and iPython #2

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