Strategies for backwards compatibility when using pickle?
Andrew Bennetts
andrew-pythonlist at puzzling.org
Mon May 3 21:38:13 EDT 2004
On Mon, May 03, 2004 at 05:41:34PM -0500, duncan wrote:
[...]
>
> Does anyone have any advice on how to balance the conflicting interests
> of the developers who want to keep evolving the object model and users
> who need stable project persistance?
>
> It has been suggested that there may be a way to override pickle to deal
> with an evolving object model but it would be nice to hear from others
> who have tried to handle this problem.
Twisted has a class in it for this, twisted.persisted.styles.Versioned, that
seems to work well. You could possibly reuse it, or take a similar
approach.
There's a brief description of it in the API docs:
http://twistedmatrix.com/documents/current/api/twisted.persisted.styles.Versioned.html
-Andrew.
More information about the Python-list
mailing list