Changelogs » Prompt-toolkit

PyUp Safety actively tracks 263,166 Python packages for vulnerabilities and notifies you when to upgrade.

Prompt-toolkit

3.0.7

-----------------
  
  New features:
  - New "placeholder" parameter added to `PromptSession`.
  
  Other changes:
  - The "respond to CPR" logic has been moved from the `Input` to `Output`
  classes (this does clean up some code).
  
  Fixes:
  - Bugfix in shift-selection key bindings.
  - Fix hight calculation of `FormattedTextControl` when line wrapping is turned
  on.
  - Fixes for SSH server:
  * Missing encoding property.
  * Fix failure in "set_line_mode" call.
  * Handle `BrokenPipeError`.

3.0.6

-----------------
  
  New features:
  - The SSH/Telnet adaptors have been refactored and improved in several ways.
  See issues 876 and PR 1150 and 1184 on GitHub.
  * Handle terminal types for both telnet and SSH sessions.
  * Added pipe input abstraction. (base class for `PosixPipeInput` and
  `Win32PipeInput`).
  * The color depth logic has been refactored and moved to the `Output`
  implementations. Added `get_default_color_depth` method to `Output`
  objects.
  * All line feets are now preceded by a carriage return in the telnet
  connection stdout.
  - Introduce `REPLACE_SINGLE` input mode for Vi key bindings.
  - Improvements to the checkbox implementation:
  * Hide the scrollbar for a single checkbox.
  * Added a "checked" setter to the checkbox.
  - Expose `KeyPressEvent` in key_binding/__init__.py (often used in type
  annotations).
  - The renderer has been optimized so that no trailing spaces are generated
  (this improves copying in some terminals).
  
  Fixes:
  - Ignore F21..F24 key bindings by default.
  - Fix auto_suggest key bindings when suggestion text is empty.
  - Bugfix in SIGWINCH handling.
  - Handle bug in HSplit/VSplit when the number of children is zero.
  - Bugfix in CPR handling in renderer. Proper cancellation of pending tasks.
  - Ensure rprompt aligns with input.
  - Use `sys.stdin.encoding` for decoding stdin stream.

3.0.5

-----------------
  
  Fixes:
  - Handle bug in dictionary completion when numeric keys are used.

3.0.4

-----------------
  
  New features:
  - Allow leading whitespace before single line expressions.
  - Show full syntax error in validator.
  - Added `vi_start_in_navigation_mode` and `vi_keep_last_used_mode` options.
  
  Fixes:
  - Improved dictionary completion: handle keys that contain spaces and don't
  recognize numbers as variable names.
  - Fix in exit confirmation.

3.0.3

-----------------
  
  Fixes:
  - Sort attribute names for `DictionaryCompleter` and move underscored
  attributes to the end.
  - Handle unhandled exceptions in `get_compiler_flags`.
  - Improved `run_async` code.
  - Fix --version parameter.

3.0.2

-----------------
  
  New features:
  - Improved custom dictionary completion:
  * Also complete list indexes.
  * Also complete attributes after doing a dictionary lookup.
  * Also complete iterators in a for-loop.
  - Added a 'title' option, so that applications embedding ptpython can set a
  title in the status bar.

3.0.1

-----------------
  
  - Fix backwards-compatibility of the `run_config` function. (used by
  django-extensions).
  - Fix input mode in status bar for block selection.

3.0.0

-----------------
  
  Upgrade to prompt_toolkit 3.0.
  Requires at least Python 3.6.
  
  New features:
  - Uses XDG base directory specification.

2.0.9

-----------------
  
  Bug fixes:
  - Fixed `Application.run_system_command` on Windows.
  - Fixed bug in ANSI text formatting: correctly handle 256/true color sequences.
  - Fixed bug in WordCompleter. Provide completions when there's a space before
  the cursor.

2.0.8

-----------------
  
  Bug fixes:
  - Fixes the issue where changes made to the buffer in the accept handler were
  not reflected in the history.
  - Fix in the application invalidate handler. This prevents a significat slow
  down in some applications after some time (especially if there is a refresh
  interval).
  - Make `print_container` utility work if the input is not a pty.
  
  New features:
  - Underline non breaking spaces instead of rendering as '&'.
  - Added mouse support for radio list.
  - Support completion styles for `READLINE_LIKE` display method.
  - Accept formatted text in the display text of completions.
  - Added a `FuzzyCompleter` and `FuzzyWordCompleter`.
  - Improved error handling in Application (avoid displaying a meaningless
  AssertionError in many cases).

2.0.7

-----------------
  
  Bug fixes:
  - Fixed assertion in PromptSession: the style_transformation check was wrong.
  - Removed 'default' attribute in PromptSession. Only ask for it in the
  `prompt()` method. This fixes the issue that passing `default` once, will
  store it for all consequent calls in the `PromptSession`.
  - Ensure that `__pt_formatted_text__` always returns a `FormattedText`
  instance. This fixes an issue with `print_formatted_text`.
  
  New features:
  - Improved handling of situations where stdin or stdout are not a terminal.
  (Print warning instead of failing with an assertion.)
  - Added `print_container` utility.
  - Sound bell when attempting to edit read-only buffer.
  - Handle page-down and page-up keys in RadioList.
  - Accept any `collections.abc.Sequence` for HSplit/VSplit children (instead of
  lists only).
  - Improved Vi key bindings: return to navigation mode when Insert is pressed.

2.0.6

-----------------
  
  Bug fixes:
  - Don't use the predefined ANSI colors for colors that are defined as RGB.
  (Terminals can assign different color schemes for ansi colors, and we don't
  want use any of those for colors that are defined like aabbcc for instance.)
  - Fix in handling of CPRs when patch_stdout is used.
  
  Backwards incompatible changes:
  - Change to the `Buffer` class. Reset the buffer unless the `accept_handler`
  returns `True` (which means: "keep_text"). This doesn't affect applications
  that use `PromptSession`.
  
  New features:
  - Added `AdjustBrightnessStyleTransformation`. This is a simple style
  transformation that improves the rendering on terminals with light or dark
  background.
  - Improved performance (string width caching and line height calculation).
  - Improved `TextArea`:
  * Exposed `focus_on_click`.
  * Added attributes: `auto_suggest`, `complete_while_typing`, `history`,
  `get_line_prefix`, `input_processors`.
  * Made attributes writable: `lexer`, `completer`, `complete_while_typing`,
  `accept_handler`, `read_only`, `wrap_lines`.

2.0.5

-----------------
  
  New features:
  - Added dictionary completer (off by default).
  - Added fuzzy completion (off by default).
  - Highlight keywords in completion dropdown menu.
  - Enable universal wheels.
  
  Fixes:
  - Fixed embedding repl as asyncio coroutine.
  - Fixed patching stdout in embedded repl.
  - Fixed ResourceWarning in setup.py.

2.0.4

-----------------
  
  - Fixed ptipython.
  - Fixed config: setting of color depth.
  - Fixed auto-suggest key bindings.
  - Fixed Control-D key binding for exiting REPL when (confirm_exit=False).
  - Correctly focus/unfocus sidebar.
  - Fixed open_in_editor and suspend key bindings.

2.0.3

-----------------
  
  - Allow changing the min/max brightness.
  - Some changes for compatibility with the latest prompt_toolkit.

2.0.2

-----------------
  
  Fixes:
  - Don't crash the history browser when there was no history.
  - Set last exception in the sys module, when an exception was raised.
  - Require prompt_toolkit 2.0.5.

2.0.1

-----------------
  
  Upgrade to prompt_toolkit 2.0.x.

2.0

includes the merge of the CommandLineInterface and the Application object, a
  rewrite of how user controls are focused, a rewrite of how event loops work
  and the removal of the buffers dictionary. This introduces many backwards
  incompatible changes, but the result is a very nice and powerful architecture.
  
  Most architectural changes effect full screen applications. For applications
  that use `prompt_toolkit.shortcuts` for simple prompts, there are fewer
  incompatibilities.
  
  Changes:
  
  - No automatic translation from \r into \n during the input processing. These
  are two different keys that can be handled independently. This is a big
  backward-incompatibility, because the `Enter` key is `ControlM`, not
  `ControlJ`. So, now that we stopped translating \r into \n, it could be that
  custom key bindings for `Enter` don't work anymore. Make sure to bind
  `Keys.Enter` instead of `Keys.ControlJ` for handling the `Enter` key.
  
  - The `CommandLineInterface` and the `Application` classes are merged. First,
  `CommandLineInterface` contained all the I/O objects (like the input, output
  and event loop), while the `Application` contained everything else. There was
  no practical reason to keep this separation. (`CommandLineInterface` was
  mostly a proxy to `Application`.)
  
  A consequence is that almost all code which used to receive a
  `CommandLineInterface`, will now use an `Application`. Usually, where we
  had an attribute `cli`, we'll now have an attribute `app`.
  
  Secondly, the `Application` object is no longer passed around. The `get_app`
  function can be used at any time to acquire the active application.
  
  (For backwards-compatibility, we have aliases to the old names, whenever
  possible.)
  
  - prompt_toolkit no longer depends on Pygments, but it can still use Pygments
  for its color schemes and lexers. In many places we used Pygments "Tokens",
  this has been replaced by the concept of class names, somewhat similar to
  HTML and CSS.
  
  * `PygmentsStyle` and `PygmentsLexer` adaptors are available for
  plugging in Pygments styles and lexers.
  
  * Wherever we had a list of `(Token, text)` tuples, we now have lists of
  `(style_string, text)` tuples. The style string can contain both inline
  styling as well as refer to a class from the style sheet. `PygmentsTokens`
  is an adaptor that converts a list of Pygments tokens into a list of
  `(style_string, text)` tuples.
  
  - Changes in the `Style` classes.
  
  * `style.from_dict` does not exist anymore. Instantiate the ``Style`` class
  directory to create a new style. ``Style.from_dict`` can be used to create
  a style from a dictionary, where the dictionary keys are a space separated
  list of class names, and the values, style strings (like before).
  
  * `print_tokens` was renamed to `print_formatted_text`.
  
  * In many places in the layout, we accept a parameter named `style`. All the
  styles from the layout hierarchy are combined to decide what style to be
  used.
  
  * The ANSI color names were confusing and inconsistent with common naming
  conventions. This has been fixed, but aliases for the original names were
  kept.
  
  - The way focusing works is different. Before it was always a `Buffer` that
  was focused, and because of that, any visible `BufferControl` that contained
  this `Buffer` would be focused. Now, any user control can be focused. All
  of this is handled in the `Application.layout` object.
  
  - The `buffers` dictionary (`CommandLineInterface.buffers`) does not exist
  anymore. Further, `buffers` was a `BufferMapping` that keeps track of which
  buffer has the focus. This significantly reduces the freedom for creating
  complex applications. We wanted to move toward a layout that can be defined
  as a (hierarchical) collection of user widgets. A user widget does not need
  to have a `Buffer` underneath and any widget should be focusable.
  
  * `layout.Layout` was introduced to contain the root layout widget and keep
  track of the focus.
  
  - The key bindings were refactored. It became much more flexible to combine
  sets of key bindings.
  
  * `Registry` has been renamed to `KeyBindings`.
  * The `add_binding` function has been renamed to simply `add`.
  * Every `load_*` function returns one `KeyBindings` objects, instead of
  populating an existing one, like before.
  * `ConditionalKeyBindings` was added. This can be used to enable/disable
  all the key bindings from a given `Registry`.
  * A function named `merge_key_bindings` was added. This takes a list of
  `KeyBindings` and merges them into one.
  * `key_binding.defaults.load_key_bindings` was added to load all the key
  bindings.
  * `KeyBindingManager` has been removed completely.
  * `input_processor` was renamed to `key_processor`.
  
  Further:
  
  * The `Key` class does not exist anymore. Every key is a string and it's
  considered fine to use string literals in the key bindings. This is more
  readable, but we still have run-time validation. The `Keys` enum still
  exist (for backwards-compatibility, but also to have an overview of which
  keys are supported.)
  * 'enter' and 'tab' are key aliases for 'c-m' and 'c-i'.
  
  - User controls can define key bindings, which are active when the user control
  is focused.
  
  * `UIControl` got a `get_key_bindings` (abstract) method.
  
  - Changes in the layout engine:
  
  * `LayoutDimension` was renamed to `Dimension`.
  * `VSplit` and `HSplit` now take a `padding` argument.
  * `VSplit` and `HSplit` now take an `align` argument.
  (TOP/CENTER/BOTTOM/JUSTIFY) or (LEFT/CENTER/RIGHT/JUSTIFY).
  * `Float` now takes `allow_cover_cursor` and `attach_to_window` arguments.
  * `Window` got an `WindowAlign` argument. This can be used for the alignment
  of the content. `TokenListControl` (renamed to `FormattedTextControl`) does
  not have an alignment argument anymore.
  * All container objects, like `Window`, got a `style` argument. The style for
  parent containers propagate to child containers, but can be overriden.
  This is in particular useful for setting a background color.
  * `FillControl` does not exist anymore. Use the `style` and `char` arguments
  of the `Window` class instead.
  * `DummyControl` was added.
  * The continuation function of `PromptMargin` now takes `line_number` and
  `is_soft_wrap` as input.
  
  - Changes to `BufferControl`:
  
  * The `InputProcessor` class has been refactored. The `apply_transformation`
  method should now takes a `TransformationInput` object as input.
  
  * The text `(reverse-i-search)` is now displayed through a processor. (See
  the `shortcuts` module for an example of its usage.)
  
  - `widgets` and `dialogs` modules:
  
  * A small collection of widgets was added. These are more complex collections
  of user controls that are ready to embed in a layout. A `shortcuts.dialogs`
  module was added as a high level API for displaying input, confirmation and
  message dialogs.
  
  * Every class that exposes a ``__pt_container__`` method (which is supposed
  to return a ``Container`` instance) is considered a widget. The
  ``to_container`` shortcut will call this method in situations where a
  ``Container`` object is expected. This avoids inheritance from other
  ``Container`` types, but also having to unpack the container object from
  the widget, in case we would have used composition.
  
  * Warning: The API of the widgets module is not considered stable yet, and
  can change is the future, if needed.
  
  - Changes to `Buffer`:
  
  * A `Buffer` no longer takes an `accept_action`.  Both `AcceptAction` and
  `AbortAction` have been removed. Instead it takes an `accept_handler`.
  
  - Changes regarding auto completion:
  
  * The left and right arrows now work in the multi-column auto completion
  menu.
  * By default, autocompletion is synchronous. The completer needs to be
  wrapped in `ThreadedCompleter` in order to get asynchronous autocompletion.
  * When the completer runs in a background thread, completions will be
  displayed as soon as they are generated. This means that we don't have to
  wait for all the completions to be generated, before displaying the first
  one. The completion menus are updated as soon as new completions arrive.
  
  - Changes regarding input validation:
  
  * Added the `Validator.from_callable` class method for easy creation of
  new validators.
  
  - Changes regarding the `History` classes:
  
  * The `History` base class has a different interface. This was needed for
  asynchronous loading of the history. `ThreadedHistory` was added for this.
  
  - Changes related to `shortcuts.prompt`:
  
  * There is now a class `PromptSession` which also has a method `prompt`. Both
  the class and the method take about the same arguments. This can be used to
  create a session. Every `prompt` call of the same instance will reuse all
  the arguments given to the class itself.
  
  The input history is always shared during the entire session.
  
  Of course, it's still possible to call the global `prompt` function. This
  will create a new `PromptSession` every time when it's called.
  
  * The `prompt` function now takes a `key_bindings` argument instead of
  `key_bindings_registry`. This should only contain the additional bindings.
  (The default bindings are always included.)
  
  - Changes to the event loops:
  
  * The event loop API is now closer to how asyncio works. A prompt_toolkit
  `Application` now has a `Future` object. Calling the `.run_async()` method
  creates and returns that `Future`. An event loop has a `run_until_complete`
  method that takes a future and runs the event loop until the Future is set.
  
  The idea is to be able to transition easily to asyncio when Python 2
  support can be dropped in the future.
  
  * `Application` still has a method `run()` that underneath still runs the
  event loop until the `Future` is set and returns that result.
  
  * The asyncio adaptors (like the asyncio event loop integration) now require
  Python 3.5. (We use the async/await syntax internally.)
  
  * The `Input` and `Output` classes have some changes. (Not really important.)
  
  * `Application.run_sub_applications` has been removed. The alternative is to
  call `run_coroutine_in_terminal` which returns a `Future`.
  
  - Changes to the `filters` module:
  
  * The `Application` is no longer passed around, so both `CLIFilter` and
  `SimpleFilter` were merged into `Filter`. `to_cli_filter` and
  `to_simple_filter` became `to_filter`.
  
  * All filters have been turned into functions. For instance, `IsDone`
  became `is_done` and `HasCompletions` became `has_completions`.
  
  This was done because almost all classes were called without any arguments
  in the `__init__` causing additional braces everywhere. This means that
  `HasCompletions()` has to be replaced by `has_completions` (without
  parenthesis).
  
  The few filters that took arguments as input, became functions, but still
  have to be called with the given arguments.
  
  For new filters, it is recommended to use the `Condition` decorator,
  rather then inheriting from `Filter`.
  
  - Other renames:
  
  * `IncrementalSearchDirection` was renamed to `SearchDirection`.
  * The `use_alternate_screen` parameter has been renamed to `full_screen`.
  * `Buffer.initial_document` was renamed to `Buffer.document`.
  * `TokenListControl` has been renamed to `FormattedTextControl`.
  * `Application.set_return_value` has been renamed to `Application.set_result`.
  
  - Other new features:
  
  * `DummyAutoSuggest` and `DynamicAutoSuggest` were added.
  * `DummyClipboard` and `DynamicClipboard` were added.
  * `DummyCompleter` and `DynamicCompleter` were added.
  * `DummyHistory` and `DynamicHistory` was added.
  
  * `to_container` and `to_window` utilities were added.

1.0.9

-----------------
  
  Fixes:
  - Fixed a bug in the `cooked_mode` context manager. This caused a bug in
  ptpython where executing `input()` would display ^M instead of accepting the
  input.
  - Handle race condition in eventloop/posix.py
  - Updated ANSI color names for vt100. (High and low intensity colors were
  swapped.)
  
  New features:
  - Added yank-nth-arg and yank-last-arg readline commands + Emacs bindings.
  - Allow searching in Vi selection mode.
  - Made text objects of the Vi 'n' and 'N' search bindings. This adds for
  instance the following bindings: cn, cN, dn, dN, yn, yN

1.0.8

-----------------
  
  Fixes:
  - In 'shortcuts': complete_while_typing was a SimpleFilter, not a CLIFilter.
  - Always reset color attributes after rendering.
  - Handle bug in Windows when '$TERM' is not defined.
  - Ignore errors when calling tcgetattr/tcsetattr.
  (This handles the "Inappropriate ioctl for device" crash in some scenarios.)
  - Fix for Windows. Correctly recognize all Chinese and Lithuanian characters.
  
  New features:
  - Added shift+left/up/down/right keys.
  - Small performance optimization in the renderer.
  - Small optimization in the posix event loop. Don't call time.time() if we
  don't have an inputhook. (Less syscalls.)
  - Turned the _max_postpone_until argument of call_from_executor into a float.
  (As returned by `time.time`.) This will do less system calls. It's
  backwards-incompatible, but this is still a private API, used only by pymux.)
  - Added Shift-I/A commands in Vi block selection mode for inserting text at the
  beginning of each line of the block.
  - Refactoring of the 'selectors' module for the posix event loop. (Reuse the
  same selector object in one loop, don't recreate it for each select.)

1.0.7

-----------------
  
  Fixes:
  - Bugfix in completion. When calculating the common completion to be inserted,
  the new completions were calculated wrong.
  - On Windows, avoid extra vertical scrolling if the cursor is already on screen.
  
  New features:
  - Support negative arguments for next/previous word ending/beginning.

1.0.6

-----------------
  
  Fixes:
  - Go to the start of the line in Vi navigation mode, when 'j' or 'k' have been
  pressed to navigate to a new history entry.
  - Don't crash when pasting text that contains \r\n characters. (This could
  happen in iTerm2.)
  - Python 2.6 compatibility fix.
  - Allow pressing <esc> before each -ve argument.
  - Better support for conversion from ffffff values to ANSI colors in
  Vt100_Output.
  * Prefer colors with some saturation, instead of gray colors, if the given
  color was not gray.
  * Prefer a different foreground and background color if they were
  originally not the same. (This avoids concealing text.)
  
  New features:
  - Improved ANSI color support.
  * If the $PROMPT_TOOLKIT_ANSI_COLORS_ONLY environment variable has been
  set, use the 16 ANSI colors only.
  * Take an `ansi_colors_only` parameter in `Vt100_Output` and
  `shortcuts.create_output`.

1.0.5

-----------------
  
  Fixes:
  - Critical fix for running on Windows. The gevent work-around in the inputhook
  caused 'An operation was attempted on something that is not a socket'.

1.0.4

-----------------
  
  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 behaviour. 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

-----------------
  
  Fixes:
  - Bugfix for Python2 in readline-like completion.
  - Bugfix in readline-like completion visualisation.
  
  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

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

1.0.1

-----------------
  
  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

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

0.60


        

0.59


        

0.58

New features:
  - Improved mouse support

0.57


        

0.56


        

0.55

Fixes:
  - Handle several bugs in Jedi.
  - Correctly handle sys.argv when pt(i)python is started with --interactive.
  - Support for 24bit true color.
  - Take compiler flags into account for ptipython.

0.54

Fixes:
  - Consider input multiline when there's a colon at the end of the line.
  - Handle bug in Jedi.
  - Enable search bindings in history browser.

0.53

----------------
  
  New features:
  - Handling of the insert key in Vi mode.
  - Added 'zt' and 'zb' Vi key bindings.
  - Added delete key binding for deleting selected text.
  - Select word below cursor on double mouse click.
  - Added `wrap_lines` option to TokenListControl.
  - Added `KeyBindingManager.for_prompt`.
  
  Fixes:
  - Fix in rendering output.
  - Reset renderer correctly in run_in_terminal.
  - Only reset buffer when using `AbortAction.RETRY`.
  - Fix in handling of exit (Ctrl-D) key presses.
  - Fix in `CompleteEvent`. Correctly set `completion_requested`.
  
  Backwards-incompatible changes:
  - Renamed `ValidationError.index` to `ValidationError.cursor_position`.
  - Renamed `shortcuts.get_input` to `shortcuts.prompt`.
  - Return empty string instead of None in
  `Document.current_char`/`char_before_cursor`.

0.52


        

0.51

New features:
  - Mouse support
  - Fish style auto suggestion.
  - Optionally disabling of line wraps.
  - Use Python3Lexer for Python 3.

0.50

Fixes:
  - Correctly accept file parameter in the print function of
  asyncssh_repl.ReplSSHServerSession.
  - Create config directory if it doesn't exist yet (For IPython entry point.)
  
  New features:
  - Implementation of history-selection: a tool to select lines from the history.
  - Make exit message configurable.
  - Improve start-up time: Lazy load completer grammar and lazy-import Jedi.
  - Make multi-column the default completion visualisation.
  - Implementation of a custom prompts. In_tokens and out_tokens can be
  customized.
  - Made an option to show/hide highlighting for matching parenthesis.
  - Some styling improvements.

0.49

----------------
  
  New features:
  - Added MANIFEST.in
  - Better support for multiline prompts in shortcuts.
  - Added Document.set_document method.
  - Added 'default' argument to `shortcuts.create_default_application`.
  - Added `align_center` option for `TokenListControl`.
  - Added optional key bindings for full page navigation. (Moved key bindings
  from pyvim into prompt-toolkit.)
  - Accepts default_char in BufferControl for filling the background.
  - Added InFocusStack filter.
  
  Fixes:
  - Small fix in TokenListControl: use the right Char for aligning.
  
  Backwards-incompatible changes:
  - Removed deprecated 'tokens' attribute from GrammarLexer.

0.48

----------------
  
  New features:
  - run_in_terminal now returns the result of the called function.
  - Made history attribute of Buffer class public.
  - Added support for sub CommandLineInterfaces.
  - Accept optional vi_state parameter in KeyBindingManager.
  
  Fixes:
  - Pop-up menu positioning. The menu was shown too often above instead of below
  the cursor.
  - Fix in Control-W key binding. When there is only whitespace before the
  cursor, delete the whitespace.
  - Rendering bug fix in open_in_editor: run editor using cli.run_in_terminal.
  - Fix in renderer. Correctly reserve the vertical space as required by the
  layout.
  - Small fix in Margin ABC.
  - Added __iter__ to History ABC.
  - Small bugfix in CommandLineInterface: create correct eventloop when no
  eventloop was given.
  - Never schedule a second repaint operation when a previous was not yet
  executed.

0.47

----------------
  
  New features:
  - Added `prompt_toolkit.layout.utils.iter_token_lines`.
  - Allow `None` values on the focus stack.
  - Buffers can be readonly. Added `IsReadOnly` filter.
  - `eager` behaviour for key bindings. When a key binding is eager it will be
  executed as soon as it's matched, even when there is another binding that
  starts with this key sequence.
  - Custom margins for BufferControl.
  
  Fixes:
  - Don't trigger autocompletion on paste.
  - Added `pre_run` parameter to CommandLineInterface.
  - Correct invalidation of BeforeInput and AfterInput.
  - Correctly handle transparency. (For floats.)
  - Small change in the algorithm to determine Window dimensions: keep in the
  bounds of the Window dimensions.
  
  Backwards-incompatible changes:
  - There a now a `Lexer` abstract base class. Every lexer should be an instance
  of that class, and Pygments lexers should be wrapped in a `PygmentsLexer`
  class. `prompt_toolkit.shortcuts` still accepts Pygments lexers directly for
  backwards-compatibility.
  - BufferControl no longer has a `show_line_numbers` argument. Pass a
  `NumberedMargin` instance instead.
  - The `History` class became an abstract base class and only defines an
  interface. The default history class is now called `InMemoryHistory`.

0.46

Fixes:
  - Correctly add current directory to sys.path.
  - Only show search highlighting when the search is the current input buffer.
  - Styling fix.

0.45


        

0.44

New features:
  - Added --interactive option for ptipython.
  - A few style improvements.

0.43

New features:
  - Integration with Tk eventloop. (This makes turtle and other Tk stuff work
  again from the REPL.)
  - Multi column completion visualisation.

0.42

Fixes:
  - Workaround for Jedi bug. (Signatures of functions with keyword-only arguments.)
  - Correctly show traceback on Python 3.
  - Better styling of the options sidebar.
  
  New features:
  - Exit REPL when input starts with Control-Z.
  - Set terminal title.
  - Display help text in options sidebar.
  - Better colorscheme for Windows.

0.41

Fixes:
  - Correct tokens for IPython prompt.
  - Syntax fix in asyncssh_repl.

0.40

----------------
  
  Fixes:
  - Fix in output_screen_diff: reset correctly.
  - Ignore flush errors in vt100_output.
  - Implemented <num>gg Vi key binding.
  - Bug fix in the renderer when the style changes.
  
  New features:
  - TokenListControl can now display the cursor somewhere.
  - Added SwitchableValidator class.
  - print_tokens function added.
  - get_style argument for Application added.
  - KeyBindingManager got an enable_all argument.
  
  Backwards incompatible changes:
  - history_search is now a SimpleFilter instance.

0.39


        

0.38

----------------
  
  New features:
  - Improved performance significantly for processing key bindings.
  (Pasting text will be a lot faster.)
  - Added 'M' Vi key binding.
  - Added 'z-' and 'z+' and 'z-[Enter]' Vi keybindings.
  - Correctly handle input and output encodings on Windows.
  
  Bug fixes:
  - Fix bug when completion cursor position is outside range of current text.
  - Don't crash Control-D is pressed while waiting for ENTER press (in run_system_command.)
  - On Ctrl-Z, don't suspend on Windows, where we don't have SIGTSTP.
  - Ignore result when open_in_editor received a nonzero return code.
  - Bug fix in displaying of menu meta information. Don't show 'None'.
  
  Backwards incompatible changes:
  - Refactoring of the I/O layer.  Separation of the CommandLineInterface
  and Application class.
  - Renamed enable_system_prompt to enable_system_bindings.

0.37

----------------
  
  New features:
  - Handling of trailing input in contrib.regular_languages.
  
  Bug fixes:
  - Default message in shortcuts.get_input.
  - Windows compatibility for contrib.telnet.
  - OS X bugfix in contrib.telnet.

0.36

----------------
  
  New features:
  - Support for editing in Vi block mode. (Only enabled for
  prompt_toolkit>=1.0.8.)
  
  Fixes:
  - Handle two Jedi crashes. (GitHub ptpython issues 136 and 91.)

0.35

----------------
  
  Fixes:
  - Fix in completer. Don't hang when pasting a long string with many
  backslashes.
  - Fix Python2 bug: crash when filenames contain non-ascii characters.
  - Added `pt[i]pythonX` and `pt[i]pythonX.X` commands.
  - Compatibility with IPython 5.0.

0.34

---------------
  
  Bugfix in ptipython: reset input buffer before every read in run().

0.33

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

0.32

---------------
  
  Fixes:
  - Fixed bug when PYTHONSTARTUP was not found.
  - Support $PYTHONSTARTUP for ptipython.

0.31

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

0.30

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

0.29

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

0.28

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

0.27

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

0.26

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

0.25

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

0.24

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

0.23

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

0.22

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

0.21

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

0.20

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

0.19

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

0.18

---------------
  
  Fixes:
  - Python 2.6 compatibility.

0.17

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

0.16

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

0.15

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

0.14

---------------
  
  Fix:
  - Correct dependency for prompt_toolkit.

0.13

---------------
  
  New features:
  - Upgrade to prompt_toolkit 0.40
  - Options sidebar.
  - Custom color schemes.
  - Syntax highlighting of the output.
  - Input validation can now be turned off.
  - Determine compiler flags dynamically. (Fixes importing unicode_literals).
  - Exit confirmation and dialog.
  - Autocompletion of IPython %cat command.
  - Correctly render tracebacks on Windows.

0.12

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

0.11

---------------
  
  New features:
  - Upgrade to prompt-toolkit 0.38.
  - Upgrade to Jedi 0.9.0
  - Fixed default globals for repl (correct __name, __builtins__, etc...)
  - Display deprecation warnings in the REPL.
  - Added configuration support.
  - Added asyncio-ssh-python-embed example.

0.10

---------------
  
  Upgrade to prompt-toolkit 0.37.

0.9

---------------
  
  Upgrade to prompt-toolkit 0.35.

0.8

---------------
  
  Fixed:
  - eval() doesn't run using unicode_literals anymore.
  - Upgrade to prompt-toolkit 0.34.

0.7

---------------
  
  Fixed:
  - Upgrade to prompt-toolkit 0.33.
  
  New features:
  - Added complete_while_typing option.

0.6

---------------
  
  Fixed:
  - Upgrade to prompt-toolkit 0.32 which has many new features.
  
  Changes:
  - Removal of tab pages + clean up.
  - Pressing enter twice will now always automatically execute the input.
  - Improved Control-D key binding.
  - Hide docstring by default.

0.5

---------------
  
  Fixed:
  - Tab autocompletion on first line.
  - Upgrade to prompt-toolkit 0.31
  
  New features:
  - Simple autocompletion for IPython magics.

0.4

---------------
  
  Fixed:
  - Upgrade to prompt-toolkit 0.30

0.3

---------------
  
  Fixed:
  - Upgrade to prompt-toolkit 0.28

0.2

---------------
  
  Moved ptpython code from prompt-toolkit inside this repository.

0.1

---------------
  
  Initial ptpython version. (Source code was still in the
  prompt-toolkit repository itself.)