compat: Replace intern() with compat.intern()
This commit is contained in:
parent
0c059b85b1
commit
ee555ff09d
@ -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))
|
||||
|
||||
@ -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):
|
||||
|
||||
Loading…
Reference in New Issue
Block a user