diff --git a/IPython/utils/warn.py b/IPython/utils/warn.py index 07ecf64..bb610ac 100644 --- a/IPython/utils/warn.py +++ b/IPython/utils/warn.py @@ -12,9 +12,9 @@ import sys from IPython.utils import io -from warnings import warn +import warnings -warn("The module IPython.utils.warn is deprecated, use the standard warnings module instead", DeprecationWarning) +warnings.warn("The module IPython.utils.warn is deprecated, use the standard warnings module instead", DeprecationWarning) def warn(msg,level=2,exit_val=1): """Standard warning printer. Gives formatting consistency. @@ -33,7 +33,7 @@ def warn(msg,level=2,exit_val=1): -exit_val (1): exit value returned by sys.exit() for a level 4 warning. Ignored for all other levels.""" - warn("The module IPython.utils.warn is deprecated, use the standard warnings module instead", DeprecationWarning) + warnings.warn("The module IPython.utils.warn is deprecated, use the standard warnings module instead", DeprecationWarning) if level>0: header = ['','','WARNING: ','ERROR: ','FATAL ERROR: '] print(header[level], msg, sep='', file=io.stderr)