Kaydet (Commit) 781692ff authored tarafından Brett Cannon's avatar Brett Cannon

Fix module deprecation warnings to have a useful stacklevel

üst 79644f9c
...@@ -21,7 +21,7 @@ manage and inserting data into the output. ...@@ -21,7 +21,7 @@ manage and inserting data into the output.
import sys import sys
import warnings import warnings
warnings.warn('the formatter module is deprecated and will be removed in ' warnings.warn('the formatter module is deprecated and will be removed in '
'Python 3.6', DeprecationWarning) 'Python 3.6', DeprecationWarning, stacklevel=2)
AS_IS = None AS_IS = None
......
...@@ -29,7 +29,7 @@ import warnings ...@@ -29,7 +29,7 @@ import warnings
warnings.warn("the imp module is deprecated in favour of importlib; " warnings.warn("the imp module is deprecated in favour of importlib; "
"see the module's documentation for alternative uses", "see the module's documentation for alternative uses",
PendingDeprecationWarning) PendingDeprecationWarning, stacklevel=2)
# DEPRECATED # DEPRECATED
SEARCH_ERROR = 0 SEARCH_ERROR = 0
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment