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

Don't import jupyter_client unless we're executing the notebook #499

Merged
merged 2 commits into from
Dec 22, 2016

Conversation

takluyver
Copy link
Member

Closes gh-495

Also added jupyter_client as an explicit dependency for the tests, since it's imported in test code.

It was already there implicitly through ipykernel, but we import it in
the tests, so it should be explicit.
Copy link
Member

@minrk minrk left a comment

Choose a reason for hiding this comment

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

👍

@mpacer
Copy link
Member

mpacer commented Dec 22, 2016

Why does setting the default value as a string work when previously it was being passed a class object?

Happy to merge, just wanted to know.

@mpacer mpacer merged commit d7c996c into jupyter:master Dec 22, 2016
@takluyver
Copy link
Member Author

The Type and Instance traitlets have some special functionality that you can supply classes as a string containing the full importable name of the class. They import it and get the actual class object when the object they're attached to is instantiated. Here's the code in Type:

https://github.com/ipython/traitlets/blob/4.3.1/traitlets/traitlets.py#L1601

@minrk minrk modified the milestones: 5.1, 5.0.1 Jan 2, 2017
@mpacer
Copy link
Member

mpacer commented Jan 20, 2017

So, based on conda-forge/nbconvert-feedstock@1fce020 it suggests we should not have jupyter_client as any kind of dependency (strictly for tests or optionally)… I'm not sure how to fix that though while maintaining all current functionality.

@minrk
Copy link
Member

minrk commented Jan 20, 2017

I believe everything is correct now. It's a dependency for a feature, which is expressed via the setuptools extras_require field.

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