Skip to content

Upgrading prompt_toolkit 0.54 to 0.55

Breaking0.54 → 0.55Breaking6Deprecated1New22Changed5Fixed6

BreakingUpgrade verdict

6 breaking changes.

  • The built-in default style is gone; build a Pygments style from defaults instead.
  • The IGNORE abort action no longer exists.
  • Code that read style attributes through the old method must switch to the new one.
  • These functions now take the command line interface as an argument.
Top 4 of 7 that need code or config changes
Breaking6
Removes DefaultStyle and adds the PygmentsStyle.from_defaults class method instead.
DefaultStylePygmentsStyle.from_defaults
Removes AbortAction.IGNORE because it was ambiguous.
AbortAction.IGNORE
Changes the Style API: get_attrs_for_token replaces get_token_to_attributes_dict, enabling Attrs caching and faster rendering.
StyleStyle.get_attrs_for_tokenStyle.get_token_to_attributes_dict
Accepts a 'cli' parameter in 'walk' and 'find_window_for_buffer_name'.
walkfind_window_for_buffer_namecli
Stores the focus stack in BufferMapping.
BufferMapping
ViStateFilter and KeyBindingManager now accept a get_vi_state callable instead of vi_state itself, making the key bindings registry stateless.
ViStateFilterKeyBindingManagerget_vi_statevi_state
Deprecated1
Deprecates HighlightSearchProcessor and HighlightSelectionProcessor in favor of highlighters.
HighlightSearchProcessorHighlightSelectionProcessor