[issue12291] file written using marshal in 3.2 can be read by 2.7, but not 3.2 or 3.3

Vinay Sajip report at bugs.python.org
Mon Jun 20 01:04:53 CEST 2011


Vinay Sajip <vinay_sajip at yahoo.co.uk> added the comment:

> Benjamin Peterson <benjamin at python.org> added the  comment:
> 
> I think you're right about playing with the bare fd being too  fragile. I think 
>a simpler solution is to read say 1024 bytes at a time and  buffer it  
>internally.

Doesn't this suffer from a similar problem? Namely, external Python code 
expecting the stream pointer to always be just past the object just read. See my 
earlier comments pointing out that there's nowhere to store the buffer state 
between successive calls to marshal.load. And the synchronising can be a problem 
to achieve with non-seekable streams (including, but not limited to, sockets).

I'm not trying to be difficult. No, really! :-)

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue12291>
_______________________________________


More information about the Python-bugs-list mailing list