diff options
author | Stephen Finucane <sfinucan@redhat.com> | 2021-02-01 11:05:36 +0000 |
---|---|---|
committer | Stephen Finucane <sfinucan@redhat.com> | 2021-02-01 11:05:36 +0000 |
commit | 967a36fdbed5fc68e307fefc385ab2b8509a91e2 (patch) | |
tree | c4b771073cd5dab04d8e5f17c526705c37320e5e | |
parent | 8445e61e933abb96971474d22a878ab98ed608de (diff) | |
download | oslo-serialization-967a36fdbed5fc68e307fefc385ab2b8509a91e2.tar.gz |
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>
-rw-r--r-- | oslo_serialization/tests/test_jsonutils.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/oslo_serialization/tests/test_jsonutils.py b/oslo_serialization/tests/test_jsonutils.py index f076822..9c92235 100644 --- a/oslo_serialization/tests/test_jsonutils.py +++ b/oslo_serialization/tests/test_jsonutils.py @@ -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) |