I believe this is because the translate() string method changed in Python 2.6 (http://bugs.python.org/issue1071) so that it now throws an error when trying to translate a unicode string with a str translation table.
But on Python 2.6 this throws a "TypeError: character mapping must return integer, None or unicode".
A possible fix is to str() the session key before calling hmac.new() in zope.session. This works, but I'm not sure if this solution introduces any other bugs or if there is a better place to workaround this bug.
I believe this is because the translate() string method changed in Python 2.6 (http:// bugs.python. org/issue1071) so that it now throws an error when trying to translate a unicode string with a str translation table.
On Python 2.4 and 2.5 you can do:
>>> import hmac u'nmeVoOHGCGpx4 XMhmTbl3jGG4vg' ,'0.93817239745 203817591' ,sha)
>>> import sha
>>> hmac.new(
<hmac.HMAC instance at 0x6bf08>
But on Python 2.6 this throws a "TypeError: character mapping must return integer, None or unicode".
A possible fix is to str() the session key before calling hmac.new() in zope.session. This works, but I'm not sure if this solution introduces any other bugs or if there is a better place to workaround this bug.