Show all deprecation warnings occurring within corepos
pkg
This commit is contained in:
parent
cb58a26cb1
commit
e11963c4fc
|
@ -24,6 +24,8 @@
|
||||||
Rattail-COREPOS Config Extension
|
Rattail-COREPOS Config Extension
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
import warnings
|
||||||
|
|
||||||
from rattail.config import ConfigExtension
|
from rattail.config import ConfigExtension
|
||||||
from rattail.db.config import get_engines
|
from rattail.db.config import get_engines
|
||||||
|
|
||||||
|
@ -36,6 +38,11 @@ class RattailCOREPOSExtension(ConfigExtension):
|
||||||
|
|
||||||
def configure(self, config):
|
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
|
# office_op
|
||||||
from corepos.db.office_op import Session
|
from corepos.db.office_op import Session
|
||||||
engines = get_engines(config, section='corepos.db.office_op')
|
engines = get_engines(config, section='corepos.db.office_op')
|
||||||
|
|
Loading…
Reference in a new issue