Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add compatibility with ipython 0.11 #7

Merged
merged 1 commit into from Oct 4, 2011
Merged

add compatibility with ipython 0.11 #7

merged 1 commit into from Oct 4, 2011

Conversation

juliantaylor
Copy link

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

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
add compatibility with ipython 0.11
@bbangert bbangert merged commit 2fb4d52 into Pylons:master Oct 4, 2011
@takluyver
Copy link

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.

@takluyver
Copy link

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.

@takluyver
Copy link

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.

@takluyver
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants