##// END OF EJS Templates
MAINT: Move `InputRejected` to `IPython.core.error`.
Scott Sanderson -
Show More
@@ -51,3 +51,10 b' class StdinNotImplementedError(IPythonCoreError, NotImplementedError):'
51 51 For use in IPython kernels, where only some frontends may support
52 52 stdin requests.
53 53 """
54
55 class InputRejected(Exception):
56 """Input rejected by ast transformer.
57
58 Raise this in your NodeTransformer to indicate that InteractiveShell should
59 not execute the supplied input.
60 """
@@ -41,7 +41,7 b' from IPython.core.compilerop import CachingCompiler, check_linecache_ipython'
41 41 from IPython.core.display_trap import DisplayTrap
42 42 from IPython.core.displayhook import DisplayHook
43 43 from IPython.core.displaypub import DisplayPublisher
44 from IPython.core.error import UsageError
44 from IPython.core.error import InputRejected, UsageError
45 45 from IPython.core.extensions import ExtensionManager
46 46 from IPython.core.formatters import DisplayFormatter
47 47 from IPython.core.history import HistoryManager
@@ -54,7 +54,6 b' from IPython.core.profiledir import ProfileDir'
54 54 from IPython.core.prompts import PromptManager
55 55 from IPython.core.usage import default_banner
56 56 from IPython.lib.latextools import LaTeXTool
57 from IPython.lib.security import InputRejected
58 57 from IPython.testing.skipdoctest import skip_doctest
59 58 from IPython.utils import PyColorize
60 59 from IPython.utils import io
@@ -24,8 +24,8 b' from os.path import join'
24 24
25 25 import nose.tools as nt
26 26
27 from IPython.core.error import InputRejected
27 28 from IPython.core.inputtransformer import InputTransformer
28 from IPython.lib.security import InputRejected
29 29 from IPython.testing.decorators import (
30 30 skipif, skip_win32, onlyif_unicode_paths, onlyif_cmds_exist,
31 31 )
@@ -114,13 +114,3 b' def passwd_check(hashed_passphrase, passphrase):'
114 114 h.update(cast_bytes(passphrase, 'utf-8') + cast_bytes(salt, 'ascii'))
115 115
116 116 return h.hexdigest() == pw_digest
117
118 #-----------------------------------------------------------------------------
119 # Exception classes
120 #-----------------------------------------------------------------------------
121 class InputRejected(Exception):
122 """Input rejected by ast transformer.
123
124 To be raised by user-supplied ast.NodeTransformers when an input should not
125 be executed.
126 """
General Comments 0
You need to be logged in to leave comments. Login now