python: Import MutableSet and MutableSequence from collections.abc.

This commit is contained in:
Patrick Laimbock 2022-01-18 16:08:15 +01:00 committed by Jacek Caban
parent ea813cd85d
commit ba7c38da4a
2 changed files with 3 additions and 2 deletions

View File

@ -494,7 +494,7 @@ def uniquer(seq, idfun=None):
# Based on http://code.activestate.com/recipes/576694/.
class OrderedSet(collections.MutableSet):
class OrderedSet(collections.abc.MutableSet):
def __init__(self, iterable=None):
self.end = end = []
end += [None, end, end] # sentinel node for doubly linked list

View File

@ -8,7 +8,8 @@ dictionary of values, and returns a new iterable of test objects. It is
possible to define custom filters if the built-in ones are not enough.
"""
from collections import defaultdict, MutableSequence
from collections import defaultdict
from collections.abc import MutableSequence
import itertools
import os