[Zodb-checkins] CVS: Zope3/src/zodb/zeo - client.py:1.13

Steve Alexander steve at cat-box.net
Fri Jun 6 12:24:22 EDT 2003


Update of /cvs-repository/Zope3/src/zodb/zeo
In directory cvs.zope.org:/tmp/cvs-serv25930/src/zodb/zeo

Modified Files:
	client.py 
Log Message:
Changed old style __implements__ declarations to new-style implements()
ones.


=== Zope3/src/zodb/zeo/client.py 1.12 => 1.13 ===
--- Zope3/src/zodb/zeo/client.py:1.12	Thu May 22 11:28:17 2003
+++ Zope3/src/zodb/zeo/client.py	Fri Jun  6 11:24:21 2003
@@ -30,7 +30,7 @@
 import time
 import logging
 
-from zope.interface import directlyProvides
+from zope.interface import directlyProvides, implements
 
 from zodb.zeo import cache
 from zodb.zeo.stubs import StorageServerStub
@@ -98,10 +98,10 @@
 
     # The exact storage interfaces depend on the server that the client
     # connects to.  We know that every storage must implement IStorage,
-    # but once connected we may change the instance's __implements__
-    # to reflect features available on the storage.
+    # but once connected we may change the interfaces that the instance
+    # provides to reflect features available on the storage.
 
-    __implements__ = IStorage
+    implements(IStorage)
 
     def __init__(self, addr, storage='1', cache_size=20 * MB,
                  name='', client=None, var=None,
@@ -408,7 +408,7 @@
             self._wait_sync()
 
     def update_interfaces(self):
-        # Update instance's __implements__ based on the server.
+        # Update what interfaces the instance provides based on the server.
         L = [IStorage]
         for name in self._info.get("implements", ()):
             if name == "IUndoStorage":
@@ -545,7 +545,7 @@
             # but has a read-only fallback connection, _conn_is_read_only
             # will be True.
             return self._conn_is_read_only
-        
+
     # XXX version should really be part of _info
 
     def getVersion(self):
@@ -891,7 +891,7 @@
         # Invalidations are sent by the ZEO server as a sequence of
         # oid, version pairs.  The DB's invalidate() method expects a
         # dictionary of oids.
-        
+
         # versions maps version names to dictionary of invalidations
         versions = {}
         for oid, version in invs:
@@ -901,7 +901,7 @@
         if self._db is not None:
             for v, d in versions.items():
                 self._db.invalidate(d, version=v)
-                
+
     def endVerify(self):
         """Server callback to signal end of cache validation."""
         if self._pickler is None:




More information about the Zodb-checkins mailing list