Merge "Drop use of deprecated collections classes"

This commit is contained in:
Zuul 2021-04-16 11:56:37 +00:00 committed by Gerrit Code Review
commit ca02481310

View File

@ -12,7 +12,7 @@
# License for the specific language governing permissions and limitations # License for the specific language governing permissions and limitations
# under the License. # under the License.
import collections import collections.abc
import copy import copy
import functools import functools
@ -116,7 +116,7 @@ class MockCollection(object):
def find_one(self, spec_or_id=None, *args, **kwargs): def find_one(self, spec_or_id=None, *args, **kwargs):
if spec_or_id is None: if spec_or_id is None:
spec_or_id = {} spec_or_id = {}
if not isinstance(spec_or_id, collections.Mapping): if not isinstance(spec_or_id, collections.abc.Mapping):
spec_or_id = {'_id': spec_or_id} spec_or_id = {'_id': spec_or_id}
try: try: