Merge "Replace six.iteritems() with .items()"
This commit is contained in:
commit
004bc47522
@ -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
|
||||
|
@ -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'):
|
||||
|
Loading…
Reference in New Issue
Block a user