python-prompt-toolkit v3.0.4 Release Notes

Release Date: 2020-03-06 // 3 months ago
  • 🆕 New features:

    • ➕ Added many more vt100 ANSI sequences and keys.
    • 👌 Improved control/shift key support in Windows.
    • No Mypy errors in prompt_toolkit anymore.
    • 👻 Added set_exception_handler optional argument to PromptSession.prompt().

    🛠 Fixes:

    • 🛠 Bugfix in invalidate code. PromptSession was invalidating the UI continuously.
    • Add uvloop support (was broken due to an issue in our call_soon_threadsafe).
    • 👻 Forwarded set_exception_handler in Application.run to the run_async call.
    • 🛠 Bugfix in NestedCompleter when there is a leading space.

    💥 Breaking changes:

    • ShiftControl has been replaced with ControlShift and s-c with c-s in key bindings. Aliases for backwards-compatibility have been added.

Previous changes from v3.0.3

  • 🆕 New features:

    • 👌 Improved support for "dumb" terminals.
    • ➕ Added support for new keys (vt100 ANSI sequences): Alt + home/end/page-up/page-down/insert.
    • 👍 Better performance for the "regular languages compiler". Generate fewer and better regular expressions. This should improve the start-up time for applications using this feature.
    • 👍 Better detection of default color depth.
    • 👌 Improved the progress bar:
      • Set "time left" to 0 when done or stopped.
      • Added ProgressBarCounter.stopped.
    • Accept callables for scroll_offset, min_brightness and max_brightness.
    • Added always_prefer_tty parameters to create_input() and create_output().
    • Create a new event loop in Application.run() if get_event_loop() raises Runtimeerror.

    🛠 Fixes:

    • 🛠 Correct cancellation of flush timers for input. (Fixes resource leak where too many useless coroutines were created.)
    • 👌 Improved the Win32 input event loop. This fixes a bug where the prompt_toolkit application is stopped by something other than user input. (In that case, the application would hang, waiting for input.) This also fixes a RuntimeError in the progress bar code.
    • 🛠 Fixed line-number.current style. (was current-line-number.)
    • 🖐 Handle situation where stdout is no longer a tty (fix bug in get_size).
    • 🛠 Fix parsing of true color in ANSI strings.
    • Ignore invalidate() if the application is not running.