[issue1724366] cPickle module doesn't work with universal line endings
Ronald Oussoren
report at bugs.python.org
Thu Jul 15 09:50:23 CEST 2010
Ronald Oussoren <ronaldoussoren at mac.com> added the comment:
Antoine, to answer your question about universal newlines in pickle in msg87622. The pickle.py docsstrings in 2.7+ contain the following text (amongst others):
The optional protocol argument tells the pickler to use the
given protocol; supported protocols are 0, 1, 2. The default
protocol is 0, to be backwards compatible. (Protocol 0 is the
only protocol that can be written to a file opened in text
mode and read back successfully. When using a protocol higher
than 0, make sure the file is opened in binary mode, both when
pickling and unpickling.)
This clearly indicates that protocol 0 is supposed to compatible with text-mode files. That would mean this issue probably is not invalid, the documentation above implies that a pickle file written in text mode on Windows should be readable on a Unix system.
That said, I'd advise anyone to use the highest possible protocol because higher protocol levels are more efficient and better support newstyle classes.
----------
status: pending -> open
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue1724366>
_______________________________________
More information about the Python-bugs-list
mailing list