dateutil v2.6.0 Release Notes

Release Date: 2016-11-08 // over 7 years ago
    • โž• Added PEP-495-compatible methods to address ambiguous and imaginary dates in
      time zones in a backwards-compatible way. Ambiguous dates and times can now
      be safely represented by all dateutil time zones. Many thanks to Alexander
      Belopolski (@abalkin) and Tim Peters @tim-one for their inputs on how to
      โž• address this. Original issues reported by Yupeng and @zed (lP: 1390262,
      gh issues #57, #112, #249, #284, #286, prs #127, #225, #248, #264, #302).
    • โž• Added new methods for working with ambiguous and imaginary dates to the tz
      module. datetime_ambiguous() determines if a datetime is ambiguous for a given
      zone and datetime_exists() determines if a datetime exists in a given zone.
      This works for all fold-aware datetimes, not just those provided by dateutil.
      (gh issue #253, gh pr #302)
    • ๐Ÿ›  Fixed an issue where dst() in Portugal in 1996 was returning the wrong value
      in tz.tzfile objects. Reported by @abalkin (gh issue #128, pr #225)
    • ๐Ÿ›  Fixed an issue where zoneinfo.ZoneInfoFile errors were not being properly
      deep-copied. (gh issue #226, pr #225)
    • ๐Ÿ”จ Refactored tzwin and tzrange as a subclass of a common class, tzrangebase, as
      there was substantial overlapping functionality. As part of this change,
      tzrange and tzstr now expose a transitions() function, which returns the
      DST on and off transitions for a given year. (gh issue #260, pr #302)
    • ๐Ÿ—„ Deprecated zoneinfo.gettz() due to confusion with tz.gettz(), in favor of
      get() method of zoneinfo.ZoneInfoFile objects. (gh issue #11, pr #310)
    • ๐Ÿ“œ For non-character, non-stream arguments, parser.parse now raises TypeError
      instead of AttributeError. (gh issues #171, #269, pr #247)
    • ๐Ÿ›  Fixed an issue where tzfile objects were not properly handling dst() and
      tzname() when attached to datetime.time objects. Reported by @ovacephaloid.
      (gh issue #292, pr #309)
    • /usr/share/lib/zoneinfo was added to TZPATHS for compatibility with Solaris
      systems. Reported by @dhduvall (gh issue #276, pr #307)
    • tzoffset and tzrange objects now accept either a number of seconds or a
      datetime.timedelta() object wherever previously only a number of seconds was
      ๐Ÿ‘ allowed. (gh pr #264, #277)
    • datetime.timedelta objects can now be added to relativedelta objects. Reported
      and added by Alec Nikolas Reiter (@justanr) (gh issue #282, pr #283
    • ๐Ÿ”จ Refactored relativedelta.weekday and rrule.weekday into a common base class
      to reduce code duplication. (gh issue #140, pr #311)
    • An issue where the WKST parameter was improperly rendering in str(rrule) was
      ๐Ÿ›  reported and fixed by Daniel LePage (@dplepage). (gh issue #262, pr #263)
    • A replace() method has been added to rrule objects by @jendas1, which creates
      ๐Ÿ†• new rrule with modified attributes, analogous to datetime.replace (gh pr #167)
    • ๐ŸŽ Made some significant performance improvements to rrule objects in Python 2.x
      (gh pr #245)
    • All classes defining equality functions now return NotImplemented when
      ๐Ÿ‘ compared to unsupported classes, rather than raising TypeError, to allow other
      ๐Ÿ‘ classes to provide fallback support. (gh pr #236)
    • Several classes have been marked as explicitly unhashable to maintain
      identical behavior between Python 2 and 3. Submitted by Roy Williams
      (@rowillia) (gh pr #296)
    • ๐Ÿšš Trailing whitespace in easter.py has been removed. Submitted by @OmgImAlexis
      (gh pr #299)
    • ๐Ÿ Windows-only batch files in build scripts had line endings switched to CRLF.
      (gh pr #237)
    • ๐Ÿ“š @adamchainz updated the documentation links to reflect that the canonical
      location for readthedocs links is now at .io, not .org. (gh pr #272)
    • ๐Ÿ‘ท Made some changes to the CI and codecov to test against newer versions of
      Python and pypy, and to adjust the code coverage requirements. For the moment,
      ๐Ÿš€ full pypy3 compatibility is not supported until a new release is available,
      ๐Ÿ‘ due to upstream bugs in the old version affecting PEP-495 support.
      (gh prs #265, #266, #304, #308)
    • ๐Ÿ–จ The full PGP signing key fingerprint was added to the README.md in favor of
      the previously used long-id. Reported by @valholl (gh issue #287, pr #304)
    • โšก๏ธ Updated zoneinfo to 2016i. (gh issue #298, gh pr #306)