Commit 9eb05e32 authored by Julien Muchembled's avatar Julien Muchembled

fixup! Fix some monkey-patches to make them compatible with ZODB5

parent 95a75303
Pipeline #12652 passed with stage
...@@ -14,6 +14,8 @@ ...@@ -14,6 +14,8 @@
# Make sure the xml export will be ordered # Make sure the xml export will be ordered
from functools import partial
from inspect import getargspec
from ZODB.utils import u64, p64 from ZODB.utils import u64, p64
from Shared.DC.xml import ppml from Shared.DC.xml import ppml
from base64 import encodestring from base64 import encodestring
...@@ -102,6 +104,8 @@ def exportXML(jar, oid, file=None): ...@@ -102,6 +104,8 @@ def exportXML(jar, oid, file=None):
# can have values that have a shorter representation in 'repr' instead of # can have values that have a shorter representation in 'repr' instead of
# 'base64' (see ppml.convert) and ppml.String does not support this. # 'base64' (see ppml.convert) and ppml.String does not support this.
load = jar._storage.load load = jar._storage.load
if 'version' in getargspec(load).args: # BBB: ZODB<5 (TmpStore)
load = partial(load, version='')
pickle_dict = {oid: None} pickle_dict = {oid: None}
max_cache = [1e7] # do not cache more than 10MB of pickle data max_cache = [1e7] # do not cache more than 10MB of pickle data
def getReorderedPickle(oid): def getReorderedPickle(oid):
......
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