PY3: used six.moves.cStringIO to fix StringIO import