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

Fix applying @needs_global_scope to cell magics. #11698

Merged
merged 1 commit into from Apr 23, 2019

Conversation

@Carreau
Copy link
Member

@Carreau Carreau commented Apr 23, 2019

There was some side effect in some magic to allow passing
needs_local_scope. We know pass the global_scope to cell magice when
using @needs_local_scope, but at the same time this means that we can't
rely on the existance of local_ns from within the magic to know wheter
we are cell-called or line called.

Fixes #11659

There was some side effect in some magic to allow passing
needs_local_scope. We know pass the global_scope to cell magice when
using @needs_local_scope, but at the same time this means that we can't
rely on the existance of local_ns from within the magic to know wheter
we are cell-called or line called.

Fixes ipython#11659
@dwhswenson
Copy link

@dwhswenson dwhswenson commented Apr 23, 2019

I can verify that this fixes the original problem I reported in #11659 (at least, on my local machine -- I'll wait until 7.5.0 comes out to test on Travis, but that shouldn't make any difference). In addition, I see no unexpected side effects in the rest of our test suite (our system tests are in notebooks). Tested in Py 3.6.

Thanks for the fix!

Loading

@minrk minrk merged commit a051c3a into ipython:master Apr 23, 2019
4 checks passed
Loading
@Carreau
Copy link
Member Author

@Carreau Carreau commented Apr 23, 2019

Thanks @dwhswenson and @minrk

Loading

@Carreau Carreau added this to the 7.5 milestone Apr 23, 2019
@Carreau Carreau deleted the fix-needs-local-scope branch Jun 13, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

3 participants