From 30a9cf816f8883780e8b0d8a7620db705c0088de Mon Sep 17 00:00:00 2001 From: teutoburg Date: Tue, 19 Nov 2024 16:33:28 +0100 Subject: [PATCH] Don't eat my warnings >.< After some frustration about (intended) warnings that sometimes wouldn't show up, I found out that DeprecationWarnings from *anywhere but the __main__ module* are ignored by default. This is not what we want when we put those in on purpose, so I changed this here. --- scopesim/__init__.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scopesim/__init__.py b/scopesim/__init__.py index 5a80de59..80ac461e 100644 --- a/scopesim/__init__.py +++ b/scopesim/__init__.py @@ -22,7 +22,8 @@ warnings.simplefilter('ignore', UserWarning) warnings.simplefilter('ignore', FutureWarning) -warnings.simplefilter('ignore', RuntimeWarning) # warnings for the developer +warnings.simplefilter('ignore', RuntimeWarning) # warnings for the developer +warnings.simplefilter('default', DeprecationWarning) # allow in general warnings.simplefilter('ignore', category=AstropyWarning) yaml.warnings({'YAMLLoadWarning': False})