-
-
Notifications
You must be signed in to change notification settings - Fork 342
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
lib: Replaced __cmp__ method with compensating methods for Python3 functionality #4684
Conversation
@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? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would remove the __cmp__
(it is not used in Python3) and keep the rest.
Can you update the title too? |
Great! |
This has broken GUI. |
Can you show a situation where it occurs? |
GUI ”freezes” with an hourglass the end of startup. |
In the meantime, I figured how to reproduce it. I'm almost finished validating the solution for it, and from what I understand, the implementation of eq isn't really the problem, it is its presence that has a problem. Let me finish debugging, after lunch |
…nctionality (OSGeo#4684) * updated cmp * updated gt * removed cmp
wrt to #1809
This PR updates the
__cmp__
method insaferef.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:
__eq__
method for equality comparison.__lt__
method for less-than comparison.__cmp__
method now uses the rich comparison methods for its logic.This shouldn't change overall behavior of
saferef
class.