Commit c25f3d00 authored by Jérome Perrin's avatar Jérome Perrin

*: Support ZODB6

ZODB6 no longer have ZODB._compat.BytesIO , manage this compatibility
layer ourselves.
parent f9d36ba7
Pipeline #37391 failed with stage
in 0 seconds
......@@ -21,9 +21,9 @@
from zodbtools.zodbcommit import zodbcommit
from zodbtools.zodbdump import zodbdump, Transaction, ObjectData, ObjectDelete, ObjectCopy
from zodbtools.util import storageFromURL, sha1, ashex, fromhex
from zodbtools.util import storageFromURL, sha1, ashex, fromhex, BytesIO
from ZODB.utils import p64, u64, z64
from ZODB._compat import BytesIO, dumps, _protocol # XXX can't yet commit with arbitrary ext.bytes
from ZODB._compat import dumps, _protocol # XXX can't yet commit with arbitrary ext.bytes
from golang import func, defer, b
from golang.gcompat import qq
......
......@@ -22,11 +22,18 @@
import hashlib, struct, codecs, io
import zodburi
import six
from six.moves.urllib_parse import urlsplit, urlunsplit
from zlib import crc32, adler32
from ZODB.TimeStamp import TimeStamp
import dateparser
# BBB Re-export BytesIO for PY2 compatibility
if six.PY2:
from ZODB._compat import BytesIO
else:
from io import BytesIO
from golang import b
......
......@@ -40,11 +40,10 @@ can query current database head (last_tid) with `zodb info <stor> last_tid`.
from __future__ import print_function
from zodbtools import zodbdump
from zodbtools.util import ashex, fromhex, storageFromURL, asbinstream
from zodbtools.util import ashex, fromhex, storageFromURL, asbinstream, BytesIO
from ZODB.interfaces import IStorageRestoreable
from ZODB.utils import p64, u64, z64
from ZODB.POSException import POSKeyError
from ZODB._compat import BytesIO
from golang import func, defer, panic, b
import warnings
......
......@@ -64,8 +64,8 @@ TODO also protect txn record by hash.
from __future__ import print_function
from zodbtools.util import ashex, fromhex, sha1, txnobjv, parse_tidrange, TidRangeInvalid, \
storageFromURL, hashRegistry, asbinstream
from ZODB._compat import loads, _protocol, BytesIO
storageFromURL, hashRegistry, asbinstream, BytesIO
from ZODB._compat import loads, _protocol
from zodbpickle.slowpickle import Pickler as pyPickler
from ZODB.interfaces import IStorageTransactionInformation
from zope.interface import implementer
......
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