From 3b06d1ed7cb9484727f4108d24e46e2aacfeb6ba Mon Sep 17 00:00:00 2001 From: Wayne Werner Date: Tue, 13 Dec 2022 13:15:23 -0600 Subject: [PATCH] Put back deprecation warnings Checked the https://docs.python.org/3/library/warnings.html#warnings.filterwarnings docs but there wasn't any obvious reason why our warnings disappear. This restores the DeprecationWarnings showing up on the command line. --- changelog/62185.fixed | 1 + salt/__init__.py | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) create mode 100644 changelog/62185.fixed diff --git a/changelog/62185.fixed b/changelog/62185.fixed new file mode 100644 index 00000000000..e0329c8bf33 --- /dev/null +++ b/changelog/62185.fixed @@ -0,0 +1 @@ +Restored Salt's DeprecationWarnings diff --git a/salt/__init__.py b/salt/__init__.py index 8b72c9e6f0f..ff7be787fb9 100644 --- a/salt/__init__.py +++ b/salt/__init__.py @@ -70,7 +70,8 @@ warnings.filterwarnings( "", # No deprecation message match DeprecationWarning, # This filter is for DeprecationWarnings r"^(salt|salt\.(.*))$", # Match module(s) 'salt' and 'salt.' - append=True, + # Do *NOT* add append=True here - if we do, salt's DeprecationWarnings will + # never show up ) # Filter the backports package UserWarning about being re-imported