File mutating-locals-is-unsupported-in-py-3.13.patch of Package salt
From 6116e40dd4d1be002b9865f21d7ea17607db0087 Mon Sep 17 00:00:00 2001
From: Marek Czernek <marek.czernek@suse.com>
Date: Thu, 17 Jul 2025 16:12:50 +0200
Subject: [PATCH] Mutating locals is unsupported in Py >=3.13
---
salt/utils/thin.py | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/salt/utils/thin.py b/salt/utils/thin.py
index f87b4c8f8d..a326139f6d 100644
--- a/salt/utils/thin.py
+++ b/salt/utils/thin.py
@@ -450,8 +450,7 @@ def get_tops(extra_mods="", so_mods=""):
for mod in [m for m in extra_mods.split(",") if m]:
if mod not in locals() and mod not in globals():
try:
- locals()[mod] = __import__(mod)
- moddir, modname = os.path.split(locals()[mod].__file__)
+ moddir, modname = os.path.split(__import__(mod).__file__)
base, _ = os.path.splitext(modname)
if base == "__init__":
tops.append(moddir)
@@ -464,8 +463,7 @@ def get_tops(extra_mods="", so_mods=""):
for mod in [m for m in so_mods.split(",") if m]:
try:
- locals()[mod] = __import__(mod)
- tops.append(locals()[mod].__file__)
+ tops.append(__import__(mod).__file__)
except ImportError as err:
log.error('Unable to import so-module "%s"', mod, exc_info=True)
--
2.50.1