Skip to content

Releases: ariebovenberg/whenever

0.6.6

27 Jul 19:52
Compare
Choose a tag to compare

Fix potential memory leak in .now() if time-machine is used

0.6.5

27 Jul 17:59
Compare
Choose a tag to compare
  • from_timestamp now also accepts floats, to ease porting code from datetime (#159)
  • Fixed incorrect fractional seconds when parsing negative values in from_timestamp methods.
  • Fix some places where ValueError was raised instead of TypeError

0.6.4

26 Jul 14:51
Compare
Choose a tag to compare
  • Add helper patch_current_time for patching current time in whenever (only) (#147)
  • Support patching the current time with time-machine (#147)
  • Remove undocumented year/month/day/offset properties from Instant
  • Reduce size of binary distributions
  • Clarify contribution guidelines

0.6.3

26 Jul 14:27
Compare
Choose a tag to compare
  • Improve robustness and speed of keyword argument parsing in Rust extension (#149)
  • Add more answers to common questions in the docs and FAQ (#148, #150)

0.6.2

26 Jul 14:25
Compare
Choose a tag to compare

Add third-party licenses to distributions

0.6.1

04 Jul 20:09
Compare
Choose a tag to compare

Small updates to project metadata

0.6.0

04 Jul 14:58
Compare
Choose a tag to compare

🎉 A big release touting a Rust extension module and an API more consistent with other modern libraries.

Added or improved

  • Implement as a Rust extension module, leading to a big speedup
  • Add replace_date and replace_time methods to datetimes.
  • Add Date.MIN and Date.MAX constants.
  • from_py_* methods are more robust.
  • The pickle format for most types is now more efficient.

Breaking changes

(see the changelog for the full rationale behind each change)

  • UTCDateTime is now Instant. Removed methods that were specific to UTC.
  • NaiveDateTime is now LocalDateTime
  • Nanosecond precision is now the default for all datetimes and deltas. nanosecond is a keyword-only argument for all constructors, to prevent mistakes porting code from datetime (which uses microseconds).
  • Unified [from_]canonical_format methods with [from_]common_iso8601 methods into [format|parse]_common_iso methods.
  • Timestamp methods now use integers instead of floats. There are now separate methods for seconds, milliseconds, and nanoseconds.
  • Renamed [from_][rfc3339|rfc2822] methods to [format|parse]_[rfc3339|rfc2822].
  • Added explicit ignore_dst=True flag to DST-unsafe operations such as shifting an offset datetime.
  • Renamed as_utc, as_offset, as_zoned, as_local to to_utc, to_fixed_offset, to_tz, to_system_tz, and the NaiveDateTime.assume_* methods accordingly
  • disambiguate= is non-optional for all relevant methods. The only exception is the constructor, which defaults to "raise".
  • Removed weakref support.
  • Weekdays are now an enum instead of an integer.
  • Calendar units in Date[Time]Delta can now only be retrieved together. For example, there is no delta.months or delta.days anymore,delta.in_months_days() should be used in this case.
  • Units in delta cannot be different signs anymore (after normalization).
  • Calendar units are normalized, but only in so far as they can be converted strictly. For example, 1 year is always equal to 12 months, but 1 month isn't equal to a fixed number of days. Refer to the delta docs for more information.
  • Renamed AmbiguousTime to RepeatedTime.
  • Dropped Python 3.8 support

0.5.2

30 Apr 17:58
Compare
Choose a tag to compare

Add Date.py_date() (#118)

0.5.1

02 Apr 15:20
Compare
Choose a tag to compare

Fix LocalSystemDateTime.now() not setting the correct offset (#104)

0.5.0

21 Mar 09:52
Compare
Choose a tag to compare

Breaking changes

  • Fix handling of -0000 offset in RFC2822 format, which was not according to the standard. NaiveDateTime can now no longer be created from this format.
  • DateDelta canonical format now uses P prefix.

Improved

  • Add explicit ISO8601 formatting/parsing methods to datetimes, date, time, and deltas.
  • Add missing Date.from_canonical_format method.
  • Separate docs for deltas and datetimes.
  • NaiveDateTime.assume_offset now also accepts integers as hour offsets.