Skip to content

Commit

Permalink
CI: guard dask-geopandas expr import to avoid a TypeError on Python 3…
Browse files Browse the repository at this point in the history
….10 (#1356)
  • Loading branch information
maximlt authored Sep 13, 2024
1 parent 6208529 commit 5c62bf0
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions datashader/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -1285,9 +1285,12 @@ def _source_from_geopandas(self, source):
import dask_geopandas
if Version(dask_geopandas.__version__) >= Version("0.4.0"):
from dask_geopandas.core import GeoDataFrame as gdf1
from dask_geopandas.expr import GeoDataFrame as gdf2
dfs.append(gdf1)

dfs.extend([gdf1, gdf2])
# See https://github.com/geopandas/dask-geopandas/issues/311
with contextlib.suppress(TypeError):
from dask_geopandas.expr import GeoDataFrame as gdf2
dfs.append(gdf2)
else:
dfs.append(dask_geopandas.GeoDataFrame)

Expand Down

0 comments on commit 5c62bf0

Please sign in to comment.