From a7b5afa5c9f2923e575828585c6592b77fdfce3c 2017-09-13 16:13:09 From: Thomas Kluyver Date: 2017-09-13 16:13:09 Subject: [PATCH] Backport PR #10707 on branch 5.x Merge pull request #10707 from Carreau/profile-deprecated Document magic profile as deprecated --- diff --git a/IPython/core/magics/basic.py b/IPython/core/magics/basic.py index 781fa72..ca69e2e 100644 --- a/IPython/core/magics/basic.py +++ b/IPython/core/magics/basic.py @@ -288,12 +288,14 @@ Currently the magic system has the following functions:""", @line_magic def profile(self, parameter_s=''): - """Print your currently active IPython profile. + """DEPRECATED since IPython 2.0. + + Raise `UsageError`. To profile code use the :magic:`prun` magic. + See Also -------- - prun : run code using the Python profiler - (:meth:`~IPython.core.magics.execution.ExecutionMagics.prun`) + prun : run code using the Python profiler (:magic:`prun`) """ warn("%profile is now deprecated. Please use get_ipython().profile instead.") from IPython.core.application import BaseIPythonApplication