Merge "Drop use of deprecated collections classes"
This commit is contained in:
commit
c21a311064
|
@ -14,6 +14,7 @@
|
||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
import collections
|
import collections
|
||||||
|
import collections.abc
|
||||||
import datetime
|
import datetime
|
||||||
import functools
|
import functools
|
||||||
import io
|
import io
|
||||||
|
@ -241,9 +242,9 @@ class ToPrimitiveTestCase(test_base.BaseTestCase):
|
||||||
self.assertEqual({'iteritems': 'iteritems'}, p)
|
self.assertEqual({'iteritems': 'iteritems'}, p)
|
||||||
|
|
||||||
def test_mapping(self):
|
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.
|
# and not a list.
|
||||||
class MappingClass(collections.Mapping):
|
class MappingClass(collections.abc.Mapping):
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
self.data = dict(a=1, b=2, c=3)
|
self.data = dict(a=1, b=2, c=3)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue