17
0

- update to 3.2.0:

* Add :attr:`time_machine.naive_mode` to control how time-
    machine interprets naive datetimes. The default mode is
    MIXED, which preserves existing behaviour: naive datetime
    objects and date objects are interpreted as UTC, while naive
    datetime strings are interpreted as local time. Three
    alternative modes are available:  UTC: naive datetimes are
    always interpreted as UTC. LOCAL: naive datetimes are
    interpreted as local time, matching Python's default
    semantics, and freezegun. ERROR: naive datetimes raise a
    RuntimeError, ensuring your tests are isolated from the
    current timezone.   Note It’s recommended you use LOCAL or
    ERROR to avoid confusion around naive datetimes.  PR #591.
    Thanks to Paolo Melchiorre for review. Thanks to PhML,
    Stefaan Lippens, Matthieu Rigal, Nikita Demir, Steve Mavens,
    Andy Freeland, and Paul Ganssle for their input on Issue
    #257.
  * UTC: naive datetimes are always interpreted as UTC.
  * LOCAL: naive datetimes are interpreted as local time,
    matching Python's default semantics, and freezegun.
  * ERROR: naive datetimes raise a RuntimeError, ensuring your
    tests are isolated from the current timezone.
  * Raise RuntimeError when attempting to start time travelling
    if freezegun is active. This change should help avoid
    surprises when migrating complex test suites from freezegun
    to time-machine. PR #590.

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-time-machine?expand=0&rev=39
This commit is contained in:
2026-01-28 12:28:09 +00:00
committed by Git OBS Bridge
parent 946671af7b
commit 0bb75d1f0f
4 changed files with 36 additions and 5 deletions

View File

@@ -1,3 +1,33 @@
-------------------------------------------------------------------
Wed Jan 28 12:27:44 UTC 2026 - Dirk Müller <dmueller@suse.com>
- update to 3.2.0:
* Add :attr:`time_machine.naive_mode` to control how time-
machine interprets naive datetimes. The default mode is
MIXED, which preserves existing behaviour: naive datetime
objects and date objects are interpreted as UTC, while naive
datetime strings are interpreted as local time. Three
alternative modes are available: UTC: naive datetimes are
always interpreted as UTC. LOCAL: naive datetimes are
interpreted as local time, matching Python's default
semantics, and freezegun. ERROR: naive datetimes raise a
RuntimeError, ensuring your tests are isolated from the
current timezone. Note Its recommended you use LOCAL or
ERROR to avoid confusion around naive datetimes. PR #591.
Thanks to Paolo Melchiorre for review. Thanks to PhML,
Stefaan Lippens, Matthieu Rigal, Nikita Demir, Steve Mavens,
Andy Freeland, and Paul Ganssle for their input on Issue
#257.
* UTC: naive datetimes are always interpreted as UTC.
* LOCAL: naive datetimes are interpreted as local time,
matching Python's default semantics, and freezegun.
* ERROR: naive datetimes raise a RuntimeError, ensuring your
tests are isolated from the current timezone.
* Raise RuntimeError when attempting to start time travelling
if freezegun is active. This change should help avoid
surprises when migrating complex test suites from freezegun
to time-machine. PR #590.
-------------------------------------------------------------------
Tue Dec 9 21:22:28 UTC 2025 - Matej Cepl <mcepl@cepl.eu>