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

fixes #960: lazy import of launch_instance in top-level __init__.py #961

Merged

Conversation

telamonian
Copy link
Contributor

@telamonian telamonian commented May 1, 2021

Fixes #960 by making the problem import lazy. Also removed redundant "scripts" field from setup.py (noticed that since I had to make a small tweak to both that and "entry_points").

If making the launch_instance import lazy seems too convoluted, I think another valid fix would be to remove launch_instance from the module top-level entirely. It's sufficient to be able to do:

from enterprise_gateway.enterprisegatewayapp import launch_instance

… __init__.py

- also removed redundant `"scripts"` field of `setup.py`
Copy link
Member

@kevin-bates kevin-bates left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These changes look good and appear to work fine - thank you for pointing this out Max!

@kevin-bates kevin-bates merged commit 52aa615 into jupyter-server:master May 3, 2021
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.

Imports in top-level __init__.py cause eager loading of most enterprise_gateway code
2 participants