summaryrefslogtreecommitdiff
path: root/dev-python/freezegun/files
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2021-05-11 19:55:43 +0100
committerV3n3RiX <venerix@redcorelinux.org>2021-05-11 19:55:43 +0100
commit185fa19bbf68a4d4dca534d2b46729207a177f16 (patch)
treea8a537b82fda83a0799c2ca9887f212558363aa7 /dev-python/freezegun/files
parentc8fd0d84af0bfd1949542adc2cbb735b1d28f9ed (diff)
gentoo resync : 11.05.2021
Diffstat (limited to 'dev-python/freezegun/files')
-rw-r--r--dev-python/freezegun/files/freezegun-1.1.0-py310.patch30
1 files changed, 30 insertions, 0 deletions
diff --git a/dev-python/freezegun/files/freezegun-1.1.0-py310.patch b/dev-python/freezegun/files/freezegun-1.1.0-py310.patch
new file mode 100644
index 000000000000..41bd7bc2712b
--- /dev/null
+++ b/dev-python/freezegun/files/freezegun-1.1.0-py310.patch
@@ -0,0 +1,30 @@
+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.
+
+(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
+