From c1ce3a2634079a173bfac85d5ea9afaa0d11db36 2020-02-27 05:21:31 From: Terry Davis <16829776+terrdavis@users.noreply.github.com> Date: 2020-02-27 05:21:31 Subject: [PATCH] Remove None check for fallback cProfile import and ExecutionMagics.profile_missing_notice. This is the fallback for the fallback case of python < 2.5 --- diff --git a/IPython/core/magics/execution.py b/IPython/core/magics/execution.py index e11ce3e..2b26ebe 100644 --- a/IPython/core/magics/execution.py +++ b/IPython/core/magics/execution.py @@ -173,17 +173,9 @@ class ExecutionMagics(Magics): def __init__(self, shell): super(ExecutionMagics, self).__init__(shell) - if profile is None: - self.prun = self.profile_missing_notice # Default execution function used to actually run user code. self.default_runner = None - def profile_missing_notice(self, *args, **kwargs): - error("""\ -The profile module could not be found. It has been removed from the standard -python packages because of its non-free license. To use profiling, install the -python-profiler package from non-free.""") - @skip_doctest @no_var_expand @line_cell_magic