[Datetime-SIG] Adding PEP 495 support to dateutil
paul at ganssle.io
Fri Sep 18 16:23:30 CEST 2015
> After studying both pytz and dateutil offerings, I decided that it is
> easier to add "fold-awareness" to the later. I created a fork  on
> Github and added  fold-awareness logic to the tzrange class that
> appears to be the base class for most other tzinfo implementations. I
> was surprised how few test cases had to be changed. It looks like
> dateutil test suit does not test questionable (in the absence of fold)
> behavior. I will need to beef up the test coverage.
Just to clarify on the point of test coverage, I think one of the main
reasons for this is that, at the moment, dateutil doesn't handle
ambiguous times well (see Issue #57 and Issue #112), so any such
tests would likely be failing tests.
At the moment, I can't comment on how easy this will be to implement in
a release version of dateutil if PEP 495 is accepted because I haven't
looked into it enough, but one thing to be aware of is that
backwards-compatibility is a high priority here (we'll continue to
support python 2.6+ for the foreseeable future), so any changes need to
fall back to sane behavior. Preferably, they would fall back to the
exact /same/ behavior, regardless of platform and python version.
Of course, it doesn't seem like your goal right now is to build
something that can roll out right away as soon as PEP 495 is integrated,
so there's plenty of time to clean it up and possibly build in a
compatibility module, I just thought I'd bring that up so you're aware.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Datetime-SIG