summary refs log tree commit diff
path: root/gnu/packages/check.scm
diff options
context:
space:
mode:
authorMarius Bakke <marius@gnu.org>2022-10-16 00:10:07 +0200
committerMarius Bakke <marius@gnu.org>2022-10-16 00:10:07 +0200
commitc567a82a6975e70c8207a4aeed55a72b5121213c (patch)
tree8a6dfe8a78726933e4a1581a2c6ba4a84d59411f /gnu/packages/check.scm
parent3a84b4ec4cec1d122cb454da9d4f6a747a51e49a (diff)
parent322917aeb8e672c21378fd371a5cff4a9f0c2520 (diff)
downloadguix-c567a82a6975e70c8207a4aeed55a72b5121213c.tar.gz
Merge branch 'staging'
Diffstat (limited to 'gnu/packages/check.scm')
-rw-r--r--gnu/packages/check.scm19
1 files changed, 15 insertions, 4 deletions
diff --git a/gnu/packages/check.scm b/gnu/packages/check.scm
index c73d886567..9768e5f8a4 100644
--- a/gnu/packages/check.scm
+++ b/gnu/packages/check.scm
@@ -2778,18 +2778,29 @@ create data based on random numbers and yet remain repeatable.")
 (define-public python-freezegun
   (package
     (name "python-freezegun")
-    (version "0.3.14")
+    (version "1.2.2")
     (source
      (origin
        (method url-fetch)
        (uri (pypi-uri "freezegun" version))
        (sha256
-        (base32 "0al75mk829j1izxi760b7yjnknjihyfhp2mvi5qiyrxb9cpxwqk2"))))
+        (base32 "0ijlq32qvpm5zprfzbyzawpl9qjsknlxhryr1i0q84wl0sxd28nd"))
+       (modules '((guix build utils)))
+       (snippet
+        ;; Add an explicit case for static methods as they are callable
+        ;; in Python 3.10, breaking this conditional.
+        ;; XXX Taken from upstream pull request:
+        ;; https://github.com/spulec/freezegun/pull/397
+        '(substitute* "freezegun/api.py"
+           (("if not callable\\(attr_value\\) or \
+inspect\\.isclass\\(attr_value\\):")
+            "if (not callable(attr_value) or inspect.isclass(attr_value)\
+or isinstance(attr_value, staticmethod)):")))))
     (build-system python-build-system)
     (native-inputs
-     (list python-mock python-pytest))
+     (list python-pytest))
     (propagated-inputs
-     (list python-six python-dateutil))
+     (list python-dateutil))
     (arguments
      `(#:phases
        (modify-phases %standard-phases