mirror of
https://github.com/certbot/certbot.git
synced 2026-08-03 08:03:10 +02:00
Py2 and Py3 compatibility for metaclass interfaces (#5913)
This commit is contained in:
committed by
Brad Warren
parent
03b20d972c
commit
95c0c4a708
@@ -1,5 +1,6 @@
|
|||||||
"""Certbot client interfaces."""
|
"""Certbot client interfaces."""
|
||||||
import abc
|
import abc
|
||||||
|
import six
|
||||||
import zope.interface
|
import zope.interface
|
||||||
|
|
||||||
# pylint: disable=no-self-argument,no-method-argument,no-init,inherit-non-class
|
# pylint: disable=no-self-argument,no-method-argument,no-init,inherit-non-class
|
||||||
@@ -607,6 +608,7 @@ class IReporter(zope.interface.Interface):
|
|||||||
# installer wants to perform an update during the run or install subcommand, it
|
# installer wants to perform an update during the run or install subcommand, it
|
||||||
# should do so when :func:`IInstaller.deploy_cert` is called.
|
# should do so when :func:`IInstaller.deploy_cert` is called.
|
||||||
|
|
||||||
|
@six.add_metaclass(abc.ABCMeta)
|
||||||
class GenericUpdater(object):
|
class GenericUpdater(object):
|
||||||
"""Interface for update types not currently specified by Certbot.
|
"""Interface for update types not currently specified by Certbot.
|
||||||
|
|
||||||
@@ -619,8 +621,6 @@ class GenericUpdater(object):
|
|||||||
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
__metaclass__ = abc.ABCMeta
|
|
||||||
|
|
||||||
@abc.abstractmethod
|
@abc.abstractmethod
|
||||||
def generic_updates(self, domain, *args, **kwargs):
|
def generic_updates(self, domain, *args, **kwargs):
|
||||||
"""Perform any update types defined by the installer.
|
"""Perform any update types defined by the installer.
|
||||||
@@ -637,6 +637,7 @@ class GenericUpdater(object):
|
|||||||
"""
|
"""
|
||||||
|
|
||||||
|
|
||||||
|
@six.add_metaclass(abc.ABCMeta)
|
||||||
class RenewDeployer(object):
|
class RenewDeployer(object):
|
||||||
"""Interface for update types run when a lineage is renewed
|
"""Interface for update types run when a lineage is renewed
|
||||||
|
|
||||||
@@ -648,8 +649,6 @@ class RenewDeployer(object):
|
|||||||
be called from the installer code.
|
be called from the installer code.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
__metaclass__ = abc.ABCMeta
|
|
||||||
|
|
||||||
@abc.abstractmethod
|
@abc.abstractmethod
|
||||||
def renew_deploy(self, lineage, *args, **kwargs):
|
def renew_deploy(self, lineage, *args, **kwargs):
|
||||||
"""Perform updates defined by installer when a certificate has been renewed
|
"""Perform updates defined by installer when a certificate has been renewed
|
||||||
|
|||||||
Reference in New Issue
Block a user