mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
Fix module deprecation warnings to have a useful stacklevel
This commit is contained in:
parent
79644f9c83
commit
781692ff6a
2 changed files with 2 additions and 2 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue