Commit bfae36df authored by Julien Muchembled's avatar Julien Muchembled

Merge 4.x branch

parents ae956ad2 d377efd3
...@@ -10,13 +10,12 @@ See 4.4.2. ...@@ -10,13 +10,12 @@ See 4.4.2.
5.0.0a3 (2016-07-01) 5.0.0a3 (2016-07-01)
==================== ====================
Added IMultiCommitStorage to directly represent the changes in the 4.4.0 See 4.4.1.
release and to make complient storages introspectable.
5.0.0a2 (2016-07-01) 5.0.0a2 (2016-07-01)
==================== ====================
See the 4.4.x releases. See 4.4.0.
5.0.0a1 (2016-06-20) 5.0.0a1 (2016-06-20)
==================== ====================
...@@ -38,7 +37,7 @@ Concurrency Control (MVCC) implementation: ...@@ -38,7 +37,7 @@ Concurrency Control (MVCC) implementation:
================== ==================
Better support of the new commit protocol. This fixes issues with blobs and Better support of the new commit protocol. This fixes issues with blobs and
undo. See https://github.com/zopefoundation/ZODB/pull/77 undo. See pull requests #77, #80, #83
4.4.1 (2016-07-01) 4.4.1 (2016-07-01)
================== ==================
......
...@@ -28,7 +28,7 @@ from pickle import PicklingError ...@@ -28,7 +28,7 @@ from pickle import PicklingError
logger = logging.getLogger('ZODB.ConflictResolution') logger = logging.getLogger('ZODB.ConflictResolution')
ResolvedSerial = b'rs' # deprecated: store/tpc_finish should just use True ResolvedSerial = b'rs' # deprecated: see IMultiCommitStorage.tpc_vote
class BadClassName(Exception): class BadClassName(Exception):
pass pass
......
...@@ -589,7 +589,7 @@ class Connection(ExportImport, object): ...@@ -589,7 +589,7 @@ class Connection(ExportImport, object):
self._handle_serial(oid, s) self._handle_serial(oid, s)
def _handle_serial(self, oid, serial=True, change=True): def _handle_serial(self, oid, serial=ResolvedSerial, change=True):
# if we write an object, we don't want to check if it was read # if we write an object, we don't want to check if it was read
# while current. This is a convenient choke point to do this. # while current. This is a convenient choke point to do this.
...@@ -597,10 +597,7 @@ class Connection(ExportImport, object): ...@@ -597,10 +597,7 @@ class Connection(ExportImport, object):
if not serial: if not serial:
return return
if serial is True: assert isinstance(serial, bytes), serial
serial = ResolvedSerial
elif not isinstance(serial, bytes):
raise serial
obj = self._cache.get(oid, None) obj = self._cache.get(oid, None)
if obj is None: if obj is None:
return return
......
...@@ -49,8 +49,6 @@ from ZODB.ConflictResolution import ResolvedSerial ...@@ -49,8 +49,6 @@ from ZODB.ConflictResolution import ResolvedSerial
class DemoStorage(ZODB.DemoStorage.DemoStorage): class DemoStorage(ZODB.DemoStorage.DemoStorage):
delayed_store = False
def tpc_begin(self, *args): def tpc_begin(self, *args):
super(DemoStorage, self).tpc_begin(*args) super(DemoStorage, self).tpc_begin(*args)
self.__stored = [] self.__stored = []
...@@ -60,8 +58,6 @@ class DemoStorage(ZODB.DemoStorage.DemoStorage): ...@@ -60,8 +58,6 @@ class DemoStorage(ZODB.DemoStorage.DemoStorage):
if s != ResolvedSerial: if s != ResolvedSerial:
assert type(s) is bytes, s assert type(s) is bytes, s
return return
if not self.delayed_store:
return True
self.__stored.append(oid) self.__stored.append(oid)
tpc_vote = property(lambda self: self._tpc_vote, lambda *_: None) tpc_vote = property(lambda self: self._tpc_vote, lambda *_: None)
...@@ -69,7 +65,7 @@ class DemoStorage(ZODB.DemoStorage.DemoStorage): ...@@ -69,7 +65,7 @@ class DemoStorage(ZODB.DemoStorage.DemoStorage):
def _tpc_vote(self, transaction): def _tpc_vote(self, transaction):
s = self.changes.tpc_vote(transaction) s = self.changes.tpc_vote(transaction)
assert s is None, s assert s is None, s
return self.__stored if self.delayed_store else s return self.__stored
def tpc_finish(self, transaction, func = lambda tid: None): def tpc_finish(self, transaction, func = lambda tid: None):
r = [] r = []
...@@ -146,11 +142,6 @@ class DemoStorageTests( ...@@ -146,11 +142,6 @@ class DemoStorageTests(
self._checkHistory(base_and_changes()) self._checkHistory(base_and_changes())
self._storage = self._storage.pop() self._storage = self._storage.pop()
def checkResolveLate(self):
self._storage.delayed_store = True
self.checkResolve()
class DemoStorageHexTests(DemoStorageTests): class DemoStorageHexTests(DemoStorageTests):
def setUp(self): def setUp(self):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment