diff options
author | Anthony Sottile <asottile@umich.edu> | 2021-10-21 15:30:59 +0200 |
---|---|---|
committer | Guido Günther <agx@sigxcpu.org> | 2021-10-21 15:30:59 +0200 |
commit | 6c92ebbe085c93bad5573b2cde5a00bc2e6a13bc (patch) | |
tree | b301655838124a46f4cf637b0e5045d5c93314d6 | |
parent | e80151a1ddf1e35828fd0e833b231a1d7f68562d (diff) |
Use collections.abc.Iterable instead of collections.Iterable
since Python 3.10 dropped the alias.
-rw-r--r-- | gbp/git/args.py | 4 | ||||
-rw-r--r-- | gbp/rpm/linkedlist.py | 6 |
2 files changed, 5 insertions, 5 deletions
diff --git a/gbp/git/args.py b/gbp/git/args.py index 88ad40b8..27229ed7 100644 --- a/gbp/git/args.py +++ b/gbp/git/args.py @@ -18,7 +18,7 @@ Git command argument handling helpers """ -import collections +import collections.abc class GitArgs(object): @@ -58,7 +58,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: diff --git a/gbp/rpm/linkedlist.py b/gbp/rpm/linkedlist.py index ca7e34c1..a56e48a1 100644 --- a/gbp/rpm/linkedlist.py +++ b/gbp/rpm/linkedlist.py @@ -16,7 +16,7 @@ # <http://www.gnu.org/licenses/> """Simple implementation of a doubly linked list""" -import collections +import collections.abc import gbp.log @@ -68,7 +68,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): @@ -86,7 +86,7 @@ class LinkedListIterator(collections.Iterator): return self.__next__() -class LinkedList(collections.Iterable): +class LinkedList(collections.abc.Iterable): """Doubly linked list""" def __init__(self): |