changeset 34023:ba479850c9c7

python3: replace sorted(<dict>.iterkeys()) with sorted(<dict>)
author Augie Fackler <raf@durin42.com>
date Tue, 22 Aug 2017 20:06:58 -0400
parents d5b2beca16c0
children 19b8eee8b4ec
files contrib/synthrepo.py mercurial/filelog.py tests/test-hgweb-auth.py
diffstat 3 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/contrib/synthrepo.py	Tue Aug 22 20:03:07 2017 -0400
+++ b/contrib/synthrepo.py	Tue Aug 22 20:06:58 2017 -0400
@@ -479,7 +479,7 @@
         date = min(0x7fffffff, max(0, date))
         user = random.choice(words) + '@' + random.choice(words)
         mc = context.memctx(repo, pl, makeline(minimum=2),
-                            sorted(changes.iterkeys()),
+                            sorted(changes),
                             filectxfn, user, '%d %d' % (date, pick(tzoffset)))
         newnode = mc.commit()
         heads.add(repo.changelog.rev(newnode))
--- a/mercurial/filelog.py	Tue Aug 22 20:03:07 2017 -0400
+++ b/mercurial/filelog.py	Tue Aug 22 20:06:58 2017 -0400
@@ -31,7 +31,7 @@
     return meta, (s + 2)
 
 def packmeta(meta, text):
-    keys = sorted(meta.iterkeys())
+    keys = sorted(meta)
     metatext = "".join("%s: %s\n" % (k, meta[k]) for k in keys)
     return "\1\n%s\1\n%s" % (metatext, text)
 
--- a/tests/test-hgweb-auth.py	Tue Aug 22 20:03:07 2017 -0400
+++ b/tests/test-hgweb-auth.py	Tue Aug 22 20:06:58 2017 -0400
@@ -25,7 +25,7 @@
 
 def dumpdict(dict):
     return '{' + ', '.join(['%s: %s' % (k, dict[k])
-                            for k in sorted(dict.iterkeys())]) + '}'
+                            for k in sorted(dict)]) + '}'
 
 def test(auth, urls=None):
     print('CFG:', dumpdict(auth))