From 1f24f6211a521035bc2205eb9a08e296b21586ae Mon Sep 17 00:00:00 2001
From: Gabriel Monnerat <gabriel@tiolive.com>
Date: Thu, 8 Jun 2017 22:51:55 +0200
Subject: [PATCH] Revert "Partial support for more recent versions of ZODB"

This reverts commit 4921db63d7a584e2f8e687ba907154e20982cb71.

Wrong branch
---
 product/ERP5Type/patches/DemoStorage.py     | 6 +++---
 product/ERP5Type/patches/XMLExportImport.py | 6 +-----
 2 files changed, 4 insertions(+), 8 deletions(-)

diff --git a/product/ERP5Type/patches/DemoStorage.py b/product/ERP5Type/patches/DemoStorage.py
index 87ce80303f..f521562220 100644
--- a/product/ERP5Type/patches/DemoStorage.py
+++ b/product/ERP5Type/patches/DemoStorage.py
@@ -16,6 +16,8 @@ from ZODB import DemoStorage as _DemoStorage
 from ZODB.ConflictResolution import ConflictResolvingStorage, ResolvedSerial
 from ZODB.POSException import ConflictError
 
+assert not issubclass(_DemoStorage.DemoStorage, ConflictResolvingStorage)
+
 class DemoStorage(_DemoStorage.DemoStorage, ConflictResolvingStorage):
     ##
     # Implement conflict resolution for DemoStorage
@@ -31,6 +33,4 @@ class DemoStorage(_DemoStorage.DemoStorage, ConflictResolvingStorage):
             self.changes.store(oid, old, rdata, '', transaction)
             return ResolvedSerial
 
-if not issubclass(_DemoStorage.DemoStorage, ConflictResolvingStorage):
-    # BBB: ZODB < 4.3
-    _DemoStorage.DemoStorage = DemoStorage
+_DemoStorage.DemoStorage = DemoStorage
diff --git a/product/ERP5Type/patches/XMLExportImport.py b/product/ERP5Type/patches/XMLExportImport.py
index e23922441a..c72b3ceaf7 100644
--- a/product/ERP5Type/patches/XMLExportImport.py
+++ b/product/ERP5Type/patches/XMLExportImport.py
@@ -59,11 +59,7 @@ class OrderedPickler(Pickler):
         dispatch[PyStringMap] = save_dict
 
 def reorderPickle(jar, p):
-    try:
-        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
+    from ZODB.ExportImport import Ghost, Unpickler, Pickler, StringIO, persistent_id
 
     oids = {}
     storage = jar._storage
-- 
2.30.9