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

use dynamic default to delay import of jupyter_client optional dependency #559

Merged
merged 2 commits into from
Mar 27, 2017

Conversation

minrk
Copy link
Member

@minrk minrk commented Mar 27, 2017

using a string as a static default doesn't defer import (which is not obvious).

closes #556

@minrk minrk added this to the 5.2 milestone Mar 27, 2017
@minrk
Copy link
Member Author

minrk commented Mar 27, 2017

#499 didn't actually fix #495 because types declared in trait constructors are resolved at instantiation time. This surprises me, and I don't think it's always been the case, but using a dynamic default actually does resolve only when the value is requested.

@mpacer
Copy link
Member

mpacer commented Mar 27, 2017

Looks good to me.

@mpacer mpacer merged commit d630531 into jupyter:master Mar 27, 2017
@damianavila
Copy link
Member

#499 didn't actually fix #495 because types declared in trait constructors are resolved at instantiation time. This surprises me, and I don't think it's always been the case, but using a dynamic default actually does resolve only when the value is requested.

Thanks for the explanation. Looks good to me as well and tested successfully.

@minrk minrk deleted the lazy-import branch March 28, 2017 09:26
takluyver added a commit to takluyver/bookbook that referenced this pull request Apr 25, 2017
Won't be needed with nbconvert >= 5.2
jupyter/nbconvert#559
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.

nbconvert installed from conda or pip fails because missing jupyter_client
3 participants