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

provide a way to indicate that imported modules should also be parsed for smuggle statements #12

Open
paxtonfitzpatrick opened this issue Apr 14, 2021 · 0 comments
Assignees
Labels
enhancement New feature or request pure Python Issues specifically affecting the pure Python (i.e., non-IPython) implementation

Comments

@paxtonfitzpatrick
Copy link
Member

When we write the pure Python implementation, I think it'd be worth coming up with some way for a user to notate that an imported (or smuggled, I guess) module should be parsed for any smuggle statements it may contain. I think this should only apply at a depth of 1 (i.e., indicating you want to parse an imported module does not cause everything that module imports to be parsed). But I could foresee this being useful for a simple setup where you have, say, main.pyscript and helpers.py scripts, and you want to smuggle some modules into each.

We could implement this as some sort of comment similar to how you specify installer arguments for smuggled packages, or as some variation on the smuggle statement (smuggleR for "smuggle recursive" or something like that).

Also, because you can import pure Python modules from Jupyter/Colab notebooks, we'll want to make this work in IPython as well. This shouldn't be too much more complex, but it will mean temporarily reconfiguring the Davos object from an IPython setup to a Python setup and back again, probably just via a context manager or something.

@paxtonfitzpatrick paxtonfitzpatrick added enhancement New feature or request pure Python Issues specifically affecting the pure Python (i.e., non-IPython) implementation labels Apr 30, 2021
@paxtonfitzpatrick paxtonfitzpatrick self-assigned this May 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request pure Python Issues specifically affecting the pure Python (i.e., non-IPython) implementation
Projects
None yet
Development

No branches or pull requests

1 participant