Skip to content

Commit

Permalink
Merge pull request #50 from zopefoundation/asyncio-cleanups
Browse files Browse the repository at this point in the history
Asyncio cleanups
  • Loading branch information
jimfulton committed Jul 19, 2016
2 parents 671a5fb + dd2d97c commit 51a6311
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 37 deletions.
2 changes: 1 addition & 1 deletion src/ZEO/ClientStorage.py
Original file line number Diff line number Diff line change
Expand Up @@ -490,7 +490,7 @@ def record_iternext(self, next=None):
return self._call('record_iternext', next)

def getTid(self, oid):
# XXX deprecated: used by storage server for full cache verification.
# XXX deprecated: but ZODB tests use this. They shouldn't
return self._call('getTid', oid)

def loadSerial(self, oid, serial):
Expand Down
30 changes: 2 additions & 28 deletions src/ZEO/StorageServer.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,10 +76,6 @@ class StorageServerError(StorageError):
class ZEOStorage:
"""Proxy to underlying storage for a single remote client."""

# A list of extension methods. A subclass with extra methods
# should override.
extensions = []

connected = connection = stats = storage = storage_id = transaction = None
blob_tempfile = None
log_label = 'unconnected'
Expand All @@ -91,10 +87,6 @@ def __init__(self, server, read_only=0):
self.client_conflict_resolution = server.client_conflict_resolution
# timeout and stats will be initialized in register()
self.read_only = read_only
# The authentication protocol may define extra methods.
self._extensions = {}
for func in self.extensions:
self._extensions[func.__name__] = None
self._iterators = {}
self._iterator_ids = itertools.count()
# Stores the last item that was handed out for a
Expand Down Expand Up @@ -148,23 +140,13 @@ def setup_delegation(self):
if not info['supportsUndo']:
self.undoLog = self.undoInfo = lambda *a,**k: ()

# XXX deprecated: but ZODB tests use getTid. They shouldn't
self.getTid = storage.getTid
self.load = storage.load

self.loadSerial = storage.loadSerial
record_iternext = getattr(storage, 'record_iternext', None)
if record_iternext is not None:
self.record_iternext = record_iternext

try:
fn = storage.getExtensionMethods
except AttributeError:
pass # no extension methods
else:
d = fn()
self._extensions.update(d)
for name in d:
assert not hasattr(self, name)
setattr(self, name, getattr(storage, name))
self.lastTransaction = storage.lastTransaction

try:
Expand Down Expand Up @@ -250,7 +232,6 @@ def get_info(self):
'size': storage.getSize(),
'name': storage.getName(),
'supportsUndo': supportsUndo,
'extensionMethods': self.getExtensionMethods(),
'supports_record_iternext': hasattr(self, 'record_iternext'),
'interfaces': tuple(interfaces),
}
Expand All @@ -260,13 +241,6 @@ def get_size_info(self):
'size': self.storage.getSize(),
}

def getExtensionMethods(self):
return self._extensions

def loadEx(self, oid):
self.stats.loads += 1
return self.storage.load(oid, '')

def loadBefore(self, oid, tid):
self.stats.loads += 1
return self.storage.loadBefore(oid, tid)
Expand Down
8 changes: 0 additions & 8 deletions src/ZEO/interfaces.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,14 +90,6 @@ class IServeable(zope.interface.Interface):
"""Interface provided by storages that can be served by ZEO
"""

def getTid(oid):
"""The last transaction to change an object
Return the transaction id of the last transaction that committed a
change to an object with the given object id.
"""

def tpc_transaction():
"""The current transaction being committed.
Expand Down

0 comments on commit 51a6311

Please sign in to comment.