[Zope3-dev] RE: [Zope3-checkins] CVS: Zope3/src/datetime - __init__.py:NONE_datetime.py:NONE doc.txt:NONE

Tim Peters tim at zope.com
Thu Nov 6 11:24:21 EST 2003


[Anthony Baxter]
>> Removed Files:
>> 	__init__.py _datetime.py doc.txt
>> Log Message:
>> no longer needed since we require 2.3 now

[Fred L. Drake, Jr.]
> I thought about this, but decided to be wary; is this safe with
> existing pickles?  Do we care about existing pickles?  (I suspect we
> do.)

Aaargh.  Guido and I took several turns rewriting the pickle support for
datetime.* objects, so that pickles were identical between the Python and C
implementations.

It turns out that the problem here is that Zope3 hid the Python datetime
implementation under an "unnatural" name:  for example, a pickle of a
datetime.datetime produced under Python 2.2 in Zope3 identifies the module
as "datetime._datetime", and that's the only thing preventing such a pickle
from getting loaded under Python 2.3 and the current Zope3 codebase.  If you
remove all occurrences of the string "._datetime" from such a pickle, it
should load fine (well, to be precise, what's required is to change all
occurrences of "datetime._datetime" in pickle GLOBAL opcodes to plain
"datetime").




More information about the Zope3-dev mailing list