compat: Replace intern() with compat.intern()

This commit is contained in:
Stein Magnus Jodal 2015-10-29 22:18:59 +01:00
parent 0c059b85b1
commit ee555ff09d
2 changed files with 3 additions and 1 deletions

View File

@ -34,6 +34,7 @@ if PY2:
text_type = unicode
input = raw_input
intern = intern
def itervalues(dct, **kwargs):
return iter(dct.itervalues(**kwargs))
@ -49,6 +50,7 @@ else:
text_type = str
input = input
intern = sys.intern
def itervalues(dct, **kwargs):
return iter(dct.values(**kwargs))

View File

@ -95,7 +95,7 @@ class Identifier(String):
:param default: default value for field
"""
def validate(self, value):
return intern(str(super(Identifier, self).validate(value)))
return compat.intern(str(super(Identifier, self).validate(value)))
class URI(Identifier):