Set stacklevel for all deprecation warnings
This commit is contained in:
parent
48daa042d1
commit
e255c35e86
5 changed files with 9 additions and 17 deletions
6
tailbone/views/vendors/catalogs.py
vendored
6
tailbone/views/vendors/catalogs.py
vendored
|
@ -2,7 +2,7 @@
|
|||
################################################################################
|
||||
#
|
||||
# Rattail -- Retail Software Framework
|
||||
# Copyright © 2010-2019 Lance Edgar
|
||||
# Copyright © 2010-2023 Lance Edgar
|
||||
#
|
||||
# This file is part of Rattail.
|
||||
#
|
||||
|
@ -26,13 +26,11 @@
|
|||
Please use `tailbone.views.batch.vendorcatalog` instead.
|
||||
"""
|
||||
|
||||
from __future__ import unicode_literals, absolute_import
|
||||
|
||||
import warnings
|
||||
|
||||
|
||||
def includeme(config):
|
||||
warnings.warn("The `tailbone.views.vendors.catalogs` module is deprecated, "
|
||||
"please use `tailbone.views.batch.vendorcatalog` instead.",
|
||||
DeprecationWarning)
|
||||
DeprecationWarning, stacklevel=2)
|
||||
config.include('tailbone.views.batch.vendorcatalog')
|
||||
|
|
6
tailbone/views/vendors/invoices.py
vendored
6
tailbone/views/vendors/invoices.py
vendored
|
@ -2,7 +2,7 @@
|
|||
################################################################################
|
||||
#
|
||||
# Rattail -- Retail Software Framework
|
||||
# Copyright © 2010-2019 Lance Edgar
|
||||
# Copyright © 2010-2023 Lance Edgar
|
||||
#
|
||||
# This file is part of Rattail.
|
||||
#
|
||||
|
@ -26,13 +26,11 @@
|
|||
Please use `tailbone.views.batch.vendorinvoice` instead.
|
||||
"""
|
||||
|
||||
from __future__ import unicode_literals, absolute_import
|
||||
|
||||
import warnings
|
||||
|
||||
|
||||
def includeme(config):
|
||||
warnings.warn("The `tailbone.views.vendors.invoices` module is deprecated, "
|
||||
"please use `tailbone.views.batch.vendorinvoice` instead.",
|
||||
DeprecationWarning)
|
||||
DeprecationWarning, stacklevel=2)
|
||||
config.include('tailbone.views.batch.vendorinvoice')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue