fix collections import issue with python3 11/284011/1
authorbiao716.wang <biao716.wang@samsung.com>
Tue, 8 Nov 2022 11:07:43 +0000 (20:07 +0900)
committerbiao716.wang <biao716.wang@samsung.com>
Tue, 8 Nov 2022 11:07:43 +0000 (20:07 +0900)
Change-Id: I97326835e1cfc7cbf2d026f42b37d4afa8c07501
Signed-off-by: biao716.wang <biao716.wang@samsung.com>
gbp/git/args.py
gbp/rpm/linkedlist.py

index 5a40553..53ad489 100644 (file)
@@ -57,7 +57,7 @@ class GitArgs(object):
         for arg in args:
             if isinstance(arg, str):
                 self._args.append(arg)
-            elif isinstance(arg, collections.Iterable):
+            elif isinstance(arg, collections.abc.Iterable):
                 for i in iter(arg):
                     self._args.append(str(i))
             else:
index 0840fef..4d22342 100644 (file)
@@ -69,7 +69,7 @@ class LinkedListNode(object):
         self._data = None
 
 
-class LinkedListIterator(collections.Iterator):
+class LinkedListIterator(collections.abc.Iterator):
     """Iterator for the linked list"""
 
     def __init__(self, obj):
@@ -84,7 +84,7 @@ class LinkedListIterator(collections.Iterator):
         return ret
 
 
-class LinkedList(collections.Iterable):
+class LinkedList(collections.abc.Iterable):
     """Doubly linked list"""
 
     def __init__(self):