diff --git a/IPython/utils/warn.py b/IPython/utils/warn.py index 1b67423..127f692 100644 --- a/IPython/utils/warn.py +++ b/IPython/utils/warn.py @@ -10,11 +10,15 @@ from __future__ import print_function import sys import warnings +from IPython.utils.decorators import undoc warnings.warn("The module IPython.utils.warn is deprecated since IPython 4.0, use the standard warnings module instead", DeprecationWarning) +@undoc def warn(msg,level=2,exit_val=1): - """Standard warning printer. Gives formatting consistency. + """Deprecated + + Standard warning printer. Gives formatting consistency. Output is sent to io.stderr (sys.stderr by default). @@ -39,19 +43,28 @@ def warn(msg,level=2,exit_val=1): sys.exit(exit_val) +@undoc def info(msg): - """Equivalent to warn(msg,level=1).""" + """Deprecated + + Equivalent to warn(msg,level=1).""" warn(msg,level=1) +@undoc def error(msg): - """Equivalent to warn(msg,level=3).""" + """Deprecated + + Equivalent to warn(msg,level=3).""" warn(msg,level=3) +@undoc def fatal(msg,exit_val=1): - """Equivalent to warn(msg,exit_val=exit_val,level=4).""" + """Deprecated + + Equivalent to warn(msg,exit_val=exit_val,level=4).""" warn(msg,exit_val=exit_val,level=4) diff --git a/docs/Makefile b/docs/Makefile index 4f2a73b..46add14 100644 --- a/docs/Makefile +++ b/docs/Makefile @@ -87,7 +87,7 @@ source/api/generated/gen.txt: $(PYTHON) autogen_api.py @echo "Build API docs finished." -autogen_shortcuts: autogen_shortcuts.py ../IPython/terminal/interactiveshell.py +autogen_shortcuts: autogen_shortcuts.py ../IPython/terminal/interactiveshell.py source/config/shortcuts/index.rst $(PYTHON) autogen_shortcuts.py @echo "Created docs for shortcuts" diff --git a/docs/source/config/shortcuts/index.rst b/docs/source/config/shortcuts/index.rst index 9905f07..29088f6 100755 --- a/docs/source/config/shortcuts/index.rst +++ b/docs/source/config/shortcuts/index.rst @@ -4,7 +4,7 @@ IPython shortcuts Available shortcut in IPython terminal. -.. warnings:: +.. warning:: This list is automatically generated, and may not hold all the available shortcut. In particular, it may depends on the version of ``prompt_toolkit``