Fix StringIO import for Py3