[Datetime-SIG] Adding PEP 495 support to dateutil

Alexander Belopolsky alexander.belopolsky at gmail.com
Fri Sep 18 20:06:45 CEST 2015

On Fri, Sep 18, 2015 at 1:32 PM, Paul Ganssle <paul at ganssle.io> wrote:

> Everything below datetime uses native python modules, so making explicit
> guarantees about the results of what is essentially undefined behavior
> above and beyond the guarantees the interpreter / standard is already
> making seems unnecessary to me.

If you looks at the standard library tests, you will see that we guarantee
consistency in all but most extreme edge cases.  (E.g., conversion between
timezones with overlapping but not equal folds is one of such cases. [2])

I've found that dateutil test coverage is very good for the
utcoffset()/tzname()/dst() triad, but it is less thorough for anything that
involves fromutc().  (I believe I had to adjust only one test case when I
added fold-awareness to fromutc().)  This is understandable because you
rely on stdlib version of fromutc(), but this is a problem in itself.  We
know that default fromutc() is only adequate for tzrange and very simple
tzfile cases.  I suspect dateutil has problems that are not limited to
ambiguous datetimes in some IANA time zones.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/datetime-sig/attachments/20150918/37febc37/attachment.html>

More information about the Datetime-SIG mailing list