You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Python 3's change of string behaviour has affected the HMACAuth class. Two changes are required in auth.py:
Return a string from get_signature() instead of bytes. Without this, the call to format() results in a string like SRS:key:b'sig' instead of SRS:key:sig, and eventually you get a 401 Unauthorized:
Python 3's change of string behaviour has affected the HMACAuth class. Two changes are required in auth.py:
get_signature()
instead of bytes. Without this, the call toformat()
results in a string likeSRS:key:b'sig'
instead ofSRS:key:sig
, and eventually you get a 401 Unauthorized:get_canonical_string()
. Without this,hmac.new()
complains that unicode objects need to be encoded before hashing:I have tested that these changes fix my auth problems in Python 3.6, and do not affect the behaviour in Python 2.7.
The text was updated successfully, but these errors were encountered: