summaryrefslogtreecommitdiff
path: root/dev-python/doublex/files/doublex-1.9.2-py310.patch
blob: 5d3a974a38a190ae7bee0a914b1272b26a680168 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
commit ec3ce987a95abd951840213b77d44624b2ca5e84
Author: Louis Sautier <sautier.louis@gmail.com>
Date:   Sat Aug 7 01:56:31 2021 +0200

    Support Python 3.10 by using collections.abc

diff --git a/doublex/internal.py b/doublex/internal.py
index 91f5866..072774a 100644
--- a/doublex/internal.py
+++ b/doublex/internal.py
@@ -20,7 +20,7 @@
 
 
 import threading
-import collections
+import collections.abc
 import functools
 import six
 
@@ -184,11 +184,11 @@ class Invocation(object):
         return Invocation(double, name, InvocationContext(*args, **kargs))
 
     def delegates(self, delegate):
-        if isinstance(delegate, collections.Callable):
+        if isinstance(delegate, collections.abc.Callable):
             self.__delegate = delegate
             return
 
-        if isinstance(delegate, collections.Mapping):
+        if isinstance(delegate, collections.abc.Mapping):
             self.__delegate = delegate.get
             return