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

Revert "py3: sortKey() must be a string as comparison between str and...

Revert "py3: sortKey() must be a string as comparison between str and None/int/tuple now raises TypeError."

This reverts commit 192c2000
parent 8f56e49c
Pipeline #21361 failed with stage
in 0 seconds
......@@ -76,4 +76,4 @@ class ActivityBuffer(TM):
def sortKey(self, *ignored):
"""Activities must be finished before databases commit transactions."""
return '-1'
return -1
......@@ -34,7 +34,7 @@ from Acquisition import aq_parent
# 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
# after the ZODB and Catalog data.
assert '\x00' < '-1' < '0' < '1' < '\xff', "Cannot guarantee commit of activities comes after the appropriate data"
assert None < 0 < '' < (), "Cannot guarantee commit of activities comes after the appropriate data"
manage_addActivityConnectionForm = HTMLFile('dtml/connectionAdd', globals())
......@@ -66,4 +66,4 @@ InitializeClass(ActivityConnection)
class ActivityDB(DB):
_sort_key = '\xff'
_sort_key = (0,)
......@@ -70,7 +70,7 @@ class TransactionalVariable(dict):
_unregistered = True
def sortKey(self):
return '\x00'
return None
commit = tpc_vote = tpc_begin = tpc_abort = lambda self, transaction: None
......@@ -127,7 +127,7 @@ class TransactionalResource(object):
return not (args in tv or tv.add(args))
def sortKey(self):
return '1'
return 1
abort = commit = tpc_vote = tpc_begin = tpc_finish = 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