[Zope3-checkins] CVS: Zope3/src/zodb/zeo - client.py:1.1.2.4
Guido van Rossum
guido@python.org
Tue, 24 Dec 2002 12:10:18 -0500
Update of /cvs-repository/Zope3/src/zodb/zeo
In directory cvs.zope.org:/tmp/cvs-serv10583
Modified Files:
Tag: NameGeddon-branch
client.py
Log Message:
Fix class confusion: StorageServerStubClass should be initialized
from stubs.StorageServer, not from server.StorageServer.
Also fixed a few comments.
=== Zope3/src/zodb/zeo/client.py 1.1.2.3 => 1.1.2.4 ===
--- Zope3/src/zodb/zeo/client.py:1.1.2.3 Mon Dec 23 17:21:01 2002
+++ Zope3/src/zodb/zeo/client.py Tue Dec 24 12:10:17 2002
@@ -35,7 +35,7 @@
import types
import logging
-from zodb.zeo import cache, server
+from zodb.zeo import cache, stubs
from zodb.zeo.tbuf import TransactionBuffer
from zodb.zeo.exceptions import Disconnected
from zodb.zeo.zrpc.client import ConnectionManager
@@ -102,7 +102,7 @@
TransactionBufferClass = TransactionBuffer
ClientCacheClass = cache.ClientCache
ConnectionManagerClass = ConnectionManager
- StorageServerStubClass = server.StorageServer
+ StorageServerStubClass = stubs.StorageServer
def __init__(self, addr, storage='1', cache_size=20 * MB,
name='', client=None, debug=0, var=None,
@@ -304,9 +304,9 @@
0 if it is a suboptimal but acceptable match.
It can also raise DisconnectedError or ReadOnlyError.
- This is called by ZEO.zrpc.ConnectionManager to decide which
- connection to use in case there are multiple, and some are
- read-only and others are read-write.
+ This is called by zeo.zrpc.connection.ConnectionManager to
+ decide which connection to use in case there are multiple, and
+ some are read-only and others are read-write.
This works by calling register() on the server. In read-only
mode, register() is called with the read_only flag set. In
@@ -819,6 +819,8 @@
except AttributeError, msg:
self.logger.error("Invalidate(%r, %r) failed for _db: %s",
oid, version, msg)
+
+ # XXX In Zope3, there's no reason to stick to the ZEO 2 protocol!
# Unfortunately, the ZEO 2 wire protocol uses different names for
# several of the callback methods invoked by the StorageServer.