forked from pool/python-time-machine
Accepting request 1329666 from devel:languages:python
- 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/request/show/1329666
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-time-machine?expand=0&rev=20
This commit is contained in:
@@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:5ccc9add7f678a2652249d12efea446db0540acc90240ae9327d2fdcbba4f920
|
||||
size 75765
|
||||
3
python-time-machine-3.2.0.tar.gz
Normal file
3
python-time-machine-3.2.0.tar.gz
Normal file
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:c74880a913e25b30de6be7645fa81b8ff374f0332dbbfd6c22d9445729cee637
|
||||
size 85884
|
||||
@@ -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 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 <mcepl@cepl.eu>
|
||||
|
||||
|
||||
@@ -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}
|
||||
|
||||
Reference in New Issue
Block a user