From 934d2e723416e6f1732c229b326b16a30b53abba Mon Sep 17 00:00:00 2001 From: ahochheiden Date: Fri, 26 Aug 2022 19:11:12 +0000 Subject: [PATCH] Bug 1777414 - Remove Python2 specific code from our `Version` subclass r=firefox-build-system-reviewers,glandium Differential Revision: https://phabricator.services.mozilla.com/D151063 --- python/mozbuild/mozbuild/configure/util.py | 25 ---------------------- 1 file changed, 25 deletions(-) diff --git a/python/mozbuild/mozbuild/configure/util.py b/python/mozbuild/mozbuild/configure/util.py index 06ac2478cf61..fe6f90f96066 100644 --- a/python/mozbuild/mozbuild/configure/util.py +++ b/python/mozbuild/mozbuild/configure/util.py @@ -57,31 +57,6 @@ class Version(LooseVersion): ) )[:3] - def _cmp(self, other): - # LooseVersion checks isinstance(StringType), so work around it. - if six.PY2 and isinstance(other, six.text_type): - other = other.encode("ascii") - if six.PY2: - return LooseVersion.__cmp__(self, other) - return LooseVersion._cmp(self, other) - - # These method definitions can be deleted when we remove support for Python - # 2. - def __eq__(self, other): - return self._cmp(other) == 0 - - def __lt__(self, other): - return self._cmp(other) < 0 - - def __le__(self, other): - return self._cmp(other) <= 0 - - def __gt__(self, other): - return self._cmp(other) > 0 - - def __ge__(self, other): - return self._cmp(other) >= 0 - class ConfigureOutputHandler(logging.Handler): """A logging handler class that sends info messages to stdout and other