[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
Fri Jun 10 11:59:37 CEST 2011


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

Attached is an improved patch:

1. It's against the 3.2 branch, rather than default.
2. It has an added multiple load test in test_marshal.py.
3. There's more error checking for an EOF condition.
4. I've removed tab chars and used /* C89 comments */.

Of course it's not as fast as the 2.x version, since that had a limitation on only being able to load from file objects, and a fast path for PyFile using stdio calls directly. Hard to compete with that!

Suggestions for improvements gratefully received :-)

----------
keywords: +needs review
Added file: http://bugs.python.org/file22314/marshal-patch2.diff

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


More information about the Python-bugs-list mailing list