Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
138
Merge Requests
138
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Jobs
Commits
Open sidebar
nexedi
erp5
Commits
0b562a83
Commit
0b562a83
authored
Jun 06, 2016
by
Julien Muchembled
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Partial support for more recent versions of ZODB
parent
6920866f
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
4 deletions
+8
-4
product/ERP5Type/patches/DemoStorage.py
product/ERP5Type/patches/DemoStorage.py
+3
-3
product/ERP5Type/patches/XMLExportImport.py
product/ERP5Type/patches/XMLExportImport.py
+5
-1
No files found.
product/ERP5Type/patches/DemoStorage.py
View file @
0b562a83
...
@@ -16,8 +16,6 @@ from ZODB import DemoStorage as _DemoStorage
...
@@ -16,8 +16,6 @@ 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
...
@@ -33,4 +31,6 @@ class DemoStorage(_DemoStorage.DemoStorage, ConflictResolvingStorage):
...
@@ -33,4 +31,6 @@ class DemoStorage(_DemoStorage.DemoStorage, ConflictResolvingStorage):
self
.
changes
.
store
(
oid
,
old
,
rdata
,
''
,
transaction
)
self
.
changes
.
store
(
oid
,
old
,
rdata
,
''
,
transaction
)
return
ResolvedSerial
return
ResolvedSerial
_DemoStorage
.
DemoStorage
=
DemoStorage
if
not
issubclass
(
_DemoStorage
.
DemoStorage
,
ConflictResolvingStorage
):
# BBB: ZODB < 4.3
_DemoStorage
.
DemoStorage
=
DemoStorage
product/ERP5Type/patches/XMLExportImport.py
View file @
0b562a83
...
@@ -59,7 +59,11 @@ class OrderedPickler(Pickler):
...
@@ -59,7 +59,11 @@ class OrderedPickler(Pickler):
dispatch
[
PyStringMap
]
=
save_dict
dispatch
[
PyStringMap
]
=
save_dict
def
reorderPickle
(
jar
,
p
):
def
reorderPickle
(
jar
,
p
):
from
ZODB.ExportImport
import
Ghost
,
Unpickler
,
Pickler
,
StringIO
,
persistent_id
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
oids
=
{}
oids
=
{}
storage
=
jar
.
_storage
storage
=
jar
.
_storage
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment