pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: pkgsrc/time/py-time-machine



Module Name:    pkgsrc
Committed By:   adam
Date:           Mon Aug 10 11:42:43 UTC 2026

Modified Files:
        pkgsrc/time/py-time-machine: Makefile distinfo

Log Message:
py-time-machine: updated to 3.3.1

3.3.1

Fix small rounding errors in destination calculations.
Previously, time-machine computed destinations in floating-point seconds, which could lead to small rounding errors: up to a few hundred nanoseconds for present-day destinations, growing to several 
microseconds by the year 2500. This change fixes the pipeline to use integer nanoseconds throughout, so time-travel is precise for any supported date.

3.3.0

Support Python 3.15.

Mock datetime.date.today() directly, for Python 3.15 support.
Previously time-machine was mocked only indirectly, since CPython implemented it by calling cls.fromtimestamp(time.time()). Python 3.15 added a fast path that reads the system clock directly (CPython 
Issue 130980), so time travel no longer affected it, which the new mock fixes. Consequently, there are new escape hatch functions: escape_hatch.datetime.date.today() and 
escape_hatch.datetime.datetime.today().

Support isolated subinterpreters, as created by concurrent.interpreters on Python 3.14+. Previously, importing time-machine in an isolated subinterpreter failed with an ImportError.

Move the intermediary functions that patched functions call from Python to C. This change reduces the overhead of calling patched functions like time.time() while time travelling, making them around 
10-20% faster.

Fix returning datetime subclasses from their now() and utcnow() methods while time travelling. Previously, time-machine would always return a plain datetime.datetime instance, rather than the 
subclass.

Fix hiding of the DeprecationWarning from datetime.utcnow() on Python 3.12+ while time travelling. Previously, the mocked version of the function did not raise the warning at all, so deprecated calls 
could pass unnoticed in tests. The warning is attributed to the calling code, like the real function does.
The escape hatch function escape_hatch.datetime.datetime.utcnow() also now attributes its warning to the calling code, rather than to a line within time-machine.

Fix the standard uuid library functions uuid1(), uuid6(), and uuid7() to correctly generate values for the destination when time travels backwards. These functions cache the timestamp of the value 
they generated most recently, and never generate a value stamped before it. Previously, after time-travelling backwards, these functions would keep generating values stamped for the cached timestamp, 
rather than the new destination. The caches are now reset whenever time travel starts, stops, or moves backwards.

Build with frame pointers enabled, preparation for PEP 831.

Stop shipping wheels for 32-bit Linux and Windows.

Stop shipping wheels for free-threaded Python 3.13 since cibuildwheel 4.0.0 dropped support for building them.
Extend the Migration CLI to update freeze_time() calls that pass tick.

Extend the Migration CLI to rewrite freeze_time() decorators on async functions.

Fix the Migration CLI to leave relative imports called freezegun alone. Previously it rewrote from .freezegun import freeze_time, which imports from a local module that happens to share freezegun’s 
name.

Extend the Migration CLI to rewrite from-imports that import freeze_time alongside other names. For example, from freezegun import freeze_time, FakeDate now becomes import time_machine plus from 
freezegun import FakeDate.


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 pkgsrc/time/py-time-machine/Makefile
cvs rdiff -u -r1.12 -r1.13 pkgsrc/time/py-time-machine/distinfo

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/time/py-time-machine/Makefile
diff -u pkgsrc/time/py-time-machine/Makefile:1.14 pkgsrc/time/py-time-machine/Makefile:1.15
--- pkgsrc/time/py-time-machine/Makefile:1.14   Mon Dec 22 10:05:18 2025
+++ pkgsrc/time/py-time-machine/Makefile        Mon Aug 10 11:42:43 2026
@@ -1,6 +1,6 @@
-# $NetBSD: Makefile,v 1.14 2025/12/22 10:05:18 adam Exp $
+# $NetBSD: Makefile,v 1.15 2026/08/10 11:42:43 adam Exp $
 
-DISTNAME=      time_machine-3.2.0
+DISTNAME=      time_machine-3.3.1
 PKGNAME=       ${PYPKGPREFIX}-${DISTNAME:S/_/-/}
 CATEGORIES=    time python
 MASTER_SITES=  ${MASTER_SITE_PYPI:=t/time-machine/}

Index: pkgsrc/time/py-time-machine/distinfo
diff -u pkgsrc/time/py-time-machine/distinfo:1.12 pkgsrc/time/py-time-machine/distinfo:1.13
--- pkgsrc/time/py-time-machine/distinfo:1.12   Mon Dec 22 10:05:18 2025
+++ pkgsrc/time/py-time-machine/distinfo        Mon Aug 10 11:42:43 2026
@@ -1,5 +1,5 @@
-$NetBSD: distinfo,v 1.12 2025/12/22 10:05:18 adam Exp $
+$NetBSD: distinfo,v 1.13 2026/08/10 11:42:43 adam Exp $
 
-BLAKE2s (time_machine-3.2.0.tar.gz) = 772a85a8d79a6681eb83ad8a80ebb312ab3a8306d3074c91d3020d2948ba74c6
-SHA512 (time_machine-3.2.0.tar.gz) = a7855f4a93faa275d38f2f88d206ae2e664f3e5ca82eef5ea680cf411a9ef5edaa0771cc85f39fdb81e30143799a6e4e0d55d4f085dcc9bdc860d4a4c93898de
-Size (time_machine-3.2.0.tar.gz) = 14804 bytes
+BLAKE2s (time_machine-3.3.1.tar.gz) = c1f4c06b2564d4f6f54e5f6fe51f493204575873798ca872f738ea80265e9c6d
+SHA512 (time_machine-3.3.1.tar.gz) = 990c547f7f8cd88c7b247155917a2b59524a474da39d9583268db4d7bbb48b43576b81b5c7d68ebd882771ed418ddf0bae9cfbffaf26530cfcc1b8be2c0e6834
+Size (time_machine-3.3.1.tar.gz) = 19481 bytes



Home | Main Index | Thread Index | Old Index