Lennart Regebro wrote:
On 10/5/07, Laurence Rowe <[EMAIL PROTECTED]> wrote:
I've tested my patch (datetime.datetime support) against Amos's branch
and it applies cleanly and all tests pass.
Cool! Are there tests to make sure old pickles still work, or do we
know that this is the case for sure?
My patch updates the existing test (substituting _millis for _micros):
# Compare dates that don't have the _micros attribute yet
dt = DateTime('1997/1/1')
dt1 = DateTime('1997/2/2')
If anyone thinks it is important I could an explicit upgrade path for
instances with a _millis attribute too (most current instances I would
assume). _upgrade_old should work fine for them too as they have a time
float _t attribute.
"""Upgrades a previously pickled DateTime object."""
micros = long(math.floor(self._t * 1000000.0))
self._micros = micros
Zope-Dev maillist - Zope-Dev@zope.org
** No cross posts or HTML encoding! **
(Related lists -