Mercurial > p > roundup > code
diff roundup/rest.py @ 5808:bab86c874efb
Fix: PendingDeprecationWarning: HMAC() without an explicit digestmod
argument is deprecated. Set md5 explicitly.
| author | John Rouillard <rouilj@ieee.org> |
|---|---|
| date | Wed, 12 Jun 2019 19:52:29 -0400 |
| parents | 7ba0ee980fc7 |
| children | edd9e2c67785 |
line wrap: on
line diff
--- a/roundup/rest.py Wed Jun 12 19:38:33 2019 -0400 +++ b/roundup/rest.py Wed Jun 12 19:52:29 2019 -0400 @@ -29,6 +29,8 @@ # else not supported dicttoxml = None +from hashlib import md5 + from roundup import hyperdb from roundup import date from roundup import actions @@ -144,7 +146,7 @@ items = node.items(protected=True) # include every item etag = hmac.new(bs2b(key),bs2b(repr_format + - repr(sorted(items)))).hexdigest() + repr(sorted(items))), md5).hexdigest() logger.debug("object=%s%s; tag=%s; repr=%s", classname, id, etag, repr(node.items(protected=True))) # Quotes are part of ETag spec, normal headers don't have quotes
