diff hgext/remotefilelog/shallowutil.py @ 48918:0fe003495f72

remotefilelog: remove pycompat.iteritems() Differential Revision: https://phab.mercurial-scm.org/D12323
author Gregory Szorc <gregory.szorc@gmail.com>
date Mon, 21 Feb 2022 11:07:29 -0700
parents f254fc73d956
children 176f1a0d15dc
line wrap: on
line diff
--- a/hgext/remotefilelog/shallowutil.py	Mon Feb 21 11:06:46 2022 -0700
+++ b/hgext/remotefilelog/shallowutil.py	Mon Feb 21 11:07:29 2022 -0700
@@ -159,7 +159,7 @@
     length limit is exceeded
     """
     metabuf = b''
-    for k, v in sorted(pycompat.iteritems((metadict or {}))):
+    for k, v in sorted((metadict or {}).items()):
         if len(k) != 1:
             raise error.ProgrammingError(b'packmeta: illegal key: %s' % k)
         if len(v) > 0xFFFE:
@@ -187,7 +187,7 @@
     and METAKEYFLAG will be dropped if its value is 0.
     """
     newmeta = {}
-    for k, v in pycompat.iteritems(metadict or {}):
+    for k, v in (metadict or {}).items():
         expectedtype = _metaitemtypes.get(k, (bytes,))
         if not isinstance(v, expectedtype):
             raise error.ProgrammingError(b'packmeta: wrong type of key %s' % k)