Skip to content

Commit 6d245f6

Browse files
committed
fixes #38
1 parent a10eab9 commit 6d245f6

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

execnb/fastshell.py

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
import os, sys, warnings
66
from IPython.core.interactiveshell import InteractiveShell, InteractiveShellABC
7+
from IPython.core.history import HistoryAccessorBase
78
from IPython.core.autocall import ZMQExitAutocall
89
from IPython.core.magic import magics_class, line_magic, Magics
910
from IPython.utils.process import system
@@ -30,12 +31,21 @@ def man(self, arg_s): pass
3031
@line_magic
3132
def autosave(self, arg_s): pass
3233

34+
def noop(*args, **kwargs): return args
35+
36+
class DummyHistory(HistoryAccessorBase):
37+
def __init__(self, *args, **kw): self.enabled=False
38+
def __getattr__(self, k): return noop
39+
_log_validate = False
40+
3341
class FastInteractiveShell(InteractiveShell):
3442
data_pub_class = Any()
35-
#kernel = Any()
3643
parent_header = Any()
3744
exiter = Instance(ZMQExitAutocall)
3845

46+
def init_history(self): self.history_manager=DummyHistory()
47+
def atexit_operations(self, *args, **kwargs): pass
48+
3949
@default('exiter')
4050
def _default_exiter(self): return ZMQExitAutocall(self)
4151

0 commit comments

Comments
 (0)