Skip to content

Commit

Permalink
Disable the setuptools user warning "Setuptools is replacing distutils."
Browse files Browse the repository at this point in the history
Once we stop relying on distutils, this filter can be removed.

Signed-off-by: Pedro Algarvio <palgarvio@vmware.com>
  • Loading branch information
s0undt3ch committed Oct 11, 2022
1 parent 4e1bbec commit 1b7fac1
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
8 changes: 8 additions & 0 deletions salt/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
"""

# pylint: disable=file-perms,resource-leakage
import setuptools # isort:skip

import contextlib
import distutils.dist
import glob
Expand Down

0 comments on commit 1b7fac1

Please sign in to comment.