diff --git a/python-time-machine-3.1.0.tar.gz b/python-time-machine-3.1.0.tar.gz deleted file mode 100644 index 2585e1f..0000000 --- a/python-time-machine-3.1.0.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:5ccc9add7f678a2652249d12efea446db0540acc90240ae9327d2fdcbba4f920 -size 75765 diff --git a/python-time-machine-3.2.0.tar.gz b/python-time-machine-3.2.0.tar.gz new file mode 100644 index 0000000..93c7c37 --- /dev/null +++ b/python-time-machine-3.2.0.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c74880a913e25b30de6be7645fa81b8ff374f0332dbbfd6c22d9445729cee637 +size 85884 diff --git a/python-time-machine.changes b/python-time-machine.changes index 1b56361..03ebbcf 100644 --- a/python-time-machine.changes +++ b/python-time-machine.changes @@ -1,3 +1,33 @@ +------------------------------------------------------------------- +Wed Jan 28 12:27:44 UTC 2026 - Dirk Müller + +- 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. + ------------------------------------------------------------------- Tue Dec 9 21:22:28 UTC 2025 - Matej Cepl diff --git a/python-time-machine.spec b/python-time-machine.spec index d142e42..6da7612 100644 --- a/python-time-machine.spec +++ b/python-time-machine.spec @@ -1,7 +1,7 @@ # # spec file for package python-time-machine # -# Copyright (c) 2025 SUSE LLC and contributors +# Copyright (c) 2026 SUSE LLC and contributors # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -17,7 +17,7 @@ Name: python-time-machine -Version: 3.1.0 +Version: 3.2.0 Release: 0 Summary: Travel through time in your tests License: MIT @@ -37,6 +37,7 @@ Requires: python-tokenize-rt Requires: timezone # SECTION tests BuildRequires: %{python_module backports.zoneinfo if %python-base < 3.9} +BuildRequires: %{python_module freezegun} BuildRequires: %{python_module pytest} BuildRequires: %{python_module python-dateutil} BuildRequires: %{python_module tokenize-rt}