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

Remove debugpy as dependency? #1136

Open
maartenbreddels opened this issue Jul 20, 2023 · 3 comments
Open

Remove debugpy as dependency? #1136

maartenbreddels opened this issue Jul 20, 2023 · 3 comments

Comments

@maartenbreddels
Copy link
Contributor

debugpy is quite a heavy dependency, before it was a build dependency, but now it's standard:

It shows up as 28MB on disk

 28M    /Users/maartenbreddels/venvs/solara-size1/lib/python3.9/site-packages/debugpy

On pypi https://pypi.org/project/debugpy/#files it's ~5mb.

I'm not sure everyone needs a debugger, and in times of pyodide/pyscript, size matters :)

I think the code is already prepared for it (try block around the import).

@JohanMabille
Copy link
Contributor

IIRC debugpy (or ptvsd back in the days ;)) has been added as a dependency because users complained about it not being installed while they wanted to use the debugger. There was a discussion about making ipykernel able to work without debugpy, which led to the changes you mentioned. But the idea was to keep it by default as most people who use the debugger expect it to work out of the box, and give the possibility to packages managers to remove it.

@maartenbreddels
Copy link
Contributor Author

I think the number of developers using jupyter is small (mostly non-devs I think), and the number of developers using debuggers also small. That makes the number of jupyter users using a debugger very small I think.

Also, with modern jupyter lab, we now have a place to put warnings/error messages, if we can give a user a proper message on what to do to install/enable it, would it be an option to remove it as a dependency?

@ccordoba12
Copy link
Member

if we can give a user a proper message on what to do to install/enable it, would it be an option to remove it as a dependency?

I thought about that too, but I see two problems with this approach:

  • Users would have to install debugpy on all environments they'd like to do some debugging on.
  • VSCode relies on debugpy for debugging and can easily start notebooks/consoles in different envs. So, I think this would be a serious regression for their users.

An alternative would be to create a new package called jupyter-kernel (for lack of a better name) that depends on ipykernel and debugpy. So, packages that prefer it could depend on ipykernel for a lighter set of dependencies.

As a side note, we don't rely on debugpy in Spyder-kernels (our own kernel on top of ipykernel), so we're very interested on this topic too.

gentoo-bot pushed a commit to gentoo/gentoo that referenced this issue Aug 20, 2023
Reference: ipython/ipykernel#712
Reference: ipython/ipykernel#1136

dev-python/ipykernel: keyword 6.25.1-r1 for ~arm64-macos, ~x64-macos
dev-python/comm: keyword 0.1.4 for ~arm64-macos, ~x64-macos
dev-python/ipython: keyword 8.14.0 for ~arm64-macos, ~x64-macos
dev-python/jupyter-client: keyword 8.3.0 for ~arm64-macos, ~x64-macos
dev-python/jupyter-core: keyword 5.3.1 for ~arm64-macos, ~x64-macos
dev-python/matplotlib-inline: keyword 0.1.6 for ~arm64-macos, ~x64-macos
dev-python/nest-asyncio: keyword 1.5.7 for ~arm64-macos, ~x64-macos
dev-python/pyzmq: keyword 25.1.1 for ~arm64-macos, ~x64-macos
dev-python/traitlets: keyword 5.9.0 for ~arm64-macos, ~x64-macos
dev-python/twisted: keyword 22.10.0-r3 for ~arm64-macos, ~x64-macos
dev-libs/libsodium: keyword 1.0.18_p20220618
dev-python/backcall: keyword 0.2.0-r1 for ~arm64-macos, ~x64-macos
dev-python/jedi: keyword 0.19.0 for ~arm64-macos, ~x64-macos
dev-python/pickleshare: keyword 0.7.5 for ~arm64-macos, ~x64-macos
dev-python/prompt-toolkit: keyword 3.0.39 for ~arm64-macos, ~x64-macos
dev-python/stack_data: keyword 0.6.2 for ~arm64-macos, ~x64-macos
dev-python/asttokens: keyword 2.2.1 for ~arm64-macos, ~x64-macos
dev-python/executing: keyword 1.2.0 for ~arm64-macos, ~x64-macos
dev-python/pure_eval: keyword 0.2.2 for ~arm64-macos, ~x64-macos
dev-python/wcwidth: keyword 0.2.6 for ~arm64-macos, ~x64-macos
dev-python/parso: keyword 0.8.3-r1 for ~arm64-macos, ~x64-macos

Signed-off-by: Benda Xu <heroxbd@gentoo.org>
MocioF pushed a commit to MocioF/gentoo that referenced this issue Aug 23, 2023
Reference: ipython/ipykernel#712
Reference: ipython/ipykernel#1136

dev-python/ipykernel: keyword 6.25.1-r1 for ~arm64-macos, ~x64-macos
dev-python/comm: keyword 0.1.4 for ~arm64-macos, ~x64-macos
dev-python/ipython: keyword 8.14.0 for ~arm64-macos, ~x64-macos
dev-python/jupyter-client: keyword 8.3.0 for ~arm64-macos, ~x64-macos
dev-python/jupyter-core: keyword 5.3.1 for ~arm64-macos, ~x64-macos
dev-python/matplotlib-inline: keyword 0.1.6 for ~arm64-macos, ~x64-macos
dev-python/nest-asyncio: keyword 1.5.7 for ~arm64-macos, ~x64-macos
dev-python/pyzmq: keyword 25.1.1 for ~arm64-macos, ~x64-macos
dev-python/traitlets: keyword 5.9.0 for ~arm64-macos, ~x64-macos
dev-python/twisted: keyword 22.10.0-r3 for ~arm64-macos, ~x64-macos
dev-libs/libsodium: keyword 1.0.18_p20220618
dev-python/backcall: keyword 0.2.0-r1 for ~arm64-macos, ~x64-macos
dev-python/jedi: keyword 0.19.0 for ~arm64-macos, ~x64-macos
dev-python/pickleshare: keyword 0.7.5 for ~arm64-macos, ~x64-macos
dev-python/prompt-toolkit: keyword 3.0.39 for ~arm64-macos, ~x64-macos
dev-python/stack_data: keyword 0.6.2 for ~arm64-macos, ~x64-macos
dev-python/asttokens: keyword 2.2.1 for ~arm64-macos, ~x64-macos
dev-python/executing: keyword 1.2.0 for ~arm64-macos, ~x64-macos
dev-python/pure_eval: keyword 0.2.2 for ~arm64-macos, ~x64-macos
dev-python/wcwidth: keyword 0.2.6 for ~arm64-macos, ~x64-macos
dev-python/parso: keyword 0.8.3-r1 for ~arm64-macos, ~x64-macos

Signed-off-by: Benda Xu <heroxbd@gentoo.org>
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

No branches or pull requests

3 participants