cStringIO doesn't handle unicode, StringIO does. With py2/py3
compatable code we can easily find ourselves getting passed
unicode so we don't alias cStringIO
Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Alexander Bokovoy <ab@samba.org>
integer_types = int,
string_types = str
text_type = str
+
+ # alias
+ import io
+ StringIO = io.StringIO
else:
# compat functions
from urllib import quote as urllib_quote
integer_types = (int, long)
string_types = basestring
text_type = unicode
+
+ # alias
+ import StringIO
+ StringIO = StringIO.StringIO