Commit c4a17ab4 authored by Stefan Behnel's avatar Stefan Behnel

Py3 fixes

parent 44f8d937
...@@ -88,7 +88,7 @@ class UtilityCodeBase(object): ...@@ -88,7 +88,7 @@ class UtilityCodeBase(object):
utility[1] = code utility[1] = code
if tags: if tags:
all_tags = utility[2] all_tags = utility[2]
for name, values in tags.iteritems(): for name, values in tags.items():
if KEYWORDS_MUST_BE_BYTES: if KEYWORDS_MUST_BE_BYTES:
name = name.encode('ASCII') name = name.encode('ASCII')
all_tags.setdefault(name, set()).update(values) all_tags.setdefault(name, set()).update(values)
...@@ -181,7 +181,7 @@ class UtilityCodeBase(object): ...@@ -181,7 +181,7 @@ class UtilityCodeBase(object):
if tags: if tags:
orig_kwargs = kwargs.copy() orig_kwargs = kwargs.copy()
for name, values in tags.iteritems(): for name, values in tags.items():
if name in kwargs: if name in kwargs:
continue continue
# only pass lists when we have to: most argument expect one value or None # only pass lists when we have to: most argument expect one value or None
...@@ -302,7 +302,7 @@ class UtilityCode(UtilityCodeBase): ...@@ -302,7 +302,7 @@ class UtilityCode(UtilityCodeBase):
if pyrex_type is not None: if pyrex_type is not None:
data['type'] = pyrex_type.declaration_code('') data['type'] = pyrex_type.declaration_code('')
data['type_name'] = pyrex_type.specialization_name() data['type_name'] = pyrex_type.specialization_name()
key = tuple(sorted(data.iteritems())) key = tuple(sorted(data.items()))
try: try:
return self._cache[key] return self._cache[key]
except KeyError: except KeyError:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment