diff options
author | Takashi Kajinami <tkajinam@redhat.com> | 2021-07-17 00:42:02 +0900 |
---|---|---|
committer | Takashi Kajinami <tkajinam@redhat.com> | 2021-07-17 00:45:58 +0900 |
commit | d3044ad238e381c6a7346990354e76d1a8fed741 (patch) | |
tree | c7b89dbf500828a93199e9ae290a9cf71037f85c | |
parent | cb113ef89beb081509a15757ed1d8426155f6e01 (diff) | |
download | keystone-d3044ad238e381c6a7346990354e76d1a8fed741.tar.gz |
Replace deprecated import of ABCs from collections
ABCs in collections should be imported from collections.abc and direct
import from collections is deprecated since Python 3.3.
Closes-Bug: #1936667
Change-Id: I12b570cd6d6abda17a68aac6a35ae8193d9c22b4
-rw-r--r-- | keystone/common/utils.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/keystone/common/utils.py b/keystone/common/utils.py index 13140853a..7c3e7ae1a 100644 --- a/keystone/common/utils.py +++ b/keystone/common/utils.py @@ -16,7 +16,7 @@ # License for the specific language governing permissions and limitations # under the License. -import collections +import collections.abc import grp import hashlib import itertools @@ -81,7 +81,7 @@ def flatten_dict(d, parent_key=''): items = [] for k, v in d.items(): new_key = parent_key + '.' + k if parent_key else k - if isinstance(v, collections.MutableMapping): + if isinstance(v, collections.abc.MutableMapping): items.extend(list(flatten_dict(v, new_key).items())) else: items.append((new_key, v)) |