mirror of https://github.com/tqdm/tqdm.git
MNT: set stack level on warnings
This makes it much easier to find where in client code needs to be fixed.
This commit is contained in:
parent
1db4511ec4
commit
fa2e30fb7f
|
@ -4,4 +4,4 @@ from .std import TqdmDeprecationWarning
|
|||
from warnings import warn
|
||||
warn("This function will be removed in tqdm==5.0.0\n"
|
||||
"Please use `tqdm.cli.*` instead of `tqdm._main.*`",
|
||||
TqdmDeprecationWarning)
|
||||
TqdmDeprecationWarning, stacklevel=2)
|
||||
|
|
|
@ -4,4 +4,4 @@ from .std import TqdmDeprecationWarning
|
|||
from warnings import warn
|
||||
warn("This function will be removed in tqdm==5.0.0\n"
|
||||
"Please use `tqdm.gui.*` instead of `tqdm._tqdm_gui.*`",
|
||||
TqdmDeprecationWarning)
|
||||
TqdmDeprecationWarning, stacklevel=2)
|
||||
|
|
|
@ -4,4 +4,4 @@ from .std import TqdmDeprecationWarning
|
|||
from warnings import warn
|
||||
warn("This function will be removed in tqdm==5.0.0\n"
|
||||
"Please use `tqdm.notebook.*` instead of `tqdm._tqdm_notebook.*`",
|
||||
TqdmDeprecationWarning)
|
||||
TqdmDeprecationWarning, stacklevel=2)
|
||||
|
|
|
@ -3,4 +3,4 @@ from .std import TqdmDeprecationWarning
|
|||
from warnings import warn
|
||||
warn("This function will be removed in tqdm==5.0.0\n"
|
||||
"Please use `tqdm.utils.*` instead of `tqdm._utils.*`",
|
||||
TqdmDeprecationWarning)
|
||||
TqdmDeprecationWarning, stacklevel=2)
|
||||
|
|
Loading…
Reference in New Issue