New submission from Lukasz Mielicki:
marshal.dump yields error when temporary file is given as a second argument.
import tempfile
import marshal
tmpfile = tempfile.TemporaryFile(mode='w+b')
# TypeError: marshal.dump() 2nd arg must be file
marshal.dump({}, tmpfile)
--
components
Lukasz Mielicki added the comment:
I'm seeing this on Windows with Python 2.7.6 (amd64). I can write to the
same file with other methods.
On 17 November 2013 18:36, Gregory Salvan rep...@bugs.python.org wrote:
Gregory Salvan added the comment:
I can't reproduce this issue (on linux
Lukasz Mielicki added the comment:
Thank you for detailed explanation. Too bad tempfile is inherently
non-portable, but I'm fine with marshal.dumps as a w/a in this case.
I marshal to a temporary file to serialize input for Perforce command line
client which is capable of accepting marshaled