Skip to content

New Collections protocol breaks xarray objects #9058

@dcherian

Description

@dcherian

The recent merge of the new Collections protocol (#8674) broke Xarray's tests (pydata/xarray#6578)

Xarray objects return None from __dask_graph__ if there no dask arrays being wrapped.

It seems like the current version of is_dask_collection only checks for the presence of __dask_graph__. Xarray objects are a case where this check is not sufficient (they look like dask collections in general, you can call dask.visualize and dask.compute on xarray objects).

It isn't clear to me that there is a good solution other than explicitly checking the return value in is_dask_collection but if there is something we could do on the Xarray side, please let us know!

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething is brokencorep1Affects a large population and inhibits work

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions