diff --git a/IPython/terminal/embed.py b/IPython/terminal/embed.py index d893c48..e69c86c 100644 --- a/IPython/terminal/embed.py +++ b/IPython/terminal/embed.py @@ -89,8 +89,7 @@ class InteractiveShellEmbed(TerminalInteractiveShell): if kw.get('user_global_ns', None) is not None: - warnings.warn("user_global_ns has been replaced by user_module. The\ - parameter will be ignored, and removed in IPython 5.0", DeprecationWarning) + raise DeprecationWarning("Key word argument `user_global_ns` has been replaced by `user_module` since IPython 4.0.") self._call_location_id = kw.pop('_call_location_id', None) diff --git a/IPython/utils/warn.py b/IPython/utils/warn.py index eee175b..1b67423 100644 --- a/IPython/utils/warn.py +++ b/IPython/utils/warn.py @@ -11,7 +11,7 @@ from __future__ import print_function import sys import warnings -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 since IPython 4.0, use the standard warnings module instead", DeprecationWarning) def warn(msg,level=2,exit_val=1): """Standard warning printer. Gives formatting consistency. @@ -30,7 +30,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.""" - 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 since IPython 4.0, use the standard warnings module instead", DeprecationWarning) if level>0: header = ['','','WARNING: ','ERROR: ','FATAL ERROR: '] print(header[level], msg, sep='', file=sys.stderr)