Upgrading prompt_toolkit 0.20 to 0.21
Review needed0.20 → 0.21New1Changed1Fixed2Other1
Review neededUpgrade verdict
1 behavior change.
In plain terms
- The package now registers itself through Python's standard entry point mechanism when installed.
Must act Nothing to change
No breaking, platform, security or deprecated items in this range.
Nothing in this upgrade needs a code or configuration change.
API changes
Generated by DepDelta from published Python source. Not mixed with prose notes.
- removed:
field CommandLineInterface.input_timeout - removed:
field CommandLineInterface.stdin_decoder_cls - removed:
method CommandLineInterface.create_input_processor(key_binding_factories) - changed:
constructor CommandLineInterface(stdin=…, stdout=…, layout=…, line=…, default_input_mode=…, style=…, key_binding_factories=…, create_async_autocompleters=…, renderer_factory=…) → constructor CommandLineInterface(stdin=…, stdout=…, layout=…, line=…, style=…, key_binding_factories=…, create_async_autocompleters=…, renderer_factory=…) - changed:
method CommandLineInterface.read_input(initial_value=…, on_abort=…, on_exit=…) → method CommandLineInterface.read_input(initial_value=…, initial_input_mode=…, on_abort=…, on_exit=…) - added:
class Abort(Exception) - added:
class Exit(Exception) - added:
property CommandLineInterface.is_reading_input
- added:
function run()
- added:
function run()
- added:
class BaseEventLoop(object) - added:
constructor BaseEventLoop(input_processor, stdin) - added:
field BaseEventLoop.input_timeout - added:
method BaseEventLoop.call_from_executor(callback) - added:
method BaseEventLoop.close() - added:
method BaseEventLoop.loop() - added:
method BaseEventLoop.process_queued_calls_from_executor() - added:
method BaseEventLoop.run_in_executor(callback)
- added:
class PosixEventLoop(BaseEventLoop) - added:
class call_on_sigwinch(object) - added:
constructor PosixEventLoop(input_processor, stdin) - added:
constructor call_on_sigwinch(callback) - added:
field PosixEventLoop.stdin_decoder_cls - added:
method PosixEventLoop.call_from_executor(callback) - added:
method PosixEventLoop.close() - added:
method PosixEventLoop.loop()
- added:
class Win32EventLoop(BaseEventLoop) - added:
constructor Win32EventLoop(input_processor, stdin) - added:
method Win32EventLoop.call_from_executor(callback) - added:
method Win32EventLoop.close() - added:
method Win32EventLoop.loop()
- removed:
class InputStream(object) - removed:
constructor InputStream(input_processor) - removed:
field InputStream.mappings - removed:
method InputStream.feed(data) - removed:
method InputStream.flush() - removed:
method InputStream.prepare_terminal(stdout) - removed:
method InputStream.reset(request=…)
- changed:
method InputProcessor.reset(default_input_mode=…) → method InputProcessor.reset(initial_input_mode=…) - added:
class KeyPress(object) - added:
constructor KeyPress(key, data)
- removed:
class CompletionMenu(object) - removed:
constructor CompletionMenu(max_height=…, line_name=…) - removed:
method CompletionMenu.get_height(complete_state) - removed:
method CompletionMenu.get_menu_item_meta_tokens(completion, is_current_completion, width) - removed:
method CompletionMenu.get_menu_item_tokens(completion, is_current_completion, width) - removed:
method CompletionMenu.get_menu_meta_width(screen, complete_state) - removed:
method CompletionMenu.get_menu_width(screen, complete_state) - removed:
method CompletionMenu.is_visible(cli) - removed:
method CompletionMenu.show_meta(complete_state) - removed:
method CompletionMenu.write(screen, complete_cursor_position, complete_state) - added:
class CompletionsMenu(object) - added:
constructor CompletionsMenu(max_height=…, line_name=…) - added:
method CompletionsMenu.get_height(complete_state) - added:
method CompletionsMenu.get_menu_item_meta_tokens(completion, is_current_completion, width) - added:
method CompletionsMenu.get_menu_item_tokens(completion, is_current_completion, width) - added:
method CompletionsMenu.get_menu_meta_width(screen, complete_state) - added:
method CompletionsMenu.get_menu_width(screen, complete_state) - added:
method CompletionsMenu.is_visible(cli) - added:
method CompletionsMenu.show_meta(complete_state) - added:
method CompletionsMenu.write(screen, complete_cursor_position, complete_state)
- removed:
method Renderer.get_size() - removed:
method Renderer.render_to_str(cli)
- added:
class InputStream(object) - added:
class cooked_mode(raw_mode) - added:
class raw_mode(object) - added:
constructor InputStream(input_processor) - added:
constructor raw_mode(fileno) - added:
field InputStream.mappings - added:
method InputStream.feed(data) - added:
method InputStream.flush() - added:
method InputStream.reset(request=…)
- added:
class Vt100_Output(object) - added:
constructor Vt100_Output(stdout) - added:
method Vt100_Output.carriage_return() - added:
method Vt100_Output.cursor_backward(amount) - added:
method Vt100_Output.cursor_down(amount) - added:
method Vt100_Output.cursor_forward(amount) - added:
method Vt100_Output.cursor_goto(row=…, column=…) - added:
method Vt100_Output.cursor_up(amount) - added:
method Vt100_Output.disable_autowrap() - added:
method Vt100_Output.enable_autowrap() - added:
method Vt100_Output.erase_down() - added:
method Vt100_Output.erase_end_of_line() - added:
method Vt100_Output.erase_screen() - added:
method Vt100_Output.flush() - added:
method Vt100_Output.get_size() - added:
method Vt100_Output.newline() - added:
method Vt100_Output.reset_attributes() - added:
method Vt100_Output.set_attributes(fgcolor=…, bgcolor=…, bold=…, underline=…) - added:
method Vt100_Output.write(data)
- added:
class ConsoleInputReader(object) - added:
class cooked_mode(raw_mode) - added:
class raw_mode(object) - added:
constructor ConsoleInputReader() - added:
constructor raw_mode(fileno=…) - added:
field ConsoleInputReader.LEFT_ALT_PRESSED - added:
field ConsoleInputReader.LEFT_CTRL_PRESSED - added:
field ConsoleInputReader.RIGHT_ALT_PRESSED - added:
field ConsoleInputReader.RIGHT_CTRL_PRESSED - added:
field ConsoleInputReader.SHIFT_PRESSED - added:
field ConsoleInputReader.keycodes - added:
field ConsoleInputReader.mappings - added:
method ConsoleInputReader.read()
- added:
class Win32Output(object) - added:
constructor Win32Output(stdout, use_complete_width=…) - added:
method Win32Output.cursor_backward(amount) - added:
method Win32Output.cursor_down(amount) - added:
method Win32Output.cursor_forward(amount) - added:
method Win32Output.cursor_goto(row=…, column=…) - added:
method Win32Output.cursor_up(amount) - added:
method Win32Output.disable_autowrap() - added:
method Win32Output.enable_autowrap() - added:
method Win32Output.erase_down() - added:
method Win32Output.erase_end_of_line() - added:
method Win32Output.erase_screen() - added:
method Win32Output.flush() - added:
method Win32Output.get_rows_below_cursor_position() - added:
method Win32Output.get_size() - added:
method Win32Output.reset_attributes() - added:
method Win32Output.scroll_buffer_to_prompt() - added:
method Win32Output.set_attributes(fgcolor, bgcolor, bold=…, underline=…) - added:
method Win32Output.write(data)
- removed:
class call_on_sigwinch(object) - removed:
class cooked_mode(raw_mode) - removed:
class raw_mode(object) - removed:
constructor call_on_sigwinch(callback) - removed:
constructor raw_mode(fileno) - removed:
function get_size(fileno) - added:
class DummyContext(object)
- added:
class CONSOLE_SCREEN_BUFFER_INFO(Structure) - added:
class COORD(Structure) - added:
class EVENT_RECORD(Union) - added:
class FOCUS_EVENT_RECORD(Structure) - added:
class INPUT_RECORD(Structure) - added:
class KEY_EVENT_RECORD(Structure) - added:
class MENU_EVENT_RECORD(Structure) - added:
class MOUSE_EVENT_RECORD(Structure) - added:
class SECURITY_ATTRIBUTES(Structure) - added:
class SMALL_RECT(Structure) - added:
class WINDOW_BUFFER_SIZE_RECORD(Structure) - added:
variable EventTypes - added:
variable STD_ERROR_HANDLE - added:
variable STD_INPUT_HANDLE - added:
variable STD_OUTPUT_HANDLE