Skip to content
Myr

Update documentation following Colorama removal

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Refs #3505

authored by Kevin Deldycke · committed by Kevin Deldycke · parent 94c191c · Browse files · 3 files+5 added−10 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

3 files+5 added−10 removed

  • other:+5 added−10 removed

3 files+5 added−10 removed

modified:docs/utils.md+3 added-7 removed
50 unmodified lines
5152```{versionadded} 2.053```5455The {func}`echo` function supports ANSI colors and styles.55The {func}`echo` function supports ANSI colors and styles. It will56automatically strip ANSI color codes if the stream is not connected to a57terminal.5857Primarily this means that:5859- Click's {func}`echo` function will automatically strip ANSI color codes if the stream is not connected to a terminal.60- the {func}`echo` function will transparently connect to the terminal on Windows and translate ANSI codes to terminal61 API calls. This means that colors will work on Windows the same way they do on other operating systems.6259:::{admonition} Older Windows Support60:class: note6162Recent Windows 11 supports ANSI styling by default, in both Terminal and cmd.exe.
351 unmodified lines
modified:src/click/termui.py+2 added-2 removed
80 unmodified lines
81 return getpass.getpass(prompt)828384def _readline_prompt(func: t.Callable[[str], str], text: str, err: bool) -> str:85 """Call a prompt function, passing the full prompt on non-Windows so86 readline can handle line editing and cursor positioning correctly.85 """Call a prompt function, passing the full prompt so readline can86 handle line editing and cursor positioning correctly.8788 The prompt is handed to *func* (such as :func:`input`) rather than89 written through :func:`echo`, so it has to strip ANSI color and style90 codes itself when the destination stream does not support them. Without
858 unmodified lines
modified:src/click/utils.py-1 removed
257 unmodified lines
258 - Ensures that the output encoding is not misconfigured on Linux.259 - Supports Unicode in the Windows console.260 - Supports writing to binary outputs, and supports writing bytes261 to text outputs.262 - Supports colors and styles on Windows.262 - Removes ANSI color and style codes if the output does not look263 like an interactive terminal.264 - Always flushes the output.265
381 unmodified lines