Fix module deprecation warnings to have a useful stacklevel

This commit is contained in:
Brett Cannon 2015-03-27 12:56:57 -04:00
parent 79644f9c83
commit 781692ff6a
2 changed files with 2 additions and 2 deletions

View file

@ -29,7 +29,7 @@ import warnings
warnings.warn("the imp module is deprecated in favour of importlib; "
"see the module's documentation for alternative uses",
PendingDeprecationWarning)
PendingDeprecationWarning, stacklevel=2)
# DEPRECATED
SEARCH_ERROR = 0