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

Remove IPython as a dependency #1286

Closed
erik-hasse opened this issue Oct 12, 2022 · 1 comment · Fixed by #1331
Closed

Remove IPython as a dependency #1286

erik-hasse opened this issue Oct 12, 2022 · 1 comment · Fixed by #1331
Labels
triage Issue waiting for triaging

Comments

@erik-hasse
Copy link
Contributor

Is your feature request related to a current problem? Please describe.
Currently IPython is listed as a dependency, but only a single method is used. IPython adds a lot of transitive dependencies, some of which vary by platform (mac vs linux) which makes annoying to use in production environments.

Describe proposed solution
Remove IPython from the list of dependencies and make it an optional import in the utils.py file linked above:

try:
    from IPython import get_ipython
except ModuleNotFoundError:
    get_ipython = None

Then add a simple check at the top of the _is_notebook function:

if get_ipython is None:
    return False

Describe potential alternatives
None

Additional context
I can open a PR with the change if this seems reasonable.

@erik-hasse erik-hasse added the triage Issue waiting for triaging label Oct 12, 2022
@hrzn
Copy link
Contributor

hrzn commented Oct 29, 2022

Hi @erik-hasse, thanks for the suggestion, I agree it'd make sense. We would be very open to receiving a PR for this.

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

Successfully merging a pull request may close this issue.

2 participants