[Zope3-checkins] CVS: Zope3/src/zope/app/container - copypastemove.py:1.9 dependency.py:1.7 directory.py:1.5 find.py:1.5 size.py:1.3 traversal.py:1.8

Steve Alexander steve@cat-box.net
Sat, 7 Jun 2003 02:37:53 -0400


Update of /cvs-repository/Zope3/src/zope/app/container
In directory cvs.zope.org:/tmp/cvs-serv4294/src/zope/app/container

Modified Files:
	copypastemove.py dependency.py directory.py find.py size.py 
	traversal.py 
Log Message:
updated to use new-style interface declarations


=== Zope3/src/zope/app/container/copypastemove.py 1.8 => 1.9 ===
--- Zope3/src/zope/app/container/copypastemove.py:1.8	Sun Jun  1 11:59:29 2003
+++ Zope3/src/zope/app/container/copypastemove.py	Sat Jun  7 02:37:22 2003
@@ -28,13 +28,14 @@
 from zope.app.interfaces.container import IPasteTarget
 from zope.app.interfaces.content.folder import ICloneWithoutChildren
 from zope.component import getAdapter
+from zope.interface import implements
 from zope.app.context import ContextWrapper
 from zope.proxy import removeAllProxies
 import copy
 
 class PasteTarget:
 
-    __implements__ = IPasteTarget
+    implements(IPasteTarget)
 
     def __init__(self, container):
         self.context = container
@@ -96,7 +97,7 @@
 
 class MoveSource:
 
-    __implements__ = IMoveSource
+    implements(IMoveSource)
 
     def __init__(self, container):
         self.context = container
@@ -126,7 +127,7 @@
 
 class CopySource:
 
-    __implements__ = ICopySource
+    implements(ICopySource)
 
     def __init__(self, container):
         self.context = container
@@ -146,7 +147,7 @@
 
 class NoChildrenCopySource:
 
-    __implements__ = INoChildrenCopySource
+    implements(INoChildrenCopySource)
 
     def __init__(self, container):
         self.context = container
@@ -167,7 +168,7 @@
 
 class PasteNamesChooser:
 
-    __implements__ = IPasteNamesChooser
+    implements(IPasteNamesChooser)
 
     def __init__(self, container):
         self.context = container


=== Zope3/src/zope/app/container/dependency.py 1.6 => 1.7 ===
--- Zope3/src/zope/app/container/dependency.py:1.6	Wed May 28 11:46:06 2003
+++ Zope3/src/zope/app/container/dependency.py	Sat Jun  7 02:37:22 2003
@@ -21,11 +21,12 @@
 from zope.app.interfaces.event import ISubscriber
 from zope.proxy import removeAllProxies
 from zope.app.traversing import getPath, canonicalPath
+from zope.interface import implements
 
 class DependencyChecker:
     """Checking dependency  while deleting object
     """
-    __implements__ = ISubscriber
+    implements(ISubscriber)
 
     def __init__(self):
         pass


=== Zope3/src/zope/app/container/directory.py 1.4 => 1.5 ===
--- Zope3/src/zope/app/container/directory.py:1.4	Wed May 28 11:46:06 2003
+++ Zope3/src/zope/app/container/directory.py	Sat Jun  7 02:37:22 2003
@@ -27,6 +27,7 @@
 
 import zope.app.interfaces.file
 from zope.proxy import removeAllProxies
+from zope.interface import implements
 
 def noop(container):
     """XXX adapt an IContainer to an IWriteDirectory by just returning it
@@ -41,10 +42,9 @@
 
     This adapter provides a factory that creates a new empty container
     of the same class as it's context.
-    
     """
 
-    __implements__ = zope.app.interfaces.file.IDirectoryFactory
+    implements(zope.app.interfaces.file.IDirectoryFactory)
 
     def __init__(self, context):
         self.context = context


=== Zope3/src/zope/app/container/find.py 1.4 => 1.5 ===
--- Zope3/src/zope/app/container/find.py:1.4	Sun Jun  1 11:59:29 2003
+++ Zope3/src/zope/app/container/find.py	Sat Jun  7 02:37:22 2003
@@ -19,12 +19,13 @@
 
 from zope.app.interfaces.container.find import IFind, IIdFindFilter
 from zope.app.interfaces.container import IReadContainer
+from zope.interface import implements
 # XXX need to do this manually to wrap objects
 from zope.app.context import ContextWrapper
 
 class FindAdapter(object):
 
-    __implements__ =  IFind
+    implements(IFind)
 
     __used_for__ = IReadContainer
 
@@ -71,7 +72,7 @@
 
 class SimpleIdFindFilter(object):
 
-    __implements__ =  IIdFindFilter
+    implements(IIdFindFilter)
 
     def __init__(self, ids):
         self._ids = ids


=== Zope3/src/zope/app/container/size.py 1.2 => 1.3 ===
--- Zope3/src/zope/app/container/size.py:1.2	Wed Mar 12 05:04:46 2003
+++ Zope3/src/zope/app/container/size.py	Sat Jun  7 02:37:22 2003
@@ -18,12 +18,13 @@
 """
 
 from zope.app.interfaces.size import ISized
+from zope.interface import implements
 
 __metaclass__ = type
 
 class ContainerSized:
 
-    __implements__ = ISized
+    implements(ISized)
 
     def __init__(self, container):
         self._container = container


=== Zope3/src/zope/app/container/traversal.py 1.7 => 1.8 ===
--- Zope3/src/zope/app/container/traversal.py:1.7	Thu May  1 15:35:09 2003
+++ Zope3/src/zope/app/container/traversal.py	Sat Jun  7 02:37:22 2003
@@ -27,13 +27,14 @@
 from zope.app.traversing.namespace import UnexpectedParameters
 from zope.app.interfaces.container import IReadContainer
 from zope.exceptions import NotFoundError
+from zope.interface import implements
 
 # Note that the next two classes are included here because they
 # can be used for multiple view types.
 
 class ContainerTraverser:
 
-    __implements__ = IBrowserPublisher, IXMLRPCPublisher
+    implements(IBrowserPublisher, IXMLRPCPublisher)
     __used_for__ = ISimpleReadContainer
 
     def __init__(self, container, request):
@@ -84,7 +85,7 @@
     """Traverses containers via getattr and get.
     """
 
-    __implements__ = ITraversable
+    implements(ITraversable)
     __used_for__ = IReadContainer
 
     def __init__(self, container):