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:
Roy Wellington Ⅳ
2016-02-20 00:41:01 -08:00
parent b6142c13d6
commit e9d981aceb
8 changed files with 10 additions and 10 deletions
@@ -61,6 +61,7 @@ logger = logging.getLogger(__name__)
# and load()
@zope.interface.implementer(interfaces.IAuthenticator, interfaces.IInstaller)
@zope.interface.provider(interfaces.IPluginFactory)
class ApacheConfigurator(augeas_configurator.AugeasConfigurator):
# pylint: disable=too-many-instance-attributes,too-many-public-methods
"""Apache configurator.
@@ -81,7 +82,6 @@ class ApacheConfigurator(augeas_configurator.AugeasConfigurator):
:ivar dict assoc: Mapping between domains and vhosts
"""
zope.interface.classProvides(interfaces.IPluginFactory)
description = "Apache Web Server - Alpha"