Upgrading prompt_toolkit 0.54 to 0.55
Breaking0.54 → 0.55Breaking6Deprecated1New22Changed5Fixed6
BreakingUpgrade verdict
6 breaking changes.
In plain terms
- 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.
Must act Top 4 of 7 that need code or config changes
What you must change
Breaking6
Removes DefaultStyle and adds the PygmentsStyle.from_defaults class method instead.
DefaultStylePygmentsStyle.from_defaultsRemoves AbortAction.IGNORE because it was ambiguous.
AbortAction.IGNOREChanges 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_dictAccepts a 'cli' parameter in 'walk' and 'find_window_for_buffer_name'.
walkfind_window_for_buffer_namecliStores the focus stack in BufferMapping.
BufferMappingViStateFilter and KeyBindingManager now accept a get_vi_state callable instead of vi_state itself, making the key bindings registry stateless.
ViStateFilterKeyBindingManagerget_vi_statevi_stateDeprecations to plan for
Deprecated1
Deprecates HighlightSearchProcessor and HighlightSelectionProcessor in favor of highlighters.
HighlightSearchProcessorHighlightSelectionProcessor