jupyter_server
jupyter_server copied to clipboard
Removing `nbconvert` as a required dependency
Problem
I have jupyterlab as a dependency, which depends on jupyter-server, which installs nbconvert.
Can we move nbconvert to an optional dependency via an extra?
The source code in https://github.com/jupyter-server/jupyter_server/tree/v2.12.5/jupyter_server/nbconvert already doesn't require it at import time, so the code is already compatible with this.
It seems https://github.com/jupyter-server/jupyter_server/issues/15 is related.
Proposed Solution
- Moving
nbconvertto an optionalextra - Adding
nbconvertas a test dependency
Additional context
N/a
Thank you for opening your first issue in this project! Engagement like this is essential for open source projects! :hugs:
If you haven't done so already, check out Jupyter's Code of Conduct. Also, please try to follow the issue template as it helps other other community members to contribute more effectively.
You can meet the other Jovyans by joining our Discourse forum. There is also an intro thread there where you can stop by and say Hi! :wave:
Welcome to the Jupyter community! :tada:
It's unlikely this is going to be accepted in jupyter-server, as it is a Jupyter server that comes with "essential" functionalities that dependencies expect, and nbconvert is one of them. Jupyverse on the other hand allows that, as it's a modular server where everything is a plugin. It's as easy as not installing fps-nbconvert.
Seems making it a separate server extension is more reasonable. As nbconvert need more configuration when using LaTeX.
I think making it a server extension is a reasonable ask.
We made a similar call with the terminals and mathjax APIs in Jupyter Server a few years back.
I agree that nbconvert feels more like an optional feature of Jupyter Server than a necessary requirement for a minimal Jupyter Server (there has been a lot of discussion previously about what makes a minimal Jupyter Server).
If you're really interested in separating out nbconvert, I think we could get this done without much resistance. We just need fingers at the keyboard.
Practically, the approach we took for e.g. terminals was:
- create a separate python package for the server extension
- move all of logic from that extension to this new package.
- merge and release the package.
- depend on this package in jupyter_server, at least for now. (Completely removing it would require a major release of jupyter server, since it changes our REST API surface).
By doing this, we would introduce a non-breaking change that would allow folks to at least disable nbconvert. In future (major) releases of Jupyter Server, we could drop the dependency if folks agree.