Skip to content

Conversation

ianthomas23
Copy link
Member

Running the tests results in a large number of shapely deprecations warnings of these types:

ShapelyDeprecationWarning: __getitem__ for multi-part geometries is deprecated and will be removed in Shapely 2.0. Use the `geoms` property to access the constituent parts of a multi-part geometry.
ShapelyDeprecationWarning: __len__ for multi-part geometries is deprecated and will be removed in Shapely 2.0. Check the length of the `geoms` property instead to get the  number of parts of a multi-part geometry.
ShapelyDeprecationWarning: Accessing the 'ctypes' attribute is deprecated, and will not be possible any more in Shapely 2.0
ShapelyDeprecationWarning: Iteration over multi-part geometries is deprecated and will be removed in Shapely 2.0. Use the `geoms` property to access the constituent parts of a multi-part geometry.
ShapelyDeprecationWarning: The array interface is deprecated and will no longer work in Shapely 2.0. Convert the '.coords' to a numpy array instead.
ShapelyDeprecationWarning: The 'cascaded_union()' function is deprecated. Use 'unary_union()' instead.

This PR follows the advice contained in those warnings so that they no longer occur.

I still see 3 test failures but they are all parquet-related, presumably issue #84.

@ianthomas23
Copy link
Member Author

This needs an existing maintainer to approve the CI.

Copy link
Member

@jbednar jbednar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great! Do you know if these changes require putting a lower bound on the shapely version? I.e., were they always valid and are now being preferred, or do these changes rely on changes only introduced relatively recently and thus need to be reflected in the setup.py constraints?

@jorisvandenbossche
Copy link

Those APIs have always existed, so a lower bound should (AFAIK) not be needed.

From a quick look, seems all good!

@ianthomas23
Copy link
Member Author

I've checked the test failures and they are indeed the 3 parquet-related failures. There is also this on Python 3.6:

INTERNALERROR> Hypothesis 6.35.1 requires Python 3.7 or later.

I presume that support for Python 3.6 will be dropped soon? I note that numpy have already dropped support for 3.7.

@ianthomas23
Copy link
Member Author

Merging this as it successfully removes the Shapely warnings.

@ianthomas23 ianthomas23 reopened this Jun 22, 2022
@ianthomas23 ianthomas23 merged commit 7ea504e into holoviz:master Jun 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants