[Zope3-dev] changing the pickle format

Jeremy Hylton jeremy@alum.mit.edu
Tue, 21 Jan 2003 13:51:04 -0500


There's a new branch, called new-pickle-branch, that has an
significant revision to the way persistent references are handled.
It's an important enabling change for persistent modules and classes,
but is incompatible with the current pickle format.

I'd like to merge the new-pickle-branch to the trunk on Friday, and I
want to give everyone a heads up in case the format change will cause
a lot of pain.  As with other changes, you'll need to toss your
Data.fs and start over.  If this causes a lot of pain, we can work on
a migration strategy.  If it's only a little pain, I'd rather wait.

The branch has a vaguely related change to the storage API so that
storages store the database version they were created with.  If you
open an old storage with a new database, it can use the stored
database version to decide whether it's possible to read the old data.

The database version is independent of the storage version.  File
storage has always had a four-byte magic number, like "FS21," that
gets bumped when the file format changes.  That magic number is still
there, but it gets change to account for the new space taken by the
database version.

Jeremy