Skip to content

Commit

Permalink
_std: Show caller source in deprecation message
Browse files Browse the repository at this point in the history
  • Loading branch information
jayvdb committed Dec 21, 2019
1 parent 1e99d20 commit de220f3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion py/_std.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ def __init__(self):

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

0 comments on commit de220f3

Please sign in to comment.