On Fri, Sep 18, 2015 at 1:32 PM, Paul Ganssle <[email protected]> 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.

[1]:
https://hg.python.org/cpython/file/v3.5.0/Lib/test/datetimetester.py#l2818
[2]:
https://hg.python.org/cpython/file/v3.5.0/Lib/test/datetimetester.py#l3640
_______________________________________________
Datetime-SIG mailing list
[email protected]
https://mail.python.org/mailman/listinfo/datetime-sig
The PSF Code of Conduct applies to this mailing list: 
https://www.python.org/psf/codeofconduct/

Reply via email to