Commit b5a975f4 authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki

fixup! zope4: sortKey should be str in transaction 1.4.1 or later.

parent ce133017
Pipeline #23872 failed with stage
in 0 seconds
...@@ -76,4 +76,4 @@ class ActivityBuffer(TM): ...@@ -76,4 +76,4 @@ class ActivityBuffer(TM):
def sortKey(self, *ignored): def sortKey(self, *ignored):
"""Activities must be finished before databases commit transactions.""" """Activities must be finished before databases commit transactions."""
return chr(1) return chr(0)
...@@ -34,7 +34,7 @@ from Acquisition import aq_parent ...@@ -34,7 +34,7 @@ from Acquisition import aq_parent
# If the sort order below doesn't work, we cannot guarantee the sort key # If the sort order below doesn't work, we cannot guarantee the sort key
# used below will actually result in the activity connection being committed # used below will actually result in the activity connection being committed
# after the ZODB and Catalog data. # after the ZODB and Catalog data.
assert None < 0 < '' < (), "Cannot guarantee commit of activities comes after the appropriate data" assert '' < chr(0) < chr(1) < 'xxx' < chr(255), "Cannot guarantee commit of activities comes after the appropriate data"
manage_addActivityConnectionForm = HTMLFile('dtml/connectionAdd', globals()) manage_addActivityConnectionForm = HTMLFile('dtml/connectionAdd', globals())
...@@ -66,4 +66,4 @@ InitializeClass(ActivityConnection) ...@@ -66,4 +66,4 @@ InitializeClass(ActivityConnection)
class ActivityDB(DB): class ActivityDB(DB):
_sort_key = chr(2) _sort_key = chr(255)
...@@ -70,7 +70,7 @@ class TransactionalVariable(dict): ...@@ -70,7 +70,7 @@ class TransactionalVariable(dict):
_unregistered = True _unregistered = True
def sortKey(self): def sortKey(self):
return chr(0) return ''
commit = tpc_vote = tpc_begin = tpc_abort = lambda self, transaction: None commit = tpc_vote = tpc_begin = tpc_abort = lambda self, transaction: None
......
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