Control: tags 1090225 + pending

Dear maintainer,

I've prepared an NMU for freezegun (versioned as 1.5.1-1.2) and uploaded
it to unstable, since the bug has been around for a while with no
maintainer response and this is blocking the Python 3.13 transition.  I
also pushed these changes to
https://salsa.debian.org/debian/python-freezegun.

This is essentially just Adrien's patch, but I preferred to strip out
the .github/ noise for NMU purposes.

Thanks,

-- 
Colin Watson (he/him)                              [[email protected]]
diff -Nru freezegun-1.5.1/debian/changelog freezegun-1.5.1/debian/changelog
--- freezegun-1.5.1/debian/changelog	2024-07-13 21:09:45.000000000 +0100
+++ freezegun-1.5.1/debian/changelog	2025-01-20 11:58:53.000000000 +0000
@@ -1,3 +1,10 @@
+freezegun (1.5.1-1.2) unstable; urgency=medium
+
+  * Non-maintainer upload.
+  * Fix tests for Python 3.13 (thanks, Adrien Nader; closes: #1090225).
+
+ -- Colin Watson <[email protected]>  Mon, 20 Jan 2025 11:58:53 +0000
+
 freezegun (1.5.1-1.1) unstable; urgency=medium
 
   * Non-maintainer upload.
diff -Nru freezegun-1.5.1/debian/patches/admin-support-python3.13.patch freezegun-1.5.1/debian/patches/admin-support-python3.13.patch
--- freezegun-1.5.1/debian/patches/admin-support-python3.13.patch	1970-01-01 01:00:00.000000000 +0100
+++ freezegun-1.5.1/debian/patches/admin-support-python3.13.patch	2025-01-20 11:58:53.000000000 +0000
@@ -0,0 +1,37 @@
+From: Bert Blommers <[email protected]>
+Date: Fri, 28 Jun 2024 19:21:04 +0000
+Subject: Admin: Support Python 3.13
+
+Origin: upstream, https://github.com/spulec/freezegun/pull/550
+Bug: https://github.com/spulec/freezegun/issues/547
+Bug-Debian: https://bugs.debian.org/1090225
+Last-Update: 2025-01-20
+---
+ tests/test_datetimes.py | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/tests/test_datetimes.py b/tests/test_datetimes.py
+index a6f1989..b75ad3b 100644
+--- a/tests/test_datetimes.py
++++ b/tests/test_datetimes.py
+@@ -534,17 +534,17 @@ class TestUnitTestMethodDecorator(unittest.TestCase):
+     @freeze_time('2013-04-09', as_kwarg='frozen_time')
+     def test_method_decorator_works_on_unittest_kwarg_frozen_time(self, frozen_time: Any) -> None:
+         self.assertEqual(datetime.date(2013, 4, 9), datetime.date.today())
+-        self.assertEqual(datetime.date(2013, 4, 9), frozen_time.time_to_freeze.today())
++        assert frozen_time.time_to_freeze.today().strftime('%Y-%m-%d') == "2013-04-09"
+ 
+     @freeze_time('2013-04-09', as_kwarg='hello')
+     def test_method_decorator_works_on_unittest_kwarg_hello(self, **kwargs: Any) -> None:
+         self.assertEqual(datetime.date(2013, 4, 9), datetime.date.today())
+-        self.assertEqual(datetime.date(2013, 4, 9), kwargs.get('hello').time_to_freeze.today())  # type: ignore
++        assert kwargs.get("hello").time_to_freeze.today().strftime('%Y-%m-%d') == "2013-04-09"  # type: ignore
+ 
+     @freeze_time(lambda: datetime.date(year=2013, month=4, day=9), as_kwarg='frozen_time')
+     def test_method_decorator_works_on_unittest_kwarg_frozen_time_with_func(self, frozen_time: Any) -> None:
+         self.assertEqual(datetime.date(2013, 4, 9), datetime.date.today())
+-        self.assertEqual(datetime.date(2013, 4, 9), frozen_time.time_to_freeze.today())
++        assert frozen_time.time_to_freeze.today().strftime('%Y-%m-%d') == "2013-04-09"
+ 
+ 
+ @freeze_time('2013-04-09')
diff -Nru freezegun-1.5.1/debian/patches/series freezegun-1.5.1/debian/patches/series
--- freezegun-1.5.1/debian/patches/series	2024-07-13 21:09:45.000000000 +0100
+++ freezegun-1.5.1/debian/patches/series	2025-01-20 11:58:53.000000000 +0000
@@ -1 +1 @@
-
+admin-support-python3.13.patch

Reply via email to