Skip to content

Commit

Permalink
Put back deprecation warnings
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
waynew authored and s0undt3ch committed Dec 20, 2022
1 parent 168d2c9 commit 25d6780
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions changelog/62185.fixed
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Restored Salt's DeprecationWarnings
3 changes: 2 additions & 1 deletion salt/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,8 @@ def load_module(self, name):
"", # No deprecation message match
DeprecationWarning, # This filter is for DeprecationWarnings
r"^(salt|salt\.(.*))$", # Match module(s) 'salt' and 'salt.<whatever>'
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
Expand Down

0 comments on commit 25d6780

Please sign in to comment.