[Zope3-checkins] CVS: Zope3/src/zope/configuration - meta.py:1.6 metametaconfigure.py:1.8 metametaconfigurefordocgen.py:1.6

Steve Alexander steve@cat-box.net
Wed, 4 Jun 2003 06:22:50 -0400


Update of /cvs-repository/Zope3/src/zope/configuration
In directory cvs.zope.org:/tmp/cvs-serv4822/src/zope/configuration

Modified Files:
	meta.py metametaconfigure.py metametaconfigurefordocgen.py 
Log Message:
new-style implements()


=== Zope3/src/zope/configuration/meta.py 1.5 => 1.6 ===
--- Zope3/src/zope/configuration/meta.py:1.5	Fri Apr 18 18:12:31 2003
+++ Zope3/src/zope/configuration/meta.py	Wed Jun  4 06:22:20 2003
@@ -18,8 +18,7 @@
 $Id$
 """
 
-
-from zope.interface import directlyProvides, classProvides
+from zope.interface import directlyProvides, classProvides, implements
 from zope.configuration.interfaces import INonEmptyDirective
 from zope.configuration.interfaces import ISubdirectiveHandler
 
@@ -210,7 +209,7 @@
                     callable, subs = _custom_directives[('*', _name[1])]
                 else:
                     raise InvalidDirective(_name)
-                
+
             except KeyError:
                 raise InvalidDirective(_name)
 
@@ -287,7 +286,7 @@
 class DirectiveNamespace:
 
     classProvides(INonEmptyDirective)
-    __implements__ = ISubdirectiveHandler
+    implements(ISubdirectiveHandler)
 
     def __init__(self, _context, namespace):
         self._namespace = namespace
@@ -316,7 +315,7 @@
     #
     # For this reason, this isn't a good directive example.
 
-    __implements__ = ISubdirectiveHandler
+    implements(ISubdirectiveHandler)
 
     def __init__(self, subs, namespace=None):
         self._subs = subs


=== Zope3/src/zope/configuration/metametaconfigure.py 1.7 => 1.8 ===
--- Zope3/src/zope/configuration/metametaconfigure.py:1.7	Sat May  3 12:34:15 2003
+++ Zope3/src/zope/configuration/metametaconfigure.py	Wed Jun  4 06:22:20 2003
@@ -14,7 +14,7 @@
 """
 $Id$
 """
-from zope.interface import directlyProvides, classProvides
+from zope.interface import directlyProvides, classProvides, implements
 from zope.configuration.meta \
      import DirectiveNamespace as bootstrapDirectiveNamespace
 from zope.configuration.meta import Subdirective as bootstrapSubdirective
@@ -29,7 +29,6 @@
 class DirectiveNamespace(bootstrapDirectiveNamespace):
 
     classProvides(INonEmptyDirective)
-    __implements__ = ISubdirectiveHandler
 
     def _Subdirective(self, *args, **kw):
         return Subdirective(*args, **kw)
@@ -56,8 +55,6 @@
 class Subdirective(bootstrapSubdirective):
     """An extended Subdirective that handles descriptions and attributes"""
 
-    __implements__ = ISubdirectiveHandler
-
     def __init__(self, subs, namespace=None, name=None):
         bootstrapSubdirective.__init__(self,subs,namespace)
         self._name = name
@@ -95,8 +92,8 @@
 
 class Description:
 
-    __implements__ = ISubdirectiveHandler
-    
+    implements(ISubdirectiveHandler)
+
     def __init__(self, dir):
         self._dir = dir
         self._description = ''
@@ -113,8 +110,8 @@
 
 class Attribute:
 
-    __implements__ = ISubdirectiveHandler
-    
+    implements(ISubdirectiveHandler)
+
     def __init__(self, dir, name, required, description=''):
         required = required.lower()
         if required not in ('', 'yes', 'no'):
@@ -141,8 +138,8 @@
 
 class AttrDescription:
 
-    __implements__ = ISubdirectiveHandler
-    
+    implements(ISubdirectiveHandler)
+
     def __init__(self, dir):
         self._dir = dir
 
@@ -151,4 +148,3 @@
 
     def __call__(self):
         return ()
-        


=== Zope3/src/zope/configuration/metametaconfigurefordocgen.py 1.5 => 1.6 ===
--- Zope3/src/zope/configuration/metametaconfigurefordocgen.py:1.5	Sat May  3 12:34:31 2003
+++ Zope3/src/zope/configuration/metametaconfigurefordocgen.py	Wed Jun  4 06:22:20 2003
@@ -80,7 +80,6 @@
     """An extended class that handles descriptions and attributes"""
 
     classProvides(INonEmptyDirective)
-    __implements__ = ISubdirectiveHandler
 
     def _Subdirective(self, *args, **kw):
         return Subdirective(*args, **kw)
@@ -91,8 +90,6 @@
 
 class Subdirective(baseSubdirective):
     """An extended class that handles descriptions and attributes"""
-
-    __implements__ = ISubdirectiveHandler
 
     def _useDescription(self, namespace, name, subs, description):
         _recordCommandMetadata(subs, description)