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:
@@ -34,8 +34,8 @@ hostname_regex = re.compile(
|
||||
@zope.interface.implementer(interfaces.IPlugin)
|
||||
class Plugin(object):
|
||||
"""Generic plugin."""
|
||||
# classProvides is not inherited, subclasses must define it on their own
|
||||
#zope.interface.classProvides(interfaces.IPluginFactory)
|
||||
# provider is not inherited, subclasses must define it on their own
|
||||
# @zope.interface.provider(interfaces.IPluginFactory)
|
||||
|
||||
def __init__(self, config, name):
|
||||
self.config = config
|
||||
|
||||
Reference in New Issue
Block a user