OSGeo / grass

GRASS GIS - free and open-source geospatial processing engine
https://grass.osgeo.org
Other
855 stars 310 forks source link

lib: Updated __cmp__ method for Python3 functionality #4684

Open arohanajit opened 2 weeks ago

arohanajit commented 2 weeks ago

wrt to #1809 This PR updates the __cmp__ method in saferef.py to be compatible with Python 3. Comparison methods __eq__ and __lt__ are implemented to maintain the same functionality without requiring changes elsewhere in the code.

Changes:

This shouldn't change overall behavior of saferef class.

petrasovaa commented 2 weeks ago

@echoix any suggestions here? Upstream has no fix for it. It's not used.

echoix commented 2 weeks ago

@echoix any suggestions here? Upstream has no fix for it. It's not used.

I'd need to have a deep look for this, as it might be impactful. I think we needed to revert one of my PRs that touched this if I remember well.

I'd be cautious and read well. Was it @wenzeslaus that has experience with this file?