Commit 1f24f621 authored by Gabriel Monnerat's avatar Gabriel Monnerat

Revert "Partial support for more recent versions of ZODB"

This reverts commit 4921db63.

Wrong branch
parent 4921db63
...@@ -16,6 +16,8 @@ from ZODB import DemoStorage as _DemoStorage ...@@ -16,6 +16,8 @@ from ZODB import DemoStorage as _DemoStorage
from ZODB.ConflictResolution import ConflictResolvingStorage, ResolvedSerial from ZODB.ConflictResolution import ConflictResolvingStorage, ResolvedSerial
from ZODB.POSException import ConflictError from ZODB.POSException import ConflictError
assert not issubclass(_DemoStorage.DemoStorage, ConflictResolvingStorage)
class DemoStorage(_DemoStorage.DemoStorage, ConflictResolvingStorage): class DemoStorage(_DemoStorage.DemoStorage, ConflictResolvingStorage):
## ##
# Implement conflict resolution for DemoStorage # Implement conflict resolution for DemoStorage
...@@ -31,6 +33,4 @@ class DemoStorage(_DemoStorage.DemoStorage, ConflictResolvingStorage): ...@@ -31,6 +33,4 @@ class DemoStorage(_DemoStorage.DemoStorage, ConflictResolvingStorage):
self.changes.store(oid, old, rdata, '', transaction) self.changes.store(oid, old, rdata, '', transaction)
return ResolvedSerial return ResolvedSerial
if not issubclass(_DemoStorage.DemoStorage, ConflictResolvingStorage): _DemoStorage.DemoStorage = DemoStorage
# BBB: ZODB < 4.3
_DemoStorage.DemoStorage = DemoStorage
...@@ -59,11 +59,7 @@ class OrderedPickler(Pickler): ...@@ -59,11 +59,7 @@ class OrderedPickler(Pickler):
dispatch[PyStringMap] = save_dict dispatch[PyStringMap] = save_dict
def reorderPickle(jar, p): def reorderPickle(jar, p):
try: from ZODB.ExportImport import Ghost, Unpickler, Pickler, StringIO, persistent_id
from ZODB._compat import Unpickler, Pickler
except ImportError: # BBB: ZODB 3.10
from ZODB.ExportImport import Unpickler, Pickler
from ZODB.ExportImport import Ghost, persistent_id
oids = {} oids = {}
storage = jar._storage storage = jar._storage
......
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