matplotlib / ipympl

Matplotlib Jupyter Integration
https://matplotlib.org/ipympl/
BSD 3-Clause "New" or "Revised" License
1.59k stars 225 forks source link

Please remove jupyterlab==3.* requirement so as to allow 4.x to work. #539

Closed alex-orange closed 10 months ago

alex-orange commented 11 months ago

This is basically a duplicate of https://github.com/matplotlib/ipympl/issues/532 but I don't think the original intent was understood (and I can't reopen that one as I'm not affiliated). It appears ipympl works with jupyterlab if you install it without checking deps (which can be extremely frustrating for certain tools). In pyproject.toml you have:

requires = ["jupyter_packaging~=0.7.0", "jupyterlab>=3.0.0,==3.*", "setuptools>=40.8.0", "wheel"]

Changing this to:

requires = ["jupyter_packaging~=0.7.0", "jupyterlab>=3.0.0", "setuptools>=40.8.0", "wheel"]

Would be greatly appreciated!

martinRenou commented 11 months ago

The requires you are pointing to are the build requirements, these should only be needed if you build from source.

ipympl has no runtime dependency on jupyterlab so it should be installable whilst checking dependencies versions.

Are you trying to install it from source? We should definitely update ipympl to build against JupyterLab 4 at some point, but we are lacking maintainers. Any PR attempt would be greatly appreciated!

alex-orange commented 11 months ago

I'd be happy to write one. Is the intention to support either 3 or 4 (since 4 seems to work) but limit it to not build against a hypothetical 5? Or is the >=3.0.0 dropping ==3.* acceptable?

martinRenou commented 11 months ago

We can build against one JupyterLab version at a time, as of today we build ipympl using JupyterLab 3, but again this does not mean that ipympl doesn't work with JupyterLab 4, it does work (with probably a simple harmless warning in the JavaScript console at runtime).

If we start building against JupyterLab 4, this should not break JupyterLab 3 support.