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

remove __cmp__ methods in client.dynamic #433

Closed
junkmd opened this issue Dec 31, 2022 · 1 comment · Fixed by #434
Closed

remove __cmp__ methods in client.dynamic #433

junkmd opened this issue Dec 31, 2022 · 1 comment · Fixed by #434
Assignees
Labels
drop_py2 dev based on supporting only Python3, see #392 good first issue Good for newcomers

Comments

@junkmd
Copy link
Collaborator

junkmd commented Dec 31, 2022

THIS IS FOR drop_py2 PLAN! Please see #392.

In Python3,

The cmp() function should be treated as gone, and the cmp() special method is no longer supported.
https://docs.python.org/3/whatsnew/3.0.html#ordering-comparisons

However, they are still contained in client.dynamic.

def __cmp__(self, other):
if not isinstance(other, _Dispatch):
return 1
return cmp(self._comobj, other._comobj)

Remove this dead code and modernize the codebase.

@junkmd junkmd added good first issue Good for newcomers drop_py2 dev based on supporting only Python3, see #392 labels Dec 31, 2022
@junkmd junkmd self-assigned this Dec 31, 2022
@junkmd
Copy link
Collaborator Author

junkmd commented Dec 31, 2022

I created this issue to serve as a "model case" for future good first issue that I will submit.

I will work on this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
drop_py2 dev based on supporting only Python3, see #392 good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant