> After studying both pytz and dateutil offerings, I decided that it is > easier to add "fold-awareness" to the later. I created a fork [1] on > Github and added [2] 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[1] and Issue #112[2]), 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. [1] https://github.com/dateutil/dateutil/issues/57 [2] https://github.com/dateutil/dateutil/issues/112
_______________________________________________ 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/
