[ZODB-Dev] cPickle: state is not a directory/Upgrade to
Zope2.7failing
Tim Peters
tim at zope.com
Tue Nov 4 13:37:33 EST 2003
[Jim Fulton]
>> It looks as though this pickle was written from a DateTime class with
>> custom __getstate__ and __setstate__. This would be useful to save
>> space. I can find no evidence of this in CVS though. Is it possible
>> that sombody had installed such an optimization in Adreas' Zope 2.6
>> installation? If so, somebody needs to migrate that forward to the
>> 2.7 installation.
[Andreas Jung]
> *sigh* Jim, you're right. I verified with our CVS. Dieter added
> __getstate__ and __setstate__ to provide a more efficient pickle
> format. I was not aware of this extension and since he is on vacation
> he could not give me a hint.
>
> Sorry for bringing this up and thanks,
That's OK. I hope you port Dieter's changes to your 2.7 copy and keep
pursuing this: we're keenly interested to know whether the migration works
for you! If you give the 2.7 DateTime the same custom __setstate__ as you
had in 2.6, the pickle *should* load OK (all the pickle changes in 2.3 were
intended to be backward compatible, excepting cases where 2.3 was changed to
complain about an illegal pickle that 2.2 didn't catch -- like loading this
custom DateTime pickle in a Zope without the fiddled DateClass didn't
complain under 2.2.3, despite that it dropped the state on the floor
unused).
More information about the ZODB-Dev
mailing list