diff -r 649d3ac37a12 -r d783f945a701 mercurial/statprof.py --- a/mercurial/statprof.py Sun Oct 06 19:25:18 2019 -0400 +++ b/mercurial/statprof.py Mon Oct 07 00:04:04 2019 -0400 @@ -574,7 +574,7 @@ # compute sums for each function functiondata = [] - for fname, sitestats in grouped.iteritems(): + for fname, sitestats in pycompat.iteritems(grouped): total_cum_sec = 0 total_self_sec = 0 total_percent = 0 @@ -653,7 +653,7 @@ else: children[site] = 1 - parents = [(parent, count) for parent, count in parents.iteritems()] + parents = [(parent, count) for parent, count in pycompat.iteritems(parents)] parents.sort(reverse=True, key=lambda x: x[1]) for parent, count in parents: fp.write( @@ -697,7 +697,7 @@ ) ) - children = [(child, count) for child, count in children.iteritems()] + children = [(child, count) for child, count in pycompat.iteritems(children)] children.sort(reverse=True, key=lambda x: x[1]) for child, count in children: fp.write( @@ -821,7 +821,7 @@ fd, path = pycompat.mkstemp() with open(path, b"w+") as file: - for line, count in lines.iteritems(): + for line, count in pycompat.iteritems(lines): file.write(b"%s %d\n" % (line, count)) if outputfile is None: