Skip to content

Altair visualization fails with Altair v5+ due to removed infer_vegalite_type_for_pandas #3233

@souro26

Description

@souro26

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

  1. Install Mesa with a recent version of Altair (v5+)
  2. Run the visualization test suite: pytest tests/visualization/
  3. The test test_call_space_drawer_full fails 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions