9b3b2cf320
PR: 267845 Reported by: i.dani at outlookdottcom
48 lines
1.2 KiB
Diff
48 lines
1.2 KiB
Diff
From 1b7fac1599a50c970fdef49abca7151cb11bdcd0 Mon Sep 17 00:00:00 2001
|
|
From: Pedro Algarvio <palgarvio@vmware.com>
|
|
Date: Tue, 11 Oct 2022 21:19:21 +0100
|
|
Subject: [PATCH] Disable the setuptools user warning "Setuptools is replacing
|
|
distutils."
|
|
|
|
Once we stop relying on distutils, this filter can be removed.
|
|
|
|
Signed-off-by: Pedro Algarvio <palgarvio@vmware.com>
|
|
---
|
|
salt/__init__.py | 8 ++++++++
|
|
setup.py | 2 ++
|
|
2 files changed, 10 insertions(+)
|
|
|
|
diff --git a/salt/__init__.py b/salt/__init__.py
|
|
index ebc54ac8443c..ec551abbc62a 100644
|
|
--- salt/__init__.py
|
|
+++ salt/__init__.py
|
|
@@ -69,6 +69,14 @@ def load_module(self, name):
|
|
append=True,
|
|
)
|
|
|
|
+# Filter the setuptools UserWarning until we stop relying on distutils
|
|
+warnings.filterwarnings(
|
|
+ "ignore",
|
|
+ message="Setuptools is replacing distutils.",
|
|
+ category=UserWarning,
|
|
+ module="_distutils_hack",
|
|
+)
|
|
+
|
|
|
|
def __define_global_system_encoding_variable__():
|
|
import sys
|
|
diff --git a/setup.py b/setup.py
|
|
index 0fac50ab4bc6..9d994ac8730c 100755
|
|
--- setup.py
|
|
+++ setup.py
|
|
@@ -4,6 +4,8 @@
|
|
"""
|
|
|
|
# pylint: disable=file-perms,resource-leakage
|
|
+import setuptools # isort:skip
|
|
+
|
|
import contextlib
|
|
import distutils.dist
|
|
import glob
|
|
|