Patchwork D12323: remotefilelog: remove pycompat.iteritems()

login
register
mail settings
Submitter phabricator
Date March 3, 2022, 9:23 p.m.
Message ID <differential-rev-PHID-DREV-uija6py27scqbx3537oe-req@mercurial-scm.org>
Download mbox | patch
Permalink /patch/50663/
State New
Headers show

Comments

phabricator - March 3, 2022, 9:23 p.m.
indygreg created this revision.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.

REPOSITORY
  rHG Mercurial

BRANCH
  default

REVISION DETAIL
  https://phab.mercurial-scm.org/D12323

AFFECTED FILES
  hgext/remotefilelog/shallowutil.py

CHANGE DETAILS




To: indygreg, #hg-reviewers
Cc: mercurial-patches, mercurial-devel

Patch

diff --git a/hgext/remotefilelog/shallowutil.py b/hgext/remotefilelog/shallowutil.py
--- a/hgext/remotefilelog/shallowutil.py
+++ b/hgext/remotefilelog/shallowutil.py
@@ -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)