[issue6218] Make io.BytesIO and io.StringIO picklable.
report at bugs.python.org
Sat Jun 6 04:21:15 CEST 2009
New submission from Alexandre Vassalotti <alexandre at peadrop.com>:
Here is a patch to add pickling support to io.BytesIO and io.StringIO.
Although they are non-trivial, the additions were made with a fair
amount of care (and love!) and thus I believe they could be included in
Furthermore, the improved test-suite uncovered a number of bugs in the
implementation of io.StringIO. So the patch also fixes:
* fixes a memory-leak in stringio_dealloc;
* disallows bytes-like object from being used as the newline
argument of StringIO;
* and changes the exception raised by StringIO.__init__ to a
TypeError when initial_value is not a str.
components: IO, Library (Lib)
keywords: patch, patch
stage: patch review
title: Make io.BytesIO and io.StringIO picklable.
type: feature request
versions: Python 3.1, Python 3.2
Added file: http://bugs.python.org/file14202/pickle_support_for_memoryio.diff
Python tracker <report at bugs.python.org>
More information about the Python-bugs-list