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

Make ipykernel work without debugpy #767

Merged
merged 1 commit into from
Sep 9, 2021

Conversation

frenzymadness
Copy link
Contributor

@frenzymadness frenzymadness commented Sep 7, 2021

debugpy is an optional dependency because only frontends with
debugging support (Jupyter lab) can really use its features.

closes #712

There is also one new test in the CI to check that all tests are passing when debugpy is not installed.

debugpy is an optional dependency because only frontends with
debugging support (Jupyter lab) can really use its features.

Fixes: ipython#712
@blink1073 blink1073 added this to the 6.3 milestone Sep 7, 2021
Copy link
Contributor

@blink1073 blink1073 left a comment

Choose a reason for hiding this comment

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

LGTM, thank you! I'll leave this open for a day in case another maintainer has input

@frenzymadness
Copy link
Contributor Author

I'm testing this also in Fedora where 25 out of 28 packages built fine with the patched version without debugpy. The three packages fail to build for different reasons.

@minrk minrk merged commit 1ba6b48 into ipython:master Sep 9, 2021
@minrk
Copy link
Member

minrk commented Sep 9, 2021

Thanks!

@blink1073 blink1073 modified the milestones: 6.3, 6.4 Sep 9, 2021
@fcollonval
Copy link
Contributor

fcollonval commented Sep 10, 2021

Should debugpy be removed from install requirements following this change?

In particular if debugpy is kept a mandatory dependency, it is considered as bad practice to have a set of packages breaking pip check.

@frenzymadness
Copy link
Contributor Author

That's a good question for maintainers. I can imagine that it is an extra dependency and then jupyter notebook can depend on ipykernel without debugby and jupyterlab can depend on something like ipykernel[debug] because as far as I understand it, Jupyter lab is the only frontend with implemented debugging.

@frenzymadness frenzymadness deleted the debugpy_optional branch September 10, 2021 06:59
@martinRenou
Copy link
Contributor

martinRenou commented Sep 10, 2021

This approach might not work in the current state of things.

JupyterLab does not depend on ipykernel directly, it depends on nbclassic which itself depends on notebook which depends on ipykernel.
Also this kind of installation "flavors" has no counterpart in conda which seems to be the preferred way of installing the jupyter packages in the ecosystem.

I would also like to say that jupyterlab (and notebook) should ideally not depend on ipykernel, it's a language agnostic tool after all. It should also not depend on notebook, but that's a different problem.

@minrk
Copy link
Member

minrk commented Sep 10, 2021

Should debugpy be removed from install requirements following this change?

In particular if debugpy is kept a mandatory dependency, it is considered as bad practice to have a set of packages breaking pip check.

No, it shouldn't be removed in this repo. If a downstream packager wants to split this dependency, it may, but at the same time, it should also make sure to patch the package metadata when doing so to remove the dependency and satisfy pip check.

@frenzymadness
Copy link
Contributor Author

Should debugpy be removed from install requirements following this change?

In particular if debugpy is kept a mandatory dependency, it is considered as bad practice to have a set of packages breaking pip check.

No, it shouldn't be removed in this repo. If a downstream packager wants to split this dependency, it may, but at the same time, it should also make sure to patch the package metadata when doing so to remove the dependency and satisfy pip check.

And that's exactly what we do in Fedora. Except pip check does not make sense for the system site-packages.

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

Successfully merging this pull request may close these issues.

Please make the dependency on debugpy optional
5 participants