File fixes-for-python-3.10-502.patch of Package salt

From bbaec891ccb7d82988e830627d4f4294d33babc8 Mon Sep 17 00:00:00 2001
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
---
 salt/state.py | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/salt/state.py b/salt/state.py
index dbfea7d374..c17cef53f2 100644
--- a/salt/state.py
+++ b/salt/state.py
@@ -13,7 +13,6 @@ The data sent to the state calls is as follows:
 
 from __future__ import annotations
 
-import collections
 import copy
 import datetime
 import fnmatch
@@ -31,6 +30,8 @@ from typing import Any, Optional, Union
 
 import networkx as nx
 
+from collections.abc import Mapping
+
 import salt.channel.client
 import salt.fileclient
 import salt.loader
@@ -3128,7 +3129,7 @@ class State:
         """
         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
-- 
2.47.0

openSUSE Build Service is sponsored by