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

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

Fix applying @needs_global_scope to cell magics.
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
@dwhswenson

This comment has been minimized.

Copy link

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!

@minrk minrk merged commit a051c3a into ipython:master Apr 23, 2019

4 checks passed

codecov/patch 100% of diff hit (target 0%)
Details
codecov/project 68.96% (+<.01%) compared to d3ffae3
Details
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@Carreau

This comment has been minimized.

Copy link
Member Author

commented Apr 23, 2019

Thanks @dwhswenson and @minrk

@Carreau Carreau added this to the 7.5 milestone Apr 23, 2019

@Carreau Carreau deleted the Carreau: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
Projects
None yet
3 participants
You can’t perform that action at this time.