Skip to content

Make psutil optional dependency of NBResuse #25

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

Merged
merged 1 commit into from
Apr 17, 2020
Merged

Conversation

krinsman
Copy link
Contributor

Try to make psutil import optional. Still need to implement fronted fallback behavior if no psutil is found. (Or rather, need to better understand how JupyterLab statusbar looks for NBResuse output, to make sure that NBResuse "does nothing" in the way that JupyterLab expects when psutil is not installed.)

@jtpio
Copy link
Member

jtpio commented Apr 3, 2020

Is this change mostly motivated by this issue: jupyterlab/jupyterlab#7818?

Should psutil still be listed as an extra require in the setup.py too?

https://github.com/yuvipanda/nbresuse/blob/783735980c8dc09907499fb4a1bd401b8d22adf8/setup.py#L12

@krinsman
Copy link
Contributor Author

@jtpio You're right, it maybe shouldn't be listed in the setup.py anymore either, otherwise it would get installed automatically with NBResuse via PyPI.

On the other hand maybe it should since the "no behavior behavior" would only be desired once/if/when NBResuse was merged into jupyter_server or JupyterLab -- if someone is going out of their way to install NBResuse as a standalone project, then I imagine they probably want the full functionality, which does require PSutil.

Admittedly I hadn't given this that much though -- I haven't actually gotten around to testing this PR locally with the latest version of NBResuse to make sure it doesn't break anything.

@krinsman krinsman force-pushed the psutil_optional branch 4 times, most recently from 2d9a459 to 8d344aa Compare April 17, 2020 21:21
@krinsman krinsman merged commit f107563 into master Apr 17, 2020
@krinsman krinsman deleted the psutil_optional branch April 17, 2020 21:26
@michaelaye
Copy link

could this merge be causing my recently appeared Errors on macOS? jupyterlab/jupyterlab#8478

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.

3 participants