Prompt-toolkit

Latest version: v3.0.50

Safety actively analyzes 706267 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 12 of 22

1.0.4

Not secure
-----------------

Fixes:
- Key binding fixes:
* Improved handling of repeat arguments in Emacs mode. Pressing sequences
like 'esc---123' do now work (like GNU Readline):
- repetition of the minus sign is ignored.
- No esc prefix is required for each digit.
* Fix in ControlX-ControlX binding.
* Fix in bracketed paste.
* Pressing Control-U at the start of the line now deletes the newline.
* Pressing Control-K at the end of the line, deletes the newline after
the cursor.
* Support negative argument for Control-K
* Fixed cash when left/right were pressed with a negative argument. (In
Emacs mode.)
* Fix in ControlUp/ControlDown key bindings.
* Distinguish backspace from Control-H. They are not the same.
* Delete in front of the cursor when a negative argument has been given
to backspace.
* Handle arrow keys correctly in emacs-term.
- Performance optimizations:
* Performance optimization in Registry.
* Several performance optimization in filters.
* Import asyncio inline (only if required).
- Use the best possible selector in the event loop. This fixes bugs in
situations where we have too many open file descriptors.
- Fix UI freeze when gevent monkey patch has been applied.
- Fix segmentation fault in Alpine Linux. (Regarding the use of ioctl.)
- Use the correct colors on Windows. (When the foreground/background colors
have been modified.)
- Display a better error message when running in Idle.
- Additional flags for vt100 inputs: disable flow control.
- Also patch stderr in CommandLineInterface.patch_stdout_context.

New features:
- Allow users to enter Vi digraphs in reverse order.
- Improved autocompletion behavior. See IPython issue 9658.
- Added a 'clear' function in the shortcuts module.

For future compatibility:
- `Keys.Enter` has been added. This is the key that should be bound for
handling the enter key.

Right now, prompt_toolkit translates \r into \n during the handling of the
input; this is not correct and makes it impossible to distinguish between
ControlJ and ControlM. Some applications bind ControlJ for custom handling of
the enter key, because this equals \n. However, in a future version we will
stop replacing \r by \n and at that point, the enter key will be ControlM.
So better is to use `Keys.Enter`, which becomes an alias for whatever the
enter key translates into.

1.0.3

Not secure
-----------------

Fixes:
- Bugfix for Python2 in readline-like completion.
- Bugfix in readline-like completion visualization.

New features:
- Added `erase_when_done` parameter to the `Application` class. (This was
required for the bug fixes.)
- Added (experimental) `CommandLineInterface.run_application_generator` method.
(Also required for the bug fix.)

1.0.2

Not secure
-----------------

Fixes:
- Don't select the first completion when `complete_while_typing` is False.
(Restore the old behavior.)

1.0.1

Not secure
-----------------

Fixes:
- Bugfix in GrammarValidator and SentenceValidator.
- Don't leave the alternate screen on resize events.
- Use errors=surrogateescape, in order to handle mouse events in some
terminals.
- Ignore key presses in _InterfaceEventLoopCallbacks.feed_key when the CLI is in the done state.
- Bugfix in get_common_complete_suffix. Don't return any suffix when there are
completions that change whatever is before the cursor.
- Bugfix for Win32/Python2: use unicode literals: This crashed arrow navigation
on Windows.
- Bugfix in InputProcessor: handling of more complex key bindings.
- Fix: don't apply completions, if there is only one completion which doesn't
have any effect.
- Fix: correctly handle prompts starting with a newline in
prompt_toolkit.shortcuts.
- Fix: thread safety in autocomplete code.
- Improve styling for matching brackets. (Allow individual styling for the
bracket under the cursor and the other.)
- Fix in ShowLeadingWhiteSpaceProcessor/ShowTrailingWhiteSpaceProcessor: take
output encoding into account. (The signature had to change a little for
this.)
- Bug fix in key bindings: only activate Emacs system/open-in-editor bindings
if editing_mode is emacs.
- Added write_binary parameter to Vt100_Output. This fixes a bug in some cases
where we expect it to write non-encoded strings.
- Fix key bindings for Vi mode registers.

New features (**):
- Added shortcuts.confirm/create_confirm_application function.
- Emulate bracketed paste on Windows. (When the input stream contains multiple
key presses among which a newline and at least one other character, consider
this a paste event, and handle as bracketed paste on Unix.
- Added key handler for displaying completions, just like readline does.
- Implemented Vi guu,gUU,g~~ key bindings.
- Implemented Vi 'gJ' key binding.
- Implemented Vi ab,ib,aB,iB text objects.
- Support for ZeroWidthEscape tokens in prompt and token lists. Used to support
final shell integration.
- Fix: Make document.text/cursor_position/selection read-only. (Changing these
would break the caching causing bigger issues.)
- Using pytest for unit tests.
- Allow key bindings to have Keys.Any at any possible position. (Not just the
end.) This made it significantly easier to write the named register Vi
bindings, resulting in an approved start-up time.)
- Better feedback when entering multi-key key bindings in insert mode. (E.g.
when 'jj' would be mapped to escape.)
- Small improvement in key processor: allow key bindings to generate new key
presses.
- Handle ControlUp and ControlDown by default: move to the previous/next record
in the history.
- Accept 'char'/'get_char' parameters in FillControl.
- Added refresh_interval method to prompt() function.

Performance improvements:
- Improve the performance of test_callable_args: this should significantly
increase the start-up time.
- Start-up time for creating the Vi bindings has been improved significantly.

(**) Some small backwards-compatible features were allowed for this minor
release. After evaluating the impact/risk/work involved we concluded that
we could ship these in a minor release.

1.0.0

Not secure
Improvements:
- Unindent after typing 'pass'.
- Make it configurable whether or not a blank line has to be inserted after the output.

0.60

Not secure

Page 12 of 22

© 2025 Safety CLI Cybersecurity Inc. All Rights Reserved.