Import ABCs from collections.abc
From the deprecation warning message: "Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated since Python 3.3, and in 3.9 it will stop working" Change-Id: I53b11ebe81977d13a460cdf167ba37c5d3e1bdcd Closes-Bug: #1856882
This commit is contained in:
parent
185522107a
commit
f806dda675
@ -30,6 +30,11 @@ from oslo_versionedobjects._i18n import _
|
||||
from oslo_versionedobjects import exception
|
||||
from oslo_versionedobjects import fields as obj_fields
|
||||
|
||||
if six.PY3:
|
||||
from collections import abc as collections_abc
|
||||
else:
|
||||
import collections as collections_abc
|
||||
|
||||
|
||||
LOG = logging.getLogger('object')
|
||||
|
||||
@ -790,7 +795,7 @@ class VersionedObjectDictCompat(object):
|
||||
setattr(self, key, value)
|
||||
|
||||
|
||||
class ObjectListBase(collections.Sequence):
|
||||
class ObjectListBase(collections_abc.Sequence):
|
||||
"""Mixin class for lists of objects.
|
||||
|
||||
This mixin class can be added as a base class for an object that
|
||||
|
Loading…
Reference in New Issue
Block a user