Commit 967a36fd authored by Stephen Finucane's avatar Stephen Finucane
Browse files

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: default avatarStephen Finucane <sfinucan@redhat.com>
parent 8445e61e
......@@ -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)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment