Patchwork [2,of,3,v2] hghave: switch from iteritems to items

login
register
mail settings
Submitter timeless
Date May 8, 2016, 8:28 p.m.
Message ID <f8240a5eda50df776589.1462739328@gcc2-power8.osuosl.org>
Download mbox | patch
Permalink /patch/14970/
State Superseded, archived
Headers show

Comments

timeless - May 8, 2016, 8:28 p.m.
# HG changeset patch
# User timeless <timeless@mozdev.org>
# Date 1462439546 0
#      Thu May 05 09:12:26 2016 +0000
# Node ID f8240a5eda50df7765894a0ee80488612d65f331
# Parent  18ef4f2e901adfba72054641bf5bfa21aa64a17e
# Available At bb://timeless/mercurial-crew
#              hg pull bb://timeless/mercurial-crew -r f8240a5eda50
hghave: switch from iteritems to items

With this, test-hghave.t passes on python 3.

Four features fail because mercurial still is not py3 safe:
absimport
cacheable
hardlink
defaultcacerts

But that will be resolved automatically eventually.

Patch

diff -r 18ef4f2e901a -r f8240a5eda50 tests/hghave
--- a/tests/hghave	Thu May 05 09:07:01 2016 +0000
+++ b/tests/hghave	Thu May 05 09:12:26 2016 +0000
@@ -13,13 +13,13 @@ 
 checks = hghave.checks
 
 def list_features():
-    for name, feature in sorted(checks.iteritems()):
+    for name, feature in sorted(checks.items()):
         desc = feature[1]
         print(name + ':', desc)
 
 def test_features():
     failed = 0
-    for name, feature in checks.iteritems():
+    for name, feature in checks.items():
         check, _ = feature
         try:
             check()