New submission from Alexandre Vassalotti <alexan...@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 3.1.
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) files: pickle_support_for_memoryio.diff keywords: patch, patch messages: 88987 nosy: alexandre.vassalotti priority: normal severity: normal stage: patch review status: open 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 <rep...@bugs.python.org> <http://bugs.python.org/issue6218> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com