From 12b4da798078cc24ea679cb115b252022a60786f Mon Sep 17 00:00:00 2001 From: Manuel Schlund Date: Mon, 31 Aug 2026 13:29:40 +0200 Subject: [PATCH 1/2] Show warnings from py.warnings logger --- esmvalcore/config/config-logging.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/esmvalcore/config/config-logging.yml b/esmvalcore/config/config-logging.yml index 3e1b473036..b8088dd43d 100644 --- a/esmvalcore/config/config-logging.yml +++ b/esmvalcore/config/config-logging.yml @@ -12,7 +12,7 @@ formatters: filters: only_ours: # only keep events from known loggers (): esmvalcore.config._logging.FilterMultipleNames - names: [esmvalcore, esmvaltool, intake-esgf] + names: [esmvalcore, esmvaltool, intake-esgf, py.warnings] mode: allow only_cmor: # only events from CMOR check and generic fixes (): esmvalcore.config._logging.FilterMultipleNames From 1b0aa0b569cb622b17beab024df50372c88a3b8b Mon Sep 17 00:00:00 2001 From: Manuel Schlund Date: Mon, 31 Aug 2026 13:30:22 +0200 Subject: [PATCH 2/2] Use our ESMValCoreDeprecationWarning instead of DeprecationWarning --- esmvalcore/local.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/esmvalcore/local.py b/esmvalcore/local.py index e125602d7c..058e9c50e3 100644 --- a/esmvalcore/local.py +++ b/esmvalcore/local.py @@ -21,7 +21,7 @@ get_project_config, load_config_developer, ) -from esmvalcore.exceptions import RecipeError +from esmvalcore.exceptions import ESMValCoreDeprecationWarning, RecipeError from esmvalcore.io.local import ( LocalDataSource, LocalFile, @@ -212,7 +212,7 @@ def find_files( "The function 'esmvalcore.local.find_files' is deprecated and will be removed " "in version 2.16.0. Please use 'esmvalcore.local.LocalDataSource.find_data'" ) - warnings.warn(msg, DeprecationWarning, stacklevel=2) + warnings.warn(msg, ESMValCoreDeprecationWarning, stacklevel=2) facets = dict(facets) if "original_short_name" in facets: