This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author qwjqwj
Recipients qwjqwj
Date 2009-02-22.07:09:34
SpamBayes Score 1.0456512e-07
Marked as misclassified No
Message-id <1235286577.45.0.856937584355.issue5345@psf.upfronthosting.co.za>
In-reply-to
Content
It has a typo error in cStringIO.StringIO's class name "StringO":

>>> import cStringIO
>>> a=cStringIO.StringIO()
>>> a
<cStringIO.StringO object at 0xb7eef240>
>>> a.__class__.__name__
'StringO'

So we can't unpickle the object correctly with Python 2.5.4:

>>> import pickle
>>> pickle.loads(pickle.dumps(a))
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/lib/python2.5/pickle.py", line 1366, in dumps
    Pickler(file, protocol).dump(obj)
  File "/usr/local/lib/python2.5/pickle.py", line 224, in dump
    self.save(obj)
  File "/usr/local/lib/python2.5/pickle.py", line 306, in save
    rv = reduce(self.proto)
  File "/usr/local/lib/python2.5/copy_reg.py", line 69, in _reduce_ex
    raise TypeError, "can't pickle %s objects" % base.__name__
TypeError: can't pickle StringO objects


When using multiprocess library, it also use the pickling and unpickling
of cStringIO.StringIO object
History
Date User Action Args
2009-02-22 07:09:37qwjqwjsetrecipients: + qwjqwj
2009-02-22 07:09:37qwjqwjsetmessageid: <1235286577.45.0.856937584355.issue5345@psf.upfronthosting.co.za>
2009-02-22 07:09:35qwjqwjlinkissue5345 messages
2009-02-22 07:09:34qwjqwjcreate