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.38 #1454

Closed
wants to merge 1 commit into from

Conversation

pyup-bot
Copy link
Collaborator

This PR updates prompt-toolkit from 3.0.5 to 3.0.38.

Changelog

3.0.38

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

Fixes:
- Fix regression in filters. (Use of `WeakValueDictionary` caused filters to
not be cached).

New features:
- Use 24-bit true color now by default on Windows 10/11.

3.0.37

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

Bug fixes:
- Fix `currentThread()` deprecation warning.
- Fix memory leak in filters.
- Make VERSION tuple numeric.

New features:
- Add `.run()` method in `TelnetServer`. (To be used instead of
`.start()/.stop()`.

Breaking changes:
- Subclasses of `Filter` have to call `super()` in their `__init__`.
- Drop support for Python 3.6:
* This includes code cleanup for Python 3.6 compatibility.
* Use `get_running_loop()` instead of `get_event_loop()`.
* Use `asyncio.run()` instead of `asyncio.run_until_complete()`.

3.0.36

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

Fixes:
- Another Python 3.6 fix for a bug that was introduced in 3.0.34.

3.0.35

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

Fixes:
- Fix bug introduced in 3.0.34 for Python 3.6. Use asynccontextmanager
implementation from prompt_toolkit itself.

3.0.34

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

Fixes:
- Improve completion performance in various places.
- Improve renderer performance.
- Handle `KeyboardInterrupt` when the stacktrace of an unhandled error is
displayed.
- Use correct event loop in `Application.create_background_task()`.
- Fix `show_cursor` attribute in `ScrollablePane`.

3.0.33

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

Fixes:
- Improve termination of `Application`. Don't suppress `CancelledError`. This
fixes a race condition when an `Application` gets cancelled while we're
waiting for the background tasks to complete.
- Fixed typehint for `OneStyleAndTextTuple`.
- Small bugfix in `CombinedRegistry`. Fixed missing `property`.

3.0.32

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

Bug fixes:
- Use `DummyInput` by default in `create_input()` if `sys.stdin` does not have
a valid file descriptor. This fixes errors when `sys.stdin` is patched in
certain situations.
- Fix control-c key binding for `ProgressBar` when the progress bar was not
created from the main thread. The current code would try to kill the main
thread when control-c was pressed.

New features:
- Accept a `cancel_callback` in `ProgressBar` to specify the cancellation
behavior for when `control-c` is pressed.
- Small performance improvement in the renderer.

3.0.31

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

New features:
- Pass through `name` property in `TextArea` widget to `Buffer`.
- Added a `enable_cpr` parameter to `Vt100_Output`, `TelnetServer` and
`PromptToolkitSSHServer`, to completely disable CPR support instead of
automatically detecting it.

3.0.30

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

New features:
- Allow zero-width-escape sequences in `print_formatted_text`.
- Add default value option for input dialog.
- Added `has_suggestion` filter.

Fixes:
- Fix rendering of control-shift-6 (or control-^). Render as '^^'
- Always wrap lines in the Label widget by default.
- Fix enter key binding in system toolbar in Vi mode.
- Improved handling of stdout objects that don't have a 'buffer' attribute. For
instance, when using `renderer_print_formatted_text` in a Jupyter Notebook.

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:
- Don't print exception messages twice for unhandled exceptions.
- Added cursor shape support.

Breaking changes:
- Drop Python 3.6 support.

3.0.22

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

New features:
- Improve rendering performance when there are many completions.

3.0.21

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

New features:
- Make ptipython respect more config changes.
(See: https://github.com/prompt-toolkit/ptpython/pull/110 )
- Improved performance of `DictionaryCompleter` for slow mappings.

Fixes:
- Call `super()` in `PythonInputFilter`. This will prevent potentially breakage
with an upcoming prompt_toolkit change.
(See: https://github.com/prompt-toolkit/python-prompt-toolkit/pull/1690 )
- Improved type annotations.
- Added `py.typed` to the `package_data`.

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.

3.0.7

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

New features:
- Option to show/hide private attributes during a completion
- Added `insert_blank_line_after_input` option similar to
`insert_blank_line_after_output`.

Fixes:
- Fixed some formatting issues of `__pt_repr__`.
- Abbreviate completion meta information for dictionary completer if needed.

3.0.6

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

New features:
- (Experimental) support for `__pt_repr__` methods. If objects implement this
method, this will be used to print the result in the REPL instead of the
normal `__repr__`.
- Added py.typed file, to enable type checking for applications that are
embedding ptpython.
Links

@pyup-bot
Copy link
Collaborator Author

pyup-bot commented Jul 4, 2023

Closing this in favor of #1547

@pyup-bot pyup-bot closed this Jul 4, 2023
@diegomaranhao diegomaranhao deleted the pyup-update-prompt-toolkit-3.0.5-to-3.0.38 branch July 4, 2023 13:22
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