diff --git a/acme/acme/challenges.py b/acme/acme/challenges.py index 96997297b..9702a7a14 100644 --- a/acme/acme/challenges.py +++ b/acme/acme/challenges.py @@ -9,6 +9,7 @@ from cryptography.hazmat.primitives import hashes # type: ignore import josepy as jose import OpenSSL import requests +import six from acme import errors from acme import crypto_util @@ -139,6 +140,7 @@ class KeyAuthorizationChallengeResponse(ChallengeResponse): return True +@six.add_metaclass(abc.ABCMeta) class KeyAuthorizationChallenge(_TokenChallenge): # pylint: disable=abstract-class-little-used,too-many-ancestors """Challenge based on Key Authorization. @@ -147,7 +149,6 @@ class KeyAuthorizationChallenge(_TokenChallenge): that will be used to generate `response`. """ - __metaclass__ = abc.ABCMeta response_cls = NotImplemented thumbprint_hash_function = ( diff --git a/certbot/interfaces.py b/certbot/interfaces.py index f5858a7fd..c96f6bd51 100644 --- a/certbot/interfaces.py +++ b/certbot/interfaces.py @@ -7,11 +7,10 @@ import zope.interface # pylint: disable=too-few-public-methods +@six.add_metaclass(abc.ABCMeta) class AccountStorage(object): """Accounts storage interface.""" - __metaclass__ = abc.ABCMeta - @abc.abstractmethod def find_all(self): # pragma: no cover """Find all accounts.