ext-testlib: Import MutableSet properly.

The MutableSet class used to be part of the collections module directly,
but in 3.3 was moved to collections.abc. Apparently there was still a
version in collections, since we had been importing it from that old
location and it had been working up until now. After a recent update,
this stopped working for me, and may be tied to an update to the local
version of python on my machine.

This change imports MutableSet from collections.abc instead of
collections directly. I found only one place that this class was used in
src or ext, so I don't think it needs to be fixed anywhere else.

Change-Id: I8b2e82160fd433d57af4a7008ec282ee8ad8a422
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/56849
Maintainer: Bobby Bruce <bbruce@ucdavis.edu>
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Gabe Black <gabeblack@google.com>
This commit is contained in:
Gabe Black
2022-02-15 16:22:34 -08:00
committed by Gabe Black
parent 78451f6685
commit 0d59a8417a

View File

@@ -41,7 +41,8 @@
'''
Helper classes for writing tests with this test library.
'''
from collections import MutableSet, namedtuple
from collections import namedtuple
from collections.abc import MutableSet
import difflib
import errno