Skip to content

Commit

Permalink
Remove input_prefilter hook
Browse files Browse the repository at this point in the history
Our code already doesn't call this hook (as pointed out in ipythongh-4709), and
probably hasn't for some time, so it seems ~no-one is relying on it. We
have much more powerful APIs to do the same thing.
  • Loading branch information
takluyver committed Dec 18, 2013
1 parent e08a633 commit 4786326
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 16 deletions.
17 changes: 1 addition & 16 deletions IPython/core/hooks.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ def load_ipython_extension(ip):
# but over time we'll move here all the public API for user-accessible things.

__all__ = ['editor', 'fix_error_editor', 'synchronize_with_editor',
'input_prefilter', 'shutdown_hook', 'late_startup_hook',
'shutdown_hook', 'late_startup_hook',
'show_in_pager','pre_prompt_hook',
'pre_run_code_hook', 'clipboard_get']

Expand Down Expand Up @@ -151,21 +151,6 @@ def __iter__(self):
return iter(self.chain)


def input_prefilter(self,line):
""" Default input prefilter
This returns the line as unchanged, so that the interpreter
knows that nothing was done and proceeds with "classic" prefiltering
(%magics, !shell commands etc.).
Note that leading whitespace is not passed to this hook. Prefilter
can't alter indentation.
"""
#print "attempt to rewrite",line #dbg
return line


def shutdown_hook(self):
""" default shutdown hook
Expand Down
4 changes: 4 additions & 0 deletions docs/source/whatsnew/pr/incompat-input-prefilter-hook.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
* The ``input_prefilter`` hook has been removed, as it was never
actually used by the code. The input transformer system offers much
more powerful APIs to work with input code. See
:doc:`/config/inputtransforms` for details.

0 comments on commit 4786326

Please sign in to comment.