[Python-3000] Removal of cStringIO and StringIO module

Christian Heimes lists at cheimes.de
Wed Aug 8 21:44:59 CEST 2007


I've spent some free time today to work on a patch that removes
cStringIO and StringIO from the py3k-struni branch. The patch is
available at http://www.python.org/sf/1770008

It adds a deprecation warning to StringIO.py and a facade cStringIO.py.
Both modules act as an alias for io.StringIO. You may remove the files.
I didn't noticed that 2to3 has a fixer for cStringIO and StringIO. But
the files may be useful because the fixer doesn't fix doc tests.

Some unit tests are failing because I don't know how to handle
StringIO(buffer()). Georg Brandl suggested to use io.BytesIO but that
doesn't work correctly.

Christian



More information about the Python-3000 mailing list