Commit 9e7ca95f authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki

fixup! DateTimePatch: keep DateTime.__eq__ behavior from DateTime 2

parent 2535e831
...@@ -41,7 +41,8 @@ STATE_KEY = 'str' ...@@ -41,7 +41,8 @@ STATE_KEY = 'str'
# See zopefoundation/DateTime commit fff6d04 (Various cleanups, improve unpickling # See zopefoundation/DateTime commit fff6d04 (Various cleanups, improve unpickling
# speed and distinguish between equal representations and references to equal points # speed and distinguish between equal representations and references to equal points
# in time., 2011-05-06) # in time., 2011-05-06)
DateTimeKlass.__eq__ = DateTimeKlass.equalTo # Also in DateTime 4, DateTime(0).equalTo(None) is True and we need to avoid it.
DateTimeKlass.__eq__ = lambda self, t: t is not None and self.equalTo(t)
# ERP5 Patch for different pickle implementation, to optimize for disk usage. # ERP5 Patch for different pickle implementation, to optimize for disk usage.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment