Skip to content

Commit 9636a0d

Browse files
committed
Update cache hash
Python 3.3 implemented a randomized seed for the builtin hash https://docs.python.org/3/whatsnew/3.3.html#builtin-functions-and-types
1 parent ee14943 commit 9636a0d

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

suds/reader.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,14 @@
1717
"""
1818
Contains xml document reader classes.
1919
"""
20-
20+
import hashlib
21+
from logging import getLogger
2122

2223
from suds.sax.parser import Parser
2324
from suds.transport import Request
2425
from suds.cache import NoCache
2526
from suds.store import DocumentStore
2627
from suds.plugin import PluginContainer
27-
from logging import getLogger
28-
2928

3029
log = getLogger(__name__)
3130

@@ -50,7 +49,7 @@ def mangle(self, name, x):
5049
Mangle the name by hashing the I{name} and appending I{x}.
5150
@return: the mangled name.
5251
"""
53-
h = abs(hash(name))
52+
h = hashlib.md5(name.encode('utf8')).hexdigest()
5453
return '%s-%s' % (h, x)
5554

5655

0 commit comments

Comments
 (0)