Closed timkpaine closed 1 minute ago
I did some work towards this when adding pytest-pyodide tests for our emscripten wheel. My approach adds try/except around the top-level re-exports of the widget and viewer modules
This allows for it to be missing but still incurs an import cost if it is present but unused. That may not be worth resolving if these are very light imports
Fixed in #2754, released in v3.1.0
Ideally we shouldn't really need a top level dependency on
ipywidgets
:https://github.com/finos/perspective/blob/768ca4068c79a2c2243aa24fd3a073f09c6dc97d/rust/perspective-python/pyproject.toml#L36
Perhaps we should move the import out of the top level
__init__.py
, forcing users to useperspective.widget.PerspectiveWidget
, but saving on import time and also potentially a dependency.