Repository navigation
Closed
Milestone
Description
I noticed the following error today:
def pt_init(self):
def get_prompt_tokens():
return [(Token.Prompt, self.prompt)]
if self._ptcomp is None:
compl = IPCompleter(shell=self.shell,
namespace={},
global_namespace={},
parent=self.shell,
)
self._ptcomp = IPythonPTCompleter(compl)
kb = KeyBindings()
supports_suspend = Condition(lambda: hasattr(signal, 'SIGTSTP'))
kb.add('c-z', filter=supports_suspend)(suspend_to_bg)
if self.shell.display_completions == 'readlinelike':
kb.add('tab', filter=(has_focus(DEFAULT_BUFFER)
& ~has_selection
& vi_insert_mode | emacs_insert_mode
& ~cursor_in_leading_ws
))(display_completions_like_readline)
self.pt_app = PromptSession(
message=(lambda: PygmentsTokens(get_prompt_tokens())),
editing_mode=getattr(EditingMode, self.shell.editing_mode.upper()),
key_bindings=kb,
history=self.shell.debugger_history,
completer=self._ptcomp,
enable_history_search=True,
mouse_support=self.shell.mouse_support,
complete_style=self.shell.pt_complete_style,
style=self.shell.style,
inputhook=self.shell.inputhook,
> color_depth=self.shell.color_depth,
)
E TypeError: __init__() got an unexpected keyword argument 'inputhook'
PromptSession in prompt_toolkit v3 does not have an inputhook parameter - https://github.com/prompt-toolkit/python-prompt-toolkit/blob/4cbbf8b9db1cb11caa1d72f4200c5cbc48bfd384/prompt_toolkit/shortcuts/prompt.py#L340-L383
Reacted by Jean-Alexander Monin Nylund, Iulia Chiriac, Susannah Joyce Doss and Mischa Spiegelmock
Metadata
Metadata
Assignees
Labels
No labels
Activity
iuliachiriac commentedon Nov 29, 2019
There's also a discussion (and some solutions) on this issue here: #11962
Add prompt toolkit 3 compatibility to ipdb
Carreau commentedon Nov 30, 2019
See #11979. I'll try to do a 7.10.1 on monday.
techtonik commentedon Dec 1, 2019
@Carreau but 7.10 is not out, why 7.10.1?
techtonik commentedon Dec 1, 2019
Nevermind. It is on PyPI already https://pypi.org/project/ipython/7.10.0/#files