From e11963c4fc95519df3ac3d3f3cfbb76ae96e8f42 Mon Sep 17 00:00:00 2001 From: Lance Edgar Date: Tue, 14 Feb 2023 15:57:01 -0600 Subject: [PATCH] Show all deprecation warnings occurring within `corepos` pkg --- rattail_corepos/config.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/rattail_corepos/config.py b/rattail_corepos/config.py index 75f8f76..bc3309b 100644 --- a/rattail_corepos/config.py +++ b/rattail_corepos/config.py @@ -24,6 +24,8 @@ Rattail-COREPOS Config Extension """ +import warnings + from rattail.config import ConfigExtension from rattail.db.config import get_engines @@ -36,6 +38,11 @@ class RattailCOREPOSExtension(ConfigExtension): def configure(self, config): + # show deprecation warnings by default, when they occur in corepos + # (nb. rattail_corepos warnings are already shown, per rattail) + warnings.filterwarnings('default', category=DeprecationWarning, + module=r'^corepos') + # office_op from corepos.db.office_op import Session engines = get_engines(config, section='corepos.db.office_op')