mirror of https://github.com/mahmoud/boltons.git
add appropriate stacklevel to deprutils warning
This commit is contained in:
parent
e6ad48f7f9
commit
397222dc95
|
@ -23,7 +23,7 @@ class DeprecatableModule(ModuleType):
|
||||||
ret = get_attribute(name)
|
ret = get_attribute(name)
|
||||||
message = depros.get(name)
|
message = depros.get(name)
|
||||||
if message is not None:
|
if message is not None:
|
||||||
warn(message, DeprecationWarning)
|
warn(message, DeprecationWarning, stacklevel=2)
|
||||||
return ret
|
return ret
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue