[Datetime-SIG] PEP-495 - Strict Invalid Time Checking

Alexander Belopolsky alexander.belopolsky at gmail.com
Tue Aug 25 23:22:45 CEST 2015


On Tue, Aug 25, 2015 at 5:04 PM, Carl Meyer <carl at oddbird.net> wrote:

> I can't imagine how raising an exception on invalid times only if a
> non-default sentinel value is given for a flag that is _new in PEP 495_
> could possibly break 4000 lines of existing datetime tests.
>

OK, so datetime module itself will never set fold=-1.   In the list below,
can you mark the methods that need to be patched to check the fold
attribute in your preferred design:

datetime.__add__
datetime.__eq__
datetime.__format__
datetime.__ge__
datetime.__gt__
datetime.__hash__
datetime.__le__
datetime.__lt__
datetime.__ne__
datetime.__new__
datetime.__radd__
datetime.__reduce__
datetime.__reduce_ex__
datetime.__repr__
datetime.__rsub__
datetime.__str__
datetime.astimezone
datetime.combine
datetime.ctime
datetime.date
datetime.dst
datetime.fromordinal
datetime.fromtimestamp
datetime.isocalendar
datetime.isoformat
datetime.isoweekday
datetime.now
datetime.replace
datetime.strftime
datetime.strptime
datetime.time
datetime.timestamp
datetime.timetuple
datetime.timetz
datetime.today
datetime.toordinal
datetime.tzname
datetime.utcfromtimestamp
datetime.utcnow
datetime.utcoffset
datetime.utctimetuple
datetime.weekday

Please ask Isaac and Stuart to do the same.  Once you agree on a list,
let's continue this discussion.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/datetime-sig/attachments/20150825/23339548/attachment.html>


More information about the Datetime-SIG mailing list