summaryrefslogtreecommitdiff
path: root/oslo_policy/shell.py
diff options
context:
space:
mode:
authorCyril Roelandt <cyril@redhat.com>2021-01-29 18:21:30 +0100
committerCyril Roelandt <cyril@redhat.com>2021-01-29 18:36:28 +0100
commit424ff50a4fa7f2134304e282155c1eaafa38e683 (patch)
treeda020fb14594f3b3f95c389f963ee6b26f34451d /oslo_policy/shell.py
parente103baa002e54303b08630c436dfc7b0b8a013de (diff)
downloadoslo-policy-424ff50a4fa7f2134304e282155c1eaafa38e683.tar.gz
Switch to collections.abc.MutableMapping
collections.MutableMapping has been deprecated since Python 3.3 and is removed in Python 3.10. The functionality should be identical. Change-Id: Ic96309fef409ba01dd24a3a70ff132a9f5352f9c
Diffstat (limited to 'oslo_policy/shell.py')
-rw-r--r--oslo_policy/shell.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/oslo_policy/shell.py b/oslo_policy/shell.py
index 7ffb5ea..da1bf1e 100644
--- a/oslo_policy/shell.py
+++ b/oslo_policy/shell.py
@@ -13,7 +13,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-import collections
+import collections.abc
import sys
from oslo_serialization import jsonutils
@@ -59,7 +59,7 @@ def flatten(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(flatten(v, new_key).items())
else:
items.append((new_key, v))