mirror of
https://github.com/python/cpython.git
synced 2025-11-02 11:08:57 +00:00
A few minor updates to make it clear(er) that pickle should be used
instead of marshal for object serialization. Fred, please proofread!
This commit is contained in:
parent
9b481ff3d6
commit
69b2d75fc7
1 changed files with 8 additions and 2 deletions
|
|
@ -1,5 +1,5 @@
|
||||||
\section{\module{marshal} ---
|
\section{\module{marshal} ---
|
||||||
Alternate Python object serialization}
|
Internal Python object serialization}
|
||||||
|
|
||||||
\declaremodule{builtin}{marshal}
|
\declaremodule{builtin}{marshal}
|
||||||
\modulesynopsis{Convert Python objects to streams of bytes and back
|
\modulesynopsis{Convert Python objects to streams of bytes and back
|
||||||
|
|
@ -23,7 +23,13 @@ This is not a general ``persistence'' module. For general persistence
|
||||||
and transfer of Python objects through RPC calls, see the modules
|
and transfer of Python objects through RPC calls, see the modules
|
||||||
\refmodule{pickle} and \refmodule{shelve}. The \module{marshal} module exists
|
\refmodule{pickle} and \refmodule{shelve}. The \module{marshal} module exists
|
||||||
mainly to support reading and writing the ``pseudo-compiled'' code for
|
mainly to support reading and writing the ``pseudo-compiled'' code for
|
||||||
Python modules of \file{.pyc} files.
|
Python modules of \file{.pyc} files. Therefore, the Python
|
||||||
|
maintainers reserve the right to modify the marshal format in backward
|
||||||
|
incompatible ways should the need arise. If you're serializing and
|
||||||
|
de-serializing Python objects, use the \module{pickle} module. There
|
||||||
|
may also be unknown security problems with
|
||||||
|
\module{marshal}\footnote{As opposed to the known security issues in
|
||||||
|
the \module{pickle} module!}.
|
||||||
\refstmodindex{pickle}
|
\refstmodindex{pickle}
|
||||||
\refstmodindex{shelve}
|
\refstmodindex{shelve}
|
||||||
\obindex{code}
|
\obindex{code}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue