Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update prompt-toolkit to 3.0.29 #2237

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

pyup-bot
Copy link
Collaborator

@pyup-bot pyup-bot commented Apr 4, 2022

This PR updates prompt-toolkit from 3.0.7 to 3.0.29.

Changelog

3.0.29

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

New features:
- Accept 'handle_sigint' parameter in PromptSession.

Fixes
- Fix 'variable referenced before assignment' error in vt100 mouse bindings.
- Pass `handle_sigint` from `Application.run` to `Application.run_async`.
- Fix detection of telnet client side changes.
- Fix `print_container` utility (handle `EOFError`).

Breaking changes:
- The following are now context managers:
`create_pipe_input`, `PosixPipeInput` and `Win32PipeInput`.

3.0.28

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

New features:
- Support format specifiers for HTML and ANSI formatted text.
- Accept defaults for checkbox and radio list, and their corresponding dialogs.

Fixes:
- Fix resetting of cursor shape after the application terminates.

3.0.27

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

New features:
- Support for cursor shapes. The cursor shape for prompts/applications can now
be configured, either as a fixed cursor shape, or in case of Vi input mode,
according to the current input mode.
- Handle "cursor forward" command in ANSI formatted text. This makes it
possible to render many kinds of generated ANSI art.
- Accept `align` attribute in `Label` widget.
- Added `PlainTextOutput`: an output implementation that doesn't render any
ANSI escape sequences. This will be used by default when redirecting stdout
to a file.
- Added `create_app_session_from_tty`: a context manager that enforces
input/output to go to the current TTY, even if stdin/stdout are attached to
pipes.
- Added `to_plain_text` utility for converting formatted text into plain text.

Fixes:
- Don't automatically use `sys.stderr` for output when `sys.stdout` is not a
TTY, but `sys.stderr` is. The previous behavior was confusing, especially
when rendering formatted text to the output, and we expect it to follow
redirection.

3.0.26

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

Fixes:
- Fixes issue introduced in 3.0.25: Don't handle SIGINT on Windows.

3.0.25

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

Fixes:
- Use `DummyOutput` when `sys.stdout` is `None` and `DummyInput` when
`sys.stdin` is `None`. This fixes an issue when the code runs on windows,
using pythonw.exe and still tries to interact with the terminal.
- Correctly reset `Application._is_running` flag in case of exceptions in some
situations.
- Handle SIGINT (when sent from another process) and allow binding it to a key
binding. For prompt sessions, the behavior is now identical to pressing
control-c.
- Increase the event loop `slow_duration_callback` by default to 0.5. This
prevents printing warnings if rendering takes too long on slow systems.

3.0.24

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

Fixes:
- Prevent window content overflowing when using scrollbars.
- Handle `PermissionError` when trying to attach /dev/null in vt100 input.

3.0.23

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

Fixes:
- Fix multiline bracketed paste on Windows

New features:
- Add support for some CSI 27 modified variants of "Enter" for xterm in the
vt100 input parser.

3.0.22

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

Fixes:
- Fix stopping of telnet server (capture cancellation exception).

3.0.21

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

New features:
- Improved mouse support:
* Support for click-drag, which is useful for selecting text.
* Detect mouse movements when no button is pressed.
- Support for Python 3.10.

3.0.20

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

New features:
- For `DictionaryCompleter`: show parentheses after methods.

Fixes:
- Don't crash when trying to complete broken mappings in `DictionaryCompleter`.
- Don't crash when an older version of `black` is installed that is not
compatible.

3.0.19

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

Fixes:
- Fix handling of `SystemExit` (fixes "ValueError: I/O operation on closed
file").
- Allow usage of `await` in assignment expressions or for-loops.

3.0.18

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

Fixes:
- Made "black" an optional dependency.

3.0.17

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

Fixes:
- Fix leaking file descriptors due to not closing the asyncio event loop after
reading input in a thread.
- Fix race condition during retrieval of signatures.

3.0.16

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

(Commit 7f619e was missing in previous release.)

Fixes:
- Several fixes to the completion code:
* Give dictionary completions priority over path completions.
* Always call non-fuzzy completer after fuzzy completer to prevent that some
 completions were missed out if the fuzzy completer doesn't find them.

3.0.15

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

New features:
- When pressing control-w, only delete characters until a punctuation.

Fixes:
- Fix `AttributeError` during retrieval of signatures with type annotations.

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

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

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

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

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

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

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

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

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

3.0.8

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

New features:
- Optional output formatting using Black.
- Optional pager for displaying outputs that don't fit on the screen.
- Added --light-bg and --dark-bg flags to automatically optimize the brightness
of the colors according to the terminal background.
- Addd `PTPYTHON_CONFIG_HOME` for explicitely setting the config directory.
- Show completion suffixes (like '(' for functions).

Fixes:
- Fix dictionary completion on Pandas objects.
- Stop using deprecated Jedi functions.
Links

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant