diff --git a/oslo_serialization/jsonutils.py b/oslo_serialization/jsonutils.py index e96c28a..7df6496 100644 --- a/oslo_serialization/jsonutils.py +++ b/oslo_serialization/jsonutils.py @@ -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 diff --git a/oslo_serialization/msgpackutils.py b/oslo_serialization/msgpackutils.py index af76c4c..4206ab4 100644 --- a/oslo_serialization/msgpackutils.py +++ b/oslo_serialization/msgpackutils.py @@ -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'):