sortKey() must be a string

In a Pyramid project under Python 3.4 I was getting this error:

TypeError: unorderable types: int() < str()

The transaction package now demands that the value returned by sortKey() be a string.