diff --git a/docs/packages/time-machine.yaml b/docs/packages/time-machine.yaml index ed2167889436..05b760864025 100644 --- a/docs/packages/time-machine.yaml +++ b/docs/packages/time-machine.yaml @@ -34,3 +34,4 @@ versions: - filename: time_machine-3.5.1-cp314-cp314t-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl sha256: d2350bff46236399002176c888639f03ba87ecd19e7bf84eda5ba2cfec04a825 requires-python: '>=3.10' +- version: 3.6.0 diff --git a/patches/time-machine/3.6.0/0001-tests-fuzz-suppress-the-too_slow-health-check-for-Zo.patch b/patches/time-machine/3.6.0/0001-tests-fuzz-suppress-the-too_slow-health-check-for-Zo.patch new file mode 100644 index 000000000000..00c13c52d0d0 --- /dev/null +++ b/patches/time-machine/3.6.0/0001-tests-fuzz-suppress-the-too_slow-health-check-for-Zo.patch @@ -0,0 +1,81 @@ +From e96853b2867e7f0c1395188e50a4202103c58f7b Mon Sep 17 00:00:00 2001 +From: Ludovic Henry +Date: Fri, 18 Sep 2026 05:33:56 +0000 +Subject: [PATCH] =?UTF-8?q?tests:=20fuzz:=20suppress=20the=20too=5Fslow=20?= + =?UTF-8?q?health=20check=20for=20ZoneInfo=20draws=20The=20strategies=20th?= + =?UTF-8?q?at=20draw=20a=20zoneinfo=20=E2=80=94=20`zoneinfos`,=20and=20`aw?= + =?UTF-8?q?are=5Fdatetimes`,=20which=20mixes=20it=20with=20UTC=20=E2=80=94?= + =?UTF-8?q?=20construct=20a=20`ZoneInfo`=20per=20example,=20and=20the=20fi?= + =?UTF-8?q?rst=20construction=20of=20each=20key=20parses=20the=20matching?= + =?UTF-8?q?=20TZif=20file=20off=20disk.=20On=20the=20riscv64=20runners=20t?= + =?UTF-8?q?hat=20costs=20~0.37s=20per=20draw,=20so=20Hypothesis=20reports?= +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + + FailedHealthCheck: Input generation is slow: Hypothesis only generated + 7 valid inputs after 1.16 seconds + +and fails `test_extract_timestamp_tzname_zoneinfo_datetime`, the only one of +the four affected tests that carries no `@settings` at all. The health check +is a fixed wall-clock budget on *input generation*; nothing about the +generated inputs, the assertions, or the extension under test is different +here, and the run that tripped it went on to pass every other property. + +Suppressing `HealthCheck.too_slow` on exactly the tests that can build a +`ZoneInfo` leaves the deadline and example budget alone, and is a no-op on +hardware fast enough never to trip the check. + +Upstream-Status: Inappropriate [native runner specific] +--- + tests/test_fuzz.py | 9 +++++---- + 1 file changed, 5 insertions(+), 4 deletions(-) + +diff --git a/tests/test_fuzz.py b/tests/test_fuzz.py +index ca1e5aa..3b33fbd 100644 +--- a/tests/test_fuzz.py ++++ b/tests/test_fuzz.py +@@ -12,7 +12,7 @@ from unittest import mock + from zoneinfo import ZoneInfo + + import pytest +-from hypothesis import assume, given, settings ++from hypothesis import HealthCheck, assume, given, settings + from hypothesis import strategies as st + from hypothesis.stateful import RuleBasedStateMachine, invariant, precondition, rule + +@@ -69,7 +69,7 @@ def test_travel_to_timestamp(timestamp): + assert time.time() == expected_ns / NANOSECONDS_PER_SECOND + + +-@settings(deadline=None) ++@settings(deadline=None, suppress_health_check=[HealthCheck.too_slow]) + @given(destination=aware_datetimes) + def test_travel_to_aware_datetime(destination): + with time_machine.travel(destination, tick=False): +@@ -102,7 +102,7 @@ def test_travel_to_date(destination): + assert now.date() == destination + + +-@settings(deadline=None) ++@settings(deadline=None, suppress_health_check=[HealthCheck.too_slow]) + @given(destination=aware_datetimes) + def test_travel_to_isoformat_string(destination): + with time_machine.travel(destination.isoformat(), tick=False): +@@ -167,7 +167,7 @@ def test_move_to(first, second): + @pytest.mark.skipif( + not hasattr(time, "tzset"), reason="Doesn't have tzset, so travel() can't set TZ" + ) +-@settings(deadline=None) ++@settings(deadline=None, suppress_health_check=[HealthCheck.too_slow]) + @given( + # Past 2038, some platforms' time functions stop applying zones' POSIX DST + # rules, diverging from zoneinfo. +@@ -232,6 +232,7 @@ def test_extract_timestamp_tzname_number(timestamp): + ) + + ++@settings(suppress_health_check=[HealthCheck.too_slow]) + @given(destination=naive_datetimes, tz=zoneinfos) + def test_extract_timestamp_tzname_zoneinfo_datetime(destination, tz): + aware = destination.replace(tzinfo=tz)