Github messages for voidlinux
 help / color / mirror / Atom feed
* [PR PATCH] python3-freezegun: update to 1.5.1
@ 2025-01-11 14:31 tstraus13
  2025-01-11 14:32 ` tstraus13
  2025-01-11 20:24 ` [PR PATCH] [Merged]: " classabbyamp
  0 siblings, 2 replies; 3+ messages in thread
From: tstraus13 @ 2025-01-11 14:31 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 714 bytes --]

There is a new pull request by tstraus13 against master on the void-packages repository

https://github.com/tstraus13/void-packages python3-freezegun-1.5.1
https://github.com/void-linux/void-packages/pull/53929

python3-freezegun: update to 1.5.1
Primarily a version bump but also needs a patch from upstream to pass tests.

#### Testing the changes
- I tested the changes in this PR: **YES**

#### Local build testing
- I built this PR locally for my native architecture, (x86_64)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - x86_64-musl
  - aarch64
  - aarch64-musl


A patch file from https://github.com/void-linux/void-packages/pull/53929.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-python3-freezegun-1.5.1-53929.patch --]
[-- Type: text/x-diff, Size: 4744 bytes --]

From ef73e09115e31302e5cbb715082a56268529aad6 Mon Sep 17 00:00:00 2001
From: Tom Strausbaugh <tstrausbaugh@straustech.net>
Date: Sat, 11 Jan 2025 09:24:21 -0500
Subject: [PATCH] python3-freezegun: update to 1.5.1

---
 .../patches/fix-upstream-issue-396.patch      | 30 -------------------
 .../patches/fix-upstream-issue-550.patch      | 25 ++++++++++++++++
 srcpkgs/python3-freezegun/template            |  6 ++--
 3 files changed, 28 insertions(+), 33 deletions(-)
 delete mode 100644 srcpkgs/python3-freezegun/patches/fix-upstream-issue-396.patch
 create mode 100644 srcpkgs/python3-freezegun/patches/fix-upstream-issue-550.patch

diff --git a/srcpkgs/python3-freezegun/patches/fix-upstream-issue-396.patch b/srcpkgs/python3-freezegun/patches/fix-upstream-issue-396.patch
deleted file mode 100644
index 42642d5a84d264..00000000000000
--- a/srcpkgs/python3-freezegun/patches/fix-upstream-issue-396.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-From 57d024e4ce2516c55c715448296b9099db68343c Mon Sep 17 00:00:00 2001
-From: Karthikeyan Singaravelan <tir.karthi@gmail.com>
-Date: Fri, 7 May 2021 15:51:33 +0000
-Subject: [PATCH] Fix decorate_class for Python 3.10 where staticmethod is
- callable.
-
-https://github.com/spulec/freezegun/pull/397 (edited by mgorny for more readable indent)
----
- freezegun/api.py | 5 ++++-
- 1 file changed, 4 insertions(+), 1 deletion(-)
-
-diff --git a/freezegun/api.py b/freezegun/api.py
-index cab9ebe..eb3a931 100644
---- a/freezegun/api.py
-+++ b/freezegun/api.py
-@@ -598,7 +598,10 @@ class _freeze_time(object):
-                         continue
-                     seen.add(attr)
- 
--                    if not callable(attr_value) or inspect.isclass(attr_value):
-+                    # staticmethods are callable from Python 3.10 . Hence skip them from decoration
-+                    if (not callable(attr_value)
-+                            or inspect.isclass(attr_value)
-+                            or isinstance(attr_value, staticmethod)):
-                         continue
- 
-                     try:
--- 
-2.31.1
-
diff --git a/srcpkgs/python3-freezegun/patches/fix-upstream-issue-550.patch b/srcpkgs/python3-freezegun/patches/fix-upstream-issue-550.patch
new file mode 100644
index 00000000000000..5091090f8bbb08
--- /dev/null
+++ b/srcpkgs/python3-freezegun/patches/fix-upstream-issue-550.patch
@@ -0,0 +1,25 @@
+https://github.com/spulec/freezegun/pull/550
+
+--- a/tests/test_datetimes.py
++++ b/tests/test_datetimes.py
+@@ -534,17 +534,17 @@
+     @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 --git a/srcpkgs/python3-freezegun/template b/srcpkgs/python3-freezegun/template
index 653237b3f44dea..dbc6f581e2945d 100644
--- a/srcpkgs/python3-freezegun/template
+++ b/srcpkgs/python3-freezegun/template
@@ -1,7 +1,7 @@
 # Template file for 'python3-freezegun'
 pkgname=python3-freezegun
-version=1.2.2
-revision=4
+version=1.5.1
+revision=1
 build_style=python3-module
 hostmakedepends="python3-setuptools"
 depends="python3-dateutil"
@@ -12,7 +12,7 @@ license="Apache-2.0"
 homepage="https://github.com/spulec/freezegun"
 changelog="https://raw.githubusercontent.com/spulec/freezegun/master/CHANGELOG"
 distfiles="${PYPI_SITE}/f/freezegun/freezegun-${version}.tar.gz"
-checksum=cd22d1ba06941384410cd967d8a99d5ae2442f57dfafeff2fda5de8dc5c05446
+checksum=b29dedfcda6d5e8e083ce71b2b542753ad48cfec44037b3fc79702e2980a89e9
 
 do_check() {
 	# Timezone needs to be fixed due to

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: python3-freezegun: update to 1.5.1
  2025-01-11 14:31 [PR PATCH] python3-freezegun: update to 1.5.1 tstraus13
@ 2025-01-11 14:32 ` tstraus13
  2025-01-11 20:24 ` [PR PATCH] [Merged]: " classabbyamp
  1 sibling, 0 replies; 3+ messages in thread
From: tstraus13 @ 2025-01-11 14:32 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 214 bytes --]

New comment by tstraus13 on void-packages repository

https://github.com/void-linux/void-packages/pull/53929#issuecomment-2585287394

Comment:
Should also allow for the streamlink PR to pass tests as well. #53736 

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PR PATCH] [Merged]: python3-freezegun: update to 1.5.1
  2025-01-11 14:31 [PR PATCH] python3-freezegun: update to 1.5.1 tstraus13
  2025-01-11 14:32 ` tstraus13
@ 2025-01-11 20:24 ` classabbyamp
  1 sibling, 0 replies; 3+ messages in thread
From: classabbyamp @ 2025-01-11 20:24 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 543 bytes --]

There's a merged pull request on the void-packages repository

python3-freezegun: update to 1.5.1
https://github.com/void-linux/void-packages/pull/53929

Description:
Primarily a version bump but also needs a patch from upstream to pass tests.

#### Testing the changes
- I tested the changes in this PR: **YES**

#### Local build testing
- I built this PR locally for my native architecture, (x86_64)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - x86_64-musl
  - aarch64
  - aarch64-musl


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2025-01-11 20:24 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-01-11 14:31 [PR PATCH] python3-freezegun: update to 1.5.1 tstraus13
2025-01-11 14:32 ` tstraus13
2025-01-11 20:24 ` [PR PATCH] [Merged]: " classabbyamp

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).