Replaced cStringIO.StringIO by io.BytesIO.

Also replaced StringIO.StringIO by BytesIO in some other appropriate
places. StringIO is not available in Python 3.
This commit is contained in:
Claude Paroz 2012-05-05 19:47:03 +02:00
parent 1583d40224
commit d7dfab59ea
26 changed files with 94 additions and 167 deletions

View file

@ -10,10 +10,7 @@ from __future__ import absolute_import
import datetime
import decimal
try:
from cStringIO import StringIO
except ImportError:
from StringIO import StringIO
from io import BytesIO
try:
import yaml
@ -504,7 +501,7 @@ def streamTest(format, self):
obj.save_base(raw=True)
# Serialize the test database to a stream
stream = StringIO()
stream = BytesIO()
serializers.serialize(format, [obj], indent=2, stream=stream)
# Serialize normally for a comparison