Problem Statement
The BaseESPUser class relies on Python 2's deprecated cmp method and redundant manual comparison overrides to sort user objects. This creates unnecessary technical debt and uses sorting logic that is not natively supported or optimized in
modern Python 3
Proposed Solution
- Adding the @functools.total_ordering decorator to the class.
- Replacing cmp with explicit eq and lt methods that cleanly handle comparisons (including AnonymousESPUser hierarchies) using native tuple comparison.
- Removing the deprecated cmp method and the redundant manual boilerplate overrides for gt, ge, le, and ne.
Alternatives Considered
No response
Additional Context
No response
Problem Statement
The BaseESPUser class relies on Python 2's deprecated cmp method and redundant manual comparison overrides to sort user objects. This creates unnecessary technical debt and uses sorting logic that is not natively supported or optimized in
modern Python 3
Proposed Solution
Alternatives Considered
No response
Additional Context
No response