enthought / comtypes

A pure Python, lightweight COM client and server framework, based on the ctypes Python FFI package.
Other
290 stars 97 forks source link

Remove remaining `__cmp__` in `comtypes` #512

Open junkmd opened 8 months ago

junkmd commented 8 months ago

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 comtypes.

https://github.com/enthought/comtypes/blob/afc6488d3386771f69ab4a3e305099e16c34f4d7/comtypes/client/lazybind.py#L129-L132

https://github.com/enthought/comtypes/blob/afc6488d3386771f69ab4a3e305099e16c34f4d7/comtypes/GUID.py#L45-L48

https://github.com/enthought/comtypes/blob/afc6488d3386771f69ab4a3e305099e16c34f4d7/comtypes/__init__.py#L592-L605

Remove these dead code and modernize the codebase.