-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Altair visualization fails with Altair v5+ due to removed infer_vegalite_type_for_pandas #3233
Description
Describe the bug
The Altair-based visualization component uses
alt.utils.infer_vegalite_type_for_pandas, which was removed in Altair v5+.
As a result, visualization-related tests fail with an AttributeError on
current Altair versions.
Expected behavior
Altair-based visualizations and related tests should work correctly with
current Altair versions (v5+), without raising errors due to deprecated or
removed APIs.
To Reproduce
- Install Mesa with a recent version of Altair (v5+)
- Run the visualization test suite: pytest tests/visualization/
- The test
test_call_space_drawer_fullfails with:AttributeError: module 'altair.utils' has no attribute 'infer_vegalite_type_for_pandas'
This error originates from the Altair-based space visualization component when
constructing tooltips.
Additional context
This appears to be caused by dependency drift after upgrading to Altair v5+, where
alt.utils.infer_vegalite_type_for_pandas was removed.
The affected code path is exercised by Altair-based space visualizations.