diff -r f3a1089654e3 -r 9b230a8e6008 mercurial/util.py --- a/mercurial/util.py Sat Oct 08 08:35:43 2016 -0400 +++ b/mercurial/util.py Sat Oct 08 08:36:39 2016 -0400 @@ -60,7 +60,8 @@ 'socketserver', 'xmlrpclib', ): - globals()[attr] = getattr(pycompat, attr) + a = pycompat.sysstr(attr) + globals()[a] = getattr(pycompat, a) # This line is to make pyflakes happy: urlreq = pycompat.urlreq