You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gentoo-overlay/dev-python/python-varlink/files/python-varlink-30.3.1-fix.p...

31 lines
875 B

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