2023-01-10 13:44:14 +01:00
|
|
|
From d5fae6bd4a4f243115ee220393e05440f0d48b5a Mon Sep 17 00:00:00 2001
|
2022-04-12 14:13:31 +02:00
|
|
|
From: Victor Zhestkov <vzhestkov@suse.com>
|
|
|
|
Date: Tue, 5 Apr 2022 12:04:46 +0300
|
|
|
|
Subject: [PATCH] Fixes for Python 3.10 (#502)
|
|
|
|
|
|
|
|
* Use collections.abc.Mapping instead collections.Mapping in state
|
|
|
|
---
|
2023-01-10 13:44:14 +01:00
|
|
|
salt/state.py | 5 +++--
|
|
|
|
1 file changed, 3 insertions(+), 2 deletions(-)
|
2022-04-12 14:13:31 +02:00
|
|
|
|
|
|
|
diff --git a/salt/state.py b/salt/state.py
|
2023-01-10 13:44:14 +01:00
|
|
|
index f5579fbb69..61519d5042 100644
|
2022-04-12 14:13:31 +02:00
|
|
|
--- a/salt/state.py
|
|
|
|
+++ b/salt/state.py
|
|
|
|
@@ -12,7 +12,6 @@ The data sent to the state calls is as follows:
|
|
|
|
"""
|
|
|
|
|
|
|
|
|
|
|
|
-import collections
|
|
|
|
import copy
|
|
|
|
import datetime
|
|
|
|
import fnmatch
|
2023-01-10 13:44:14 +01:00
|
|
|
@@ -26,6 +25,8 @@ import sys
|
2022-04-12 14:13:31 +02:00
|
|
|
import time
|
|
|
|
import traceback
|
2023-01-09 13:52:13 +01:00
|
|
|
|
2023-01-10 13:44:14 +01:00
|
|
|
+from collections.abc import Mapping
|
|
|
|
+
|
2023-01-09 13:52:13 +01:00
|
|
|
import salt.channel.client
|
2022-04-12 14:13:31 +02:00
|
|
|
import salt.fileclient
|
2023-01-10 13:44:14 +01:00
|
|
|
import salt.loader
|
|
|
|
@@ -3405,7 +3406,7 @@ class State:
|
2022-04-12 14:13:31 +02:00
|
|
|
"""
|
|
|
|
for chunk in high:
|
|
|
|
state = high[chunk]
|
|
|
|
- if not isinstance(state, collections.Mapping):
|
|
|
|
+ if not isinstance(state, Mapping):
|
|
|
|
continue
|
|
|
|
for state_ref in state:
|
|
|
|
needs_default = True
|
|
|
|
--
|
2023-01-09 13:52:13 +01:00
|
|
|
2.37.3
|
2022-04-12 14:13:31 +02:00
|
|
|
|
|
|
|
|