Merge "Replace six.iteritems() with .items()"

This commit is contained in:
Jenkins 2017-01-02 21:28:38 +00:00 committed by Gerrit Code Review
commit 004bc47522
2 changed files with 2 additions and 2 deletions

View File

@ -150,7 +150,7 @@ def to_primitive(value, convert_instances=False, convert_datetime=True,
encoding=encoding)
if isinstance(value, dict):
return {recursive(k): recursive(v)
for k, v in six.iteritems(value)}
for k, v in value.items()}
elif hasattr(value, 'iteritems'):
return recursive(dict(value.iteritems()), level=level + 1)
# Python 3 does not have iteritems

View File

@ -172,7 +172,7 @@ class HandlerRegistry(object):
def copy(self, unfreeze=False):
"""Deep copy the given registry (and its handlers)."""
c = type(self)()
for ident, handlers in six.iteritems(self._handlers):
for ident, handlers in self._handlers.items():
cloned_handlers = []
for h in handlers:
if hasattr(h, 'copy'):