-
-
Notifications
You must be signed in to change notification settings - Fork 372
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
Please make the dependency on debugpy optional #712
Comments
That would break the debugging feature of ipykernel. I'm not sure we want to require users to do extra manipulations to have the debugger in ipykernel because of technical difficulty to package debugpy. Besides, I'm not sure to understand what you mean by "DebugPy doesn't seem to support non-x86 platforms": DebugPy has been packaged for ppc and aarch64 on conda-forge and seems to work. |
Well, right now forcing debugpy means we can't package new ipykernel at all due to bug #715. Though I suppose that's a problem of its own, and needs to be fixed independently of debugpy. |
It seems that the latest stable debugpy is not compatible with Python 3.10, although some commits exist in the main branch. |
I've tried to update ipykernel in Fedora to the latest stable release but I've failed because of debugpy. Debugpy itself is not yet compatible with Python 3.10 even when you use the content of the main branch. According to upstream, the reason is that the bundled pydevd does not support 3.10 fully yet: microsoft/debugpy#714 Should I try to prepare a PR making the dependency on debugpy optional? |
It might be simpler and safer to use pip, or even better miniconda, to install your Python packages, instead of dnf. That way you don't mess with your system. You could even start using JupyterLab :) |
Some of our Fedora packages (integrated into the distro) depend on ipykernel. Using pip or miniconda is not an option. Lumír has provided some feedback about why is this new dependency on DebugPy undesired and problematic for us and saying "just use pip/miniconda" does not bring any value to this discussion. |
Is the issue with Python 3.10 the only blocker? It might be worth just waiting for debugpy to be released with Python 3.10 support? |
I was just trying to help by suggesting another approach to install it. I didn't understand you were actually making a Fedora package depending on ipykernel. But now I get why conda/pip will not be helpful to you. |
Apologies if my response was a bit too unfriendly. I guess I assumed it was obvious that we actually talk about the distro package of ipykernel, but I see now that it was not. Glad that we are now on the same page, thank you!
I think this is the main issue here. Not all use cases of ipykernel require debugging and always bringing the new dependency is kinda undesired in most cases. What if Jupyter Lab requires |
I think having an option to disable the dependency on debugpy (and the debugging features) is fine. Indeed, now that the Debug Adapter Protocol is part of the Jupyter Kernel Protocol, the default should be to depend on debugpy. Not sure what the best implementation would be, though (an argument for setup.py? Patching setup.py?). If I remember correctly, the dependency on the debugger lies in ipkernel.py only. Clients detect the support for debugger in the kernelspec. Therefore when the debugger is not supported, the I would be happy to review and test your PR. |
from a setuptools/conda/most packaging environment stand point, ipykernel should depend on debugpy in its metadata. However, for cases like fedora/debian packaging, which have different priorities about dependencies than most, they can change the default dependencies to offer more stripped-down functionality. pip doesn't have a 'default extras', so our only reasonable choice is to put it in install_requires. I think the appropriate level of support from our side is to try to handle |
Ours don't. We would need to patch it out. But otherwise, your assessment is correct, the code handling debugpy being unavailable would be helpful, as we would only need to patch out the metadata. |
My plan is to prepare a patch for this next week. Ideally including a test run with debugpy unavailable which makes us sure that the support for that installation won't break in the future. |
debugpy is an optional dependency because only frontends with debugging support (Jupyter lab) can really use its features. Fixes: ipython#712
debugpy is an optional dependency because only frontends with debugging support (Jupyter lab) can really use its features. Fixes: ipython#712
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>
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>
DebugPy is a packaging nightmare, and doesn't seem to support non-x86 platforms. Could you please make the dependency optional?
The text was updated successfully, but these errors were encountered: