summaryrefslogtreecommitdiff
path: root/dev-python/python-varlink/files/python-varlink-30.3.1-fix.py3.10.patch
blob: e85826f6bc0e0d06d2a3a137bfea386e3aed4640 (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
From 0a9014ad564131ee98dc8c4c1f9cc0c5e29d5dac Mon Sep 17 00:00:00 2001
From: Arthur Zamarin <arthurzam@gentoo.org>
Date: Fri, 20 Aug 2021 10:37:42 +0300
Subject: [PATCH] Python3.10: fix import collections

Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
---
 varlink/scanner.py | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/varlink/scanner.py b/varlink/scanner.py
index d5a0e7b..58ced74 100644
--- a/varlink/scanner.py
+++ b/varlink/scanner.py
@@ -21,7 +21,11 @@ try:
 except:  # Python 2
     from argparse import Namespace as SimpleNamespace
 
-from collections import (Set, OrderedDict, Mapping)
+try:
+    from collections.abc import (Set, Mapping)
+    from collections import OrderedDict
+except ImportError:
+    from collections import (Set, OrderedDict, Mapping)
 
 from .error import (MethodNotFound, InvalidParameter)
 
-- 
2.33.0