Incompatibility with prompt_toolkit v3
See original GitHub issueI 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'
This is because ipdb is not compatible with prompt_toolkit
v3.0.0 (released 24th Nov) .
Can you either make ipdb compatible, or specify an upper bound for prompt_toolkit
in the ipdb
requirements please?
Issue Analytics
- State:
- Created 4 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
Incompatibility with prompt_toolkit v3.0.0 · Issue #11975 · ipython ...
I noticed the following error today: def pt_init(self): def get_prompt_tokens(): return [(Token.Prompt, self.prompt)] if self.
Read more >1835511 – python-aiocmd: incompatible with prompt-toolkit 3
Description of problem: The versions of aiocmd and prompt-toolkit shipped in rawhide (f33) are not compatible. Version-Release number of ...
Read more >Asking for input (prompts) - Python Prompt Toolkit 3.0
Prompt -toolkit supports both Emacs and Vi key bindings, similar to Readline. The prompt() function will use Emacs bindings by default. This is...
Read more >Rasa 1.9.3 has requirement prompt-toolkit<3.0,>=2.0, but you ...
... I'm getting this error “rasa 1.9.3 has requirement prompt-toolkit<3.0,>=2.0, but you'll have prompt-toolkit 3.0.5 which is incompatible.
Read more >Incompatible Version of prompt-toolkit - M220P - MongoDB
I add the MongoClient.ipynb to the trust list and select a cell to execute it. The kernel starts but there is this yet...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
As I sometimes merge code done by others I do not always remember it all, this gave me a chance to remember that
prompt_toolkit
is an IPython dependency 😉With
prompt_toolkit==2.0.10
looks working again! 😄