Skip to content

Commit

Permalink
_std: show caller source in deprecation message (#228)
Browse files Browse the repository at this point in the history
Closes #227
  • Loading branch information
jayvdb committed Mar 31, 2020
1 parent 962ad13 commit 24a4e6a
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions py/_std.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,9 @@ def __init__(self):
self.__dict__ = sys.modules

def __getattr__(self, name):
warnings.warn("py.std is deprecated, plase import %s directly" % name,
category=PyStdIsDeprecatedWarning)
warnings.warn("py.std is deprecated, please import %s directly" % name,
category=PyStdIsDeprecatedWarning,
stacklevel=2)
try:
m = __import__(name)
except ImportError:
Expand Down

0 comments on commit 24a4e6a

Please sign in to comment.