From 51d7b465b5d07bd849818b8dc248dbc16109c6ac Mon Sep 17 00:00:00 2001 From: Stephen Finucane Date: Mon, 1 Feb 2021 11:07:54 +0000 Subject: [PATCH] Drop use of deprecated collections classes These were moved in Python 3.3 and the aliases will be dropped in 3.10. Change-Id: I98985aef57ebe024e97e444ffd0d43ee2b88b332 Signed-off-by: Stephen Finucane --- oslo_cache/tests/unit/test_cache_backend_mongo.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/oslo_cache/tests/unit/test_cache_backend_mongo.py b/oslo_cache/tests/unit/test_cache_backend_mongo.py index dda8fee1..83b77a39 100644 --- a/oslo_cache/tests/unit/test_cache_backend_mongo.py +++ b/oslo_cache/tests/unit/test_cache_backend_mongo.py @@ -12,7 +12,7 @@ # License for the specific language governing permissions and limitations # under the License. -import collections +import collections.abc import copy import functools @@ -116,7 +116,7 @@ class MockCollection(object): def find_one(self, spec_or_id=None, *args, **kwargs): if spec_or_id is None: 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} try: