Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cherry-pick Shapely 1.8.0 deprecations (#496, #476) #515

Merged
merged 2 commits into from
Nov 8, 2024

Conversation

luca-della-vedova
Copy link
Member

Bug fix

Fixed bug

Cherry pick #496 to humble, from what I understand the version that is shipped in Ubuntu 22.04 is 1.8.0. Also from what I understand shapely 1.8.0 prints a deprecation warning https://shapely.readthedocs.io/en/stable/migration.html#multi-part-geometries-will-no-longer-be-sequences-length-iterable-indexable so this should be OK to backport (and avoid issues for people that might have a newer version of shapely but are using the humble repos).

Note that I don't have a 22.04 machine so I couldn't really test this

Signed-off-by: Xiyu Oh <[email protected]>
Signed-off-by: Luca Della Vedova <[email protected]>
Copy link
Member

@xiyuoh xiyuoh left a comment

Choose a reason for hiding this comment

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

I can verify that the deprecation warning is printed when building the current humble branch in a 22.04/Humble distrobox:

/home/xiyuoh/ws_osrf/rmf_ws/install/rmf_building_map_tools/lib/python3.10/site-packages/building_map/floor.py:144: 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.
  for item in geom:

From experience our deployment partners using RMF Humble benefited from the fix so I'm good with this cherry pick. Also tested this fix in the same workspace and there were no errors or warnings.

We should backport #476 as well since they're targeting the same shapely update, and it is also the line that the above warning is complaining about.

I was trying a clean build of RMF Demos and ran into a type error when
trying to compile maps. This PR fixes the type error. I'm not sure what
triggered it in the first place TBH.

Signed-off-by: Arjo Chakravarty <[email protected]>
Co-authored-by: Yadunund <[email protected]>
Signed-off-by: Luca Della Vedova <[email protected]>
@luca-della-vedova
Copy link
Member Author

Very good point, I missed that 7d67455

@luca-della-vedova luca-della-vedova changed the title Cherry-pick Fix MultiPolygon not iterable (#496) Cherry-pick Fix MultiPolygon not iterable (#496, #476) Nov 8, 2024
@luca-della-vedova luca-della-vedova changed the title Cherry-pick Fix MultiPolygon not iterable (#496, #476) Cherry-pick Shapely 1.8.0 deprecations (#496, #476) Nov 8, 2024
@luca-della-vedova luca-della-vedova merged commit 508ec5e into humble Nov 8, 2024
4 checks passed
@luca-della-vedova luca-della-vedova deleted the luca/humble-cp-496 branch November 8, 2024 08:39
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.

4 participants