diff options
author | Roy Wellington Ⅳ <cactus_hugged@yahoo.com> | 2016-02-20 09:08:40 +0300 |
---|---|---|
committer | Roy Wellington Ⅳ <cactus_hugged@yahoo.com> | 2016-02-20 11:41:01 +0300 |
commit | e9d981acebd0c0d4ba4b5e504fc4687dbc6610e3 (patch) | |
tree | f71d3821e34324fc4ca08b2347916c22ac5abd67 /examples | |
parent | b6142c13d65e45c9b7e624fd8c416d604dc95c06 (diff) |
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.
Diffstat (limited to 'examples')
-rw-r--r-- | examples/plugins/letsencrypt_example_plugins.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/plugins/letsencrypt_example_plugins.py b/examples/plugins/letsencrypt_example_plugins.py index 990d7787c..5c22ca7ff 100644 --- a/examples/plugins/letsencrypt_example_plugins.py +++ b/examples/plugins/letsencrypt_example_plugins.py @@ -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" |