From 00e2f1c15ca2f3f54f5736cf7942129ed99fe31d Mon Sep 17 00:00:00 2001 From: Anthony Sottile Date: Wed, 19 Oct 2022 12:52:25 -0400 Subject: [PATCH] _pytest._py.path: remove _cmp compat --- src/_pytest/_py/path.py | 7 ------- 1 file changed, 7 deletions(-) diff --git a/src/_pytest/_py/path.py b/src/_pytest/_py/path.py index ccddcd38d..93f552852 100644 --- a/src/_pytest/_py/path.py +++ b/src/_pytest/_py/path.py @@ -330,13 +330,6 @@ class PathBase: """return new path object with 'other' added to the basename""" return self.new(basename=self.basename + str(other)) - def __cmp__(self, other): - """return sort value (-1, 0, +1).""" - try: - return cmp(self.strpath, other.strpath) - except AttributeError: - return cmp(str(self), str(other)) # self.path, other.path) - def __lt__(self, other): try: return self.strpath < other.strpath