Drop use of deprecated collections classes
These were moved in Python 3.3 and the aliases will be removed in 3.10. Change-Id: If31797f8fc758468d153c364700db47452edf3dd Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
This commit is contained in:
parent
8445e61e93
commit
967a36fdbe
@ -14,6 +14,7 @@
|
||||
# under the License.
|
||||
|
||||
import collections
|
||||
import collections.abc
|
||||
import datetime
|
||||
import functools
|
||||
import io
|
||||
@ -241,9 +242,9 @@ class ToPrimitiveTestCase(test_base.BaseTestCase):
|
||||
self.assertEqual({'iteritems': 'iteritems'}, p)
|
||||
|
||||
def test_mapping(self):
|
||||
# Make sure collections.Mapping is converted to a dict
|
||||
# Make sure collections.abc.Mapping is converted to a dict
|
||||
# and not a list.
|
||||
class MappingClass(collections.Mapping):
|
||||
class MappingClass(collections.abc.Mapping):
|
||||
def __init__(self):
|
||||
self.data = dict(a=1, b=2, c=3)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user