Commit a97ce37f authored by Tres Seaver's avatar Tres Seaver

Document that values returned by 'sortKey' must be strings.

This requirement is needed to ensure a total ordering, e.g. in Py3k where
strings and ints are not comparable.
parent f0055c15
......@@ -4,7 +4,8 @@ Changes
1.4.1 (unreleased)
------------------
- TBD
- Document that values returned by ``sortKey`` must be strings, in order
to guarantee total ordering.
1.4.0 (2013-01-03)
------------------
......
......@@ -396,6 +396,8 @@ class IDataManager(zope.interface.Interface):
def sortKey():
"""Return a key to use for ordering registered DataManagers.
In order to guarantee a total ordering, keys must be strings.
ZODB uses a global sort order to prevent deadlock when it commits
transactions involving multiple resource managers. The resource
manager must define a sortKey() method that provides a global ordering
......
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