##// END OF EJS Templates
Turn warning into error as marked in the warning message.
Matthias Bussonnier -
Show More
@@ -89,8 +89,7 b' class InteractiveShellEmbed(TerminalInteractiveShell):'
89
89
90
90
91 if kw.get('user_global_ns', None) is not None:
91 if kw.get('user_global_ns', None) is not None:
92 warnings.warn("user_global_ns has been replaced by user_module. The\
92 raise DeprecationWarning("Key word argument `user_global_ns` has been replaced by `user_module` since IPython 4.0.")
93 parameter will be ignored, and removed in IPython 5.0", DeprecationWarning)
94
93
95 self._call_location_id = kw.pop('_call_location_id', None)
94 self._call_location_id = kw.pop('_call_location_id', None)
96
95
@@ -11,7 +11,7 b' from __future__ import print_function'
11 import sys
11 import sys
12 import warnings
12 import warnings
13
13
14 warnings.warn("The module IPython.utils.warn is deprecated, use the standard warnings module instead", DeprecationWarning)
14 warnings.warn("The module IPython.utils.warn is deprecated since IPython 4.0, use the standard warnings module instead", DeprecationWarning)
15
15
16 def warn(msg,level=2,exit_val=1):
16 def warn(msg,level=2,exit_val=1):
17 """Standard warning printer. Gives formatting consistency.
17 """Standard warning printer. Gives formatting consistency.
@@ -30,7 +30,7 b' def warn(msg,level=2,exit_val=1):'
30 -exit_val (1): exit value returned by sys.exit() for a level 4
30 -exit_val (1): exit value returned by sys.exit() for a level 4
31 warning. Ignored for all other levels."""
31 warning. Ignored for all other levels."""
32
32
33 warnings.warn("The module IPython.utils.warn is deprecated, use the standard warnings module instead", DeprecationWarning)
33 warnings.warn("The module IPython.utils.warn is deprecated since IPython 4.0, use the standard warnings module instead", DeprecationWarning)
34 if level>0:
34 if level>0:
35 header = ['','','WARNING: ','ERROR: ','FATAL ERROR: ']
35 header = ['','','WARNING: ','ERROR: ','FATAL ERROR: ']
36 print(header[level], msg, sep='', file=sys.stderr)
36 print(header[level], msg, sep='', file=sys.stderr)
General Comments 0
You need to be logged in to leave comments. Login now