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

Let IPython magic only import things in "__all__" #1625

Merged
merged 4 commits into from Mar 14, 2017
Merged

Conversation

syrte
Copy link
Contributor

@syrte syrte commented Mar 9, 2017

Make the IPython cell magic only import things in "__all__" when "__all__" exits in the cython cell.
I feel that this makes the cython cells not to pollute the space names unintentionally.

BTW, not clear why the import only skip the variables starts with __. In Python, from module import star will also skip the single underscores _.

Make the IPython cell magic only import things in `"__all__"` when `"__all__"` exits.
IPython magic only import things in `"__all__"`
@robertwb
Copy link
Contributor

Makes a lot of sense. I think it'd be OK to skip the single underscore ones as well.

skip single underscore
minor restructure
@syrte
Copy link
Contributor Author

syrte commented Mar 11, 2017

I've no idea why it fails.
Failed for Python 3.2, Backend=C, passed the rest tests.

@robertwb
Copy link
Contributor

Thanks.

Yeah, Python 3.2 has been flaky on travis for some reason.

@robertwb robertwb merged commit 68e8117 into cython:master Mar 14, 2017
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

2 participants