From 135187f03e18eebcb32b05c4ecb76a4552aed883 Mon Sep 17 00:00:00 2001 From: Mads Jensen Date: Thu, 25 Feb 2021 23:50:54 +0100 Subject: [PATCH] Python 3 obsoletes explicit __ne__ methods (#8676) This shouldn't be needed as of Python 3+. https://stackoverflow.com/questions/4352244/should-ne-be-implemented-as-the-negation-of-eq-in-python#30676267 --- acme/acme/messages.py | 3 --- certbot-apache/certbot_apache/_internal/obj.py | 6 ------ 2 files changed, 9 deletions(-) diff --git a/acme/acme/messages.py b/acme/acme/messages.py index 44ecb143c..61fd89dfd 100644 --- a/acme/acme/messages.py +++ b/acme/acme/messages.py @@ -150,9 +150,6 @@ class _Constant(jose.JSONDeSerializable, Hashable): # type: ignore def __hash__(self): return hash((self.__class__, self.name)) - def __ne__(self, other): - return not self == other - class Status(_Constant): """ACME "status" field.""" diff --git a/certbot-apache/certbot_apache/_internal/obj.py b/certbot-apache/certbot_apache/_internal/obj.py index 498766744..3cd5f0ff2 100644 --- a/certbot-apache/certbot_apache/_internal/obj.py +++ b/certbot-apache/certbot_apache/_internal/obj.py @@ -20,9 +20,6 @@ class Addr(common.Addr): self.is_wildcard() and other.is_wildcard())) return False - def __ne__(self, other): - return not self.__eq__(other) - def __repr__(self): return "certbot_apache._internal.obj.Addr(" + repr(self.tup) + ")" @@ -191,9 +188,6 @@ class VirtualHost(object): return False - def __ne__(self, other): - return not self.__eq__(other) - def __hash__(self): return hash((self.filep, self.path, tuple(self.addrs), tuple(self.get_names()),