[Numpy-discussion] cPickle.loads and Numeric
p.j.a.cock at googlemail.com
Tue Feb 25 11:59:19 EST 2014
On Tue, Feb 25, 2014 at 4:41 PM, Alexander Belopolsky <ndarray at mac.com> wrote:
> On Tue, Feb 25, 2014 at 11:29 AM, Benjamin Root <ben.root at ou.edu> wrote:
>> I seem to recall reading somewhere that pickles are not intended to be
>> long-term archives as there is no guarantee that a pickle made in one
>> version of python would work in another version, much less between different
>> versions of the same (or similar) packages.
> That's not true about Python core and stdlib. Python developers strive to
> maintain backward compatibility and any instance of newer python failing to
> read older pickles would be considered a bug. This is even true across 2.x
> / 3.x line.
> You mileage with 3rd party packages, especially 10+ years old ones may vary.
As an example of a 10+ year old project, Biopython has accidentally
broken some pickled objects from older versions of Biopython.
Accidental breakages aside, I personally would not use pickle for long
term storage. Domain specific data formats or something simple like
tabular data, or JSON seems safer.
More information about the NumPy-Discussion