1
0
mirror of https://github.com/certbot/certbot.git synced 2026-01-26 07:41:33 +03:00

certbot.interfaces: reintroduce empty zope interfaces (#9486)

* reintroduce certbot.interfaces.I* classes

* add wiki link
This commit is contained in:
alexzorin
2022-12-01 08:42:54 +11:00
committed by GitHub
parent c178fa8c0b
commit fe5e56a52c
2 changed files with 24 additions and 1 deletions

View File

@@ -14,7 +14,12 @@ Certbot adheres to [Semantic Versioning](https://semver.org/).
### Fixed
*
* `IPluginFactory`, `IPlugin`, `IAuthenticator` and `IInstaller` have been re-added to
`certbot.interfaces`.
- This is to fix compatibility with a number of third-party DNS plugins which may
have started erroring with `AttributeError` in Certbot v2.0.0.
- Plugin authors can find more information about Certbot 2.x compatibility
[here](https://github.com/certbot/certbot/wiki/Certbot-v2.x-Plugin-Compatibility).
More details about these changes can be found on our GitHub repo.

View File

@@ -16,6 +16,11 @@ from acme.client import ClientV2
from certbot import configuration
from certbot.achallenges import AnnotatedChallenge
try:
from zope.interface import Interface as ZopeInterface
except ImportError:
ZopeInterface = object
if TYPE_CHECKING:
from certbot._internal.account import Account
@@ -465,3 +470,16 @@ class RenewDeployer(metaclass=ABCMeta):
:type lineage: RenewableCert
"""
class IPluginFactory(ZopeInterface):
"""Compatibility shim for plugins that still use Certbot's old zope.interface classes."""
class IPlugin(ZopeInterface):
"""Compatibility shim for plugins that still use Certbot's old zope.interface classes."""
class IAuthenticator(IPlugin):
"""Compatibility shim for plugins that still use Certbot's old zope.interface classes."""
class IInstaller(IPlugin):
"""Compatibility shim for plugins that still use Certbot's old zope.interface classes."""