Prompt-toolkit

Latest version: v3.0.50

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

Scan your dependencies

Page 7 of 22

3.0.14

------------------

New features:
- Display of signature and completion drop down together.
- If `DictionaryCompleter` is enabled, also retrieve signatures when Jedi
fails, using the same logic.
- List function parameters first and private attributes at the end in the
completion menu.
- Cleanup of the completion code.

Fixes:
- Handle exceptions raised when `repr()` is called.
- Fix leakage of `exc_info` from eval to exec call.
- Fix handling of `KeyboardInterrupt` in REPL during evaluation of `__repr__`.
- Fix style for signature toolbar.
- Hide signature when sidebar is visible.

3.0.13

------------------

New features:
- Added 'print all' option to pager.
- Improve handling of indented code:
* Allow multiline input to be indented as a whole (we will unindent before
executing).
* Correctly visualize tabs (instead of ^I, which happens when pasted in
bracketed paste).

Fixes:
- Fix line ending bug in pager.

3.0.12

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

New features:
- Expose a `get_ptpython` function in the global namespace, to get programmatic
access to the REPL.
- Expose `embed()` at the top level of the package. Make it possible to do
`from ptpython import embed`.

Fixes:
- Properly handle exceptions when trying to access `__pt_repr__`.
- Properly handle `SystemExit`.

3.0.11

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

New features:
- Add support for top-level await.
- Refactoring of event loop usage:

* The ptpython input UI will now run in a separate thread. This makes it
possible to properly embed ptpython in an asyncio application, without
having to deal with nested event loops (which asyncio does not support).

* The "eval" part doesn't anymore take place within a ptpython coroutine, so
it can spawn its own loop if needed. This also fixes `asyncio.run()` usage
in the REPL, which was broken before.

- Added syntax highlighting and autocompletion for !-style system commands.

Fixes:
- Remove unexpected additional line after output.
- Fix system prompt. Accept !-style inputs again.
- Don't execute PYTHONSTARTUP when -i flag was given.

3.0.10

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

Fixes:
- Do dictionary completion on Sequence and Mapping objects (from
collections.abc). Note that dictionary completion is still turned off by
default.

3.0.9

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

New features:
- Allow replacing `PythonInput.completer` at runtime (useful for tools build on
top of ptpython).
- Show REPL title in pager.

Page 7 of 22

© 2025 Safety CLI Cybersecurity Inc. All Rights Reserved.