mirror of
https://github.com/certbot/certbot.git
synced 2026-07-28 08:45:22 +02:00
Change zope's classProvides to be a class decorator.
When attempting to import any module that uses
zope.interface.classProvides in Python 3, a TypeError is raised; it
reads:
TypeError: Class advice impossible in Python3. Use the @provider
class decorator instead.
Following the listed advice seems to function in Python 3.
This commit is contained in:
@@ -10,9 +10,9 @@ from letsencrypt.plugins import common
|
||||
|
||||
|
||||
@zope.interface.implementer(interfaces.IAuthenticator)
|
||||
@zope.interface.provider(interfaces.IPluginFactory)
|
||||
class Authenticator(common.Plugin):
|
||||
"""Example Authenticator."""
|
||||
zope.interface.classProvides(interfaces.IPluginFactory)
|
||||
|
||||
description = "Example Authenticator plugin"
|
||||
|
||||
@@ -21,9 +21,9 @@ class Authenticator(common.Plugin):
|
||||
|
||||
|
||||
@zope.interface.implementer(interfaces.IInstaller)
|
||||
@zope.interface.provider(interfaces.IPluginFactory)
|
||||
class Installer(common.Plugin):
|
||||
"""Example Installer."""
|
||||
zope.interface.classProvides(interfaces.IPluginFactory)
|
||||
|
||||
description = "Example Installer plugin"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user