1Index: python-boto/tests/unit/utils/test_utils.py
2===================================================================
3--- python-boto.orig/tests/unit/utils/test_utils.py
4+++ python-boto/tests/unit/utils/test_utils.py
5@@ -85,7 +85,7 @@ class TestPassword(unittest.TestCase):
6 def hmac_hashfunc(cls, msg):
7 if not isinstance(msg, bytes):
8 msg = msg.encode('utf-8')
9- return hmac.new(b'mysecretkey', msg)
10+ return hmac.new(b'mysecretkey', msg, digestmod='sha256')
11
12 class HMACPassword(Password):
13 hashfunc = hmac_hashfunc
14@@ -95,15 +95,15 @@ class TestPassword(unittest.TestCase):
15 password.set('foo')
16
17 self.assertEquals(str(password),
18- hmac.new(b'mysecretkey', b'foo').hexdigest())
19+ hmac.new(b'mysecretkey', b'foo', digestmod='sha256').hexdigest())
20
21 def test_constructor(self):
22- hmac_hashfunc = lambda msg: hmac.new(b'mysecretkey', msg)
23+ hmac_hashfunc = lambda msg: hmac.new(b'mysecretkey', msg, digestmod='sha256')
24
25 password = Password(hashfunc=hmac_hashfunc)
26 password.set('foo')
27 self.assertEquals(password.str,
28- hmac.new(b'mysecretkey', b'foo').hexdigest())
29+ hmac.new(b'mysecretkey', b'foo', digestmod='sha256').hexdigest())
30
31
32 class TestPythonizeName(unittest.TestCase):
33Index: python-boto/boto/ecs/item.py
34===================================================================
35--- python-boto.orig/boto/ecs/item.py
36+++ python-boto/boto/ecs/item.py
37@@ -22,6 +22,7 @@
38
39 import xml.sax
40 import cgi
41+from html import escape
42 from boto.compat import six, StringIO
43
44 class ResponseGroup(xml.sax.ContentHandler):
45@@ -67,7 +68,7 @@ class ResponseGroup(xml.sax.ContentHandl
46 return None
47
48 def endElement(self, name, value, connection):
49- self._xml.write("%s</%s>" % (cgi.escape(value).replace("&amp;", "&"), name))
50+ self._xml.write("%s</%s>" % (escape(value).replace("&amp;", "&"), name))
51 if len(self._nodepath) == 0:
52 return
53 obj = None