# What changed in click

> 65 changes in click 8 from its official release notes, upgrade guides and advisories: 9 breaking, 3 deprecations, 1 security, 4 new APIs and options. Each one cited. Sources checked 2026-10-17. HTML: https://unstale.sh/pypi/click/

To see which of these apply to a repository, run `npx @unstale/cli init` in it.

## click 8

### Breaking changes

- Supported Windows versions enable ANSI terminal styles by default, removing the Colorama dependency. (8.5.0) — [release notes](https://github.com/pallets/click/releases/tag/8.5.0)
- Preserves 256-color index 0 and validates color arguments, raising ValueError for invalid colors. (8.5.0) — [release notes](https://github.com/pallets/click/releases/tag/8.5.0)
- Preserves 256-color index 0 and validates color arguments, raising ValueError for invalid colors. (8.5.0) — [release notes](https://github.com/pallets/click/releases/tag/8.5.0)
- CompositeParamType is now generic and has abstract methods. (8.4.0) — [release notes](https://github.com/pallets/click/releases/tag/8.4.0)
- Usage output now includes the prefix and program name when called without arguments. (8.4.0) — [release notes](https://github.com/pallets/click/releases/tag/8.4.0)
- The number-range base is now generic and has abstract methods. (8.4.0) — [release notes](https://github.com/pallets/click/releases/tag/8.4.0)
- Parameter is now an abstract base class and cannot be instantiated directly. (8.4.0) — [release notes](https://github.com/pallets/click/releases/tag/8.4.0)
- Parameter.name is now typed as str instead of str | None. (8.4.0) — [release notes](https://github.com/pallets/click/releases/tag/8.4.0)
- ParamType is now a generic abstract base class parameterized by its converted value type. (8.4.0) — [release notes](https://github.com/pallets/click/releases/tag/8.4.0)

### Security

- Commands are split into argv lists and run without shell=True, reducing shell execution risks. (8.3.3) — [release notes](https://github.com/pallets/click/releases/tag/8.3.3)

### Deprecations

- Deprecated because it mutates process-global state and is not thread-safe; use a temporary directory with absolute paths. (8.5.0) — [release notes](https://github.com/pallets/click/releases/tag/8.5.0)
- Moved to a private underscore-prefixed name; the old name remains with a DeprecationWarning until Click 9.0. (8.5.0) — [release notes](https://github.com/pallets/click/releases/tag/8.5.0)
- make_default_short_help is now marked as private API, signaling it should not be relied on by applications. (8.3.3) — [release notes](https://github.com/pallets/click/releases/tag/8.3.3)

### New APIs and options

- Argument accepts help text, and help output adds a Positional arguments section when available. (8.5.0) — [release notes](https://github.com/pallets/click/releases/tag/8.5.0)
- Takes an optional second type parameter describing the accepted input value, defaulting to Any. (8.5.0) — [release notes](https://github.com/pallets/click/releases/tag/8.5.0)
- Built-in shell completion now supports Windows PowerShell 5.1+ and pwsh 7+. (8.5.0) — [release notes](https://github.com/pallets/click/releases/tag/8.5.0)
- A file-like API was added for accessing an output pager. (8.4.0) — [release notes](https://github.com/pallets/click/releases/tag/8.4.0)

### Behavior and default changes

- Returns help option names in declaration order. (8.5.0) — [release notes](https://github.com/pallets/click/releases/tag/8.5.0)
- Help option metadata now exposes the reserved _click_default_help name. (8.5.0) — [release notes](https://github.com/pallets/click/releases/tag/8.5.0)
- Accepts os.PathLike filename values in addition to strings. (8.5.0) — [release notes](https://github.com/pallets/click/releases/tag/8.5.0)
- Now returns the type produced by type, value_proc, or a matching default instead of Any. (8.5.0) — [release notes](https://github.com/pallets/click/releases/tag/8.5.0)
- ANSI handling now strips the full CSI escape-sequence grammar. (8.5.0) — [release notes](https://github.com/pallets/click/releases/tag/8.5.0)
- Output is flushed after each write, allowing generators to stream incrementally to the pager. (8.4.2) — [release notes](https://github.com/pallets/click/releases/tag/8.4.2)
- Default capture no longer exposes the original file descriptor, preventing CLI dup2 calls from mutating host stdout. (8.4.0) — [release notes](https://github.com/pallets/click/releases/tag/8.4.0)
- Explicit defaults now win over auto-derived sibling defaults using source-aware arbitration. (8.4.0) — [release notes](https://github.com/pallets/click/releases/tag/8.4.0)
- Parameters with expose_value=False now have an empty-string name instead of None. (8.4.0) — [release notes](https://github.com/pallets/click/releases/tag/8.4.0)
- ParameterSource is now an IntEnum with members ordered from most to least explicit, enabling comparisons of explicit parameter sources. (8.3.3) — [release notes](https://github.com/pallets/click/releases/tag/8.3.3)

### Fixes and other changes

- The automatic help option now uses _click_default_help, allowing a parameter named help without breaking parsing. (8.5.0) — [release notes](https://github.com/pallets/click/releases/tag/8.5.0)
- Strips ANSI color and style codes from prompts when the output stream does not support them. (8.5.0) — [release notes](https://github.com/pallets/click/releases/tag/8.5.0)
- Windows temporary pager files use the output stream encoding with errors=replace, allowing encodable stdout text to reach the pager. (8.5.0) — [release notes](https://github.com/pallets/click/releases/tag/8.5.0)
- On Windows, again yields a text stream and honors the color argument for the temporary-file backend. (8.5.0) — [release notes](https://github.com/pallets/click/releases/tag/8.5.0)
- Pager write errors on Windows are no longer masked by a cleanup PermissionError. (8.5.0) — [release notes](https://github.com/pallets/click/releases/tag/8.5.0)
- The temporary-file pager backend now forwards parameters from PAGER to the pager command. (8.5.0) — [release notes](https://github.com/pallets/click/releases/tag/8.5.0)
- Feature-switch metadata now resolves default=True to the flag_value received at call time. (8.5.0) — [release notes](https://github.com/pallets/click/releases/tag/8.5.0)
- Avoids a BytesWarning under python -bb when checking allow_dash values against the dash convention. (8.5.0) — [release notes](https://github.com/pallets/click/releases/tag/8.5.0)
- Applies remaining steps when the bar finishes so show_pos displays the final total. (8.5.0) — [release notes](https://github.com/pallets/click/releases/tag/8.5.0)
- Strips ANSI color and style codes from prompts when the output stream does not support them. (8.5.0) — [release notes](https://github.com/pallets/click/releases/tag/8.5.0)
- Raw mode detection now parses option tokens. (8.5.0) — [release notes](https://github.com/pallets/click/releases/tag/8.5.0)
- Optional arguments no longer produce double square brackets when their type already brackets the metavar. (8.4.2) — [release notes](https://github.com/pallets/click/releases/tag/8.4.2)
- Deprecated commands and options with empty or missing help text no longer show a stray leading space before the deprecation label. (8.4.2) — [release notes](https://github.com/pallets/click/releases/tag/8.4.2)
- Newlines and tabs in option help text are escaped so multi-line help preserves the original completion format. (8.4.2) — [release notes](https://github.com/pallets/click/releases/tag/8.4.2)
- Groups configured with invoke_without_command=True mark their subcommand as optional in usage help. (8.4.2) — [release notes](https://github.com/pallets/click/releases/tag/8.4.2)
- package_name can resolve a top-level import name when it does not match the installed distribution name. (8.4.2) — [release notes](https://github.com/pallets/click/releases/tag/8.4.2)
- Shell completion of Choice Enum values now produces a valid completion result. (8.4.1) — [release notes](https://github.com/pallets/click/releases/tag/8.4.1)
- Empty byte-string handling in echo is fixed. (8.4.1) — [release notes](https://github.com/pallets/click/releases/tag/8.4.1)
- The closed file error with echo_via_pager is fixed. (8.4.1) — [release notes](https://github.com/pallets/click/releases/tag/8.4.1)
- get_parameter_source() is available during eager callbacks and type conversion again. (8.4.1) — [release notes](https://github.com/pallets/click/releases/tag/8.4.1)
- Zsh completion scripts now parse correctly on Windows. (8.4.1) — [release notes](https://github.com/pallets/click/releases/tag/8.4.1)
- Deprecated option labels now have correct spacing and localization matching the command label. (8.4.0) — [release notes](https://github.com/pallets/click/releases/tag/8.4.0)
- Error hints now choose non-shadowed help options and show all surviving names. (8.4.0) — [release notes](https://github.com/pallets/click/releases/tag/8.4.0)
- Non-Windows prompts now support proper backspace, line editing, and line wrapping. (8.4.0) — [release notes](https://github.com/pallets/click/releases/tag/8.4.0)
- Debugger calls in isolation now interact with the real terminal instead of captured I/O streams. (8.3.3) — [release notes](https://github.com/pallets/click/releases/tag/8.3.3)
- Redirected streams expose the original file descriptor, preventing crashes for faulthandler, subprocess, and other C-level consumers. (8.3.3) — [release notes](https://github.com/pallets/click/releases/tag/8.3.3)
- For boolean flags, default=True remains the literal value True instead of being replaced by flag_value. (8.3.3) — [release notes](https://github.com/pallets/click/releases/tag/8.3.3)
- Sentinel.UNSET values are treated as absent, allowing the next default source to provide the value. (8.3.3) — [release notes](https://github.com/pallets/click/releases/tag/8.3.3)
- Custom show_default strings are now displayed in prompts, matching existing help text behavior. (8.3.3) — [release notes](https://github.com/pallets/click/releases/tag/8.3.3)
- Options with is_flag=False can use flag_value without requiring an explicit value. (8.3.2) — [release notes](https://github.com/pallets/click/releases/tag/8.3.2)
- Callable flag_value values are no longer instantiated when used as defaults through default=True. (8.3.2) — [release notes](https://github.com/pallets/click/releases/tag/8.3.2)
- Sentinel.UNSET values are returned as None when resolving defaults. (8.3.2) — [release notes](https://github.com/pallets/click/releases/tag/8.3.2)
- Sentinel.UNSET default values are replaced by None when passed through Context.invoke(). (8.3.1) — [release notes](https://github.com/pallets/click/releases/tag/8.3.1)
- Pager arguments are no longer discarded because subprocess.Popen is used correctly. (8.3.1) — [release notes](https://github.com/pallets/click/releases/tag/8.3.1)
- Sentinel.UNSET values appear as None when callbacks look up other parameters through the context. (8.3.1) — [release notes](https://github.com/pallets/click/releases/tag/8.3.1)
- Rendering is fixed when prompt or confirm parameter prompt_suffix is empty. (8.3.1) — [release notes](https://github.com/pallets/click/releases/tag/8.3.1)
- Sentinel.UNSET conversion no longer happens too early, preventing incorrect behavior for multiple parameters sharing a name. (8.3.1) — [release notes](https://github.com/pallets/click/releases/tag/8.3.1)
- Parsing skips type_cast_value calls when Sentinel.UNSET is encountered. (8.3.1) — [release notes](https://github.com/pallets/click/releases/tag/8.3.1)
