unstale

pypi / click

click

What changed in click 8, from its official release notes, upgrade guides and advisories. Sources checked 2026-10-17.

9 breaking1 security3 deprecations4 new APIs and options10 behavior and defaults38 fixes and other

See which of these apply to your code, ranked, in your agent:

npx @unstale/cli init

@unstale/cli 0.1.0 on npm

click 865 changes

Breaking changes 9

  • Supported Windows versions enable ANSI terminal styles by default, removing the Colorama dependency.

    8.5.0release notes

  • Preserves 256-color index 0 and validates color arguments, raising ValueError for invalid colors.

    8.5.0release notes

  • Preserves 256-color index 0 and validates color arguments, raising ValueError for invalid colors.

    8.5.0release notes

  • CompositeParamType is now generic and has abstract methods.

    8.4.0release notes

  • Usage output now includes the prefix and program name when called without arguments.

    8.4.0release notes

  • The number-range base is now generic and has abstract methods.

    8.4.0release notes

  • Parameter is now an abstract base class and cannot be instantiated directly.

    8.4.0release notes

  • Parameter.name is now typed as str instead of str | None.

    8.4.0release notes

  • ParamType is now a generic abstract base class parameterized by its converted value type.

    8.4.0release notes

Security 1

  • Commands are split into argv lists and run without shell=True, reducing shell execution risks.

    8.3.3release notes

Deprecations 3

  • Deprecated because it mutates process-global state and is not thread-safe; use a temporary directory with absolute paths.

    8.5.0release notes

  • Moved to a private underscore-prefixed name; the old name remains with a DeprecationWarning until Click 9.0.

    8.5.0release notes

  • make_default_short_help is now marked as private API, signaling it should not be relied on by applications.

    8.3.3release notes

New APIs and options 4

  • Argument accepts help text, and help output adds a Positional arguments section when available.

    8.5.0release notes

  • Takes an optional second type parameter describing the accepted input value, defaulting to Any.

    8.5.0release notes

  • Built-in shell completion now supports Windows PowerShell 5.1+ and pwsh 7+.

    8.5.0release notes

  • A file-like API was added for accessing an output pager.

    8.4.0release notes

Behavior and default changes 10

  • Returns help option names in declaration order.

    8.5.0release notes

  • Help option metadata now exposes the reserved _click_default_help name.

    8.5.0release notes

  • Accepts os.PathLike filename values in addition to strings.

    8.5.0release notes

  • Now returns the type produced by type, value_proc, or a matching default instead of Any.

    8.5.0release notes

  • ANSI handling now strips the full CSI escape-sequence grammar.

    8.5.0release notes

  • Output is flushed after each write, allowing generators to stream incrementally to the pager.

    8.4.2release notes

  • Default capture no longer exposes the original file descriptor, preventing CLI dup2 calls from mutating host stdout.

    8.4.0release notes

  • Explicit defaults now win over auto-derived sibling defaults using source-aware arbitration.

    8.4.0release notes

  • Parameters with expose_value=False now have an empty-string name instead of None.

    8.4.0release notes

  • ParameterSource is now an IntEnum with members ordered from most to least explicit, enabling comparisons of explicit parameter sources.

    8.3.3release notes

Fixes and other changes 38

  • The automatic help option now uses _click_default_help, allowing a parameter named help without breaking parsing.

    8.5.0release notes

  • Strips ANSI color and style codes from prompts when the output stream does not support them.

    8.5.0release notes

  • Windows temporary pager files use the output stream encoding with errors=replace, allowing encodable stdout text to reach the pager.

    8.5.0release notes

  • On Windows, again yields a text stream and honors the color argument for the temporary-file backend.

    8.5.0release notes

  • Pager write errors on Windows are no longer masked by a cleanup PermissionError.

    8.5.0release notes

  • The temporary-file pager backend now forwards parameters from PAGER to the pager command.

    8.5.0release notes

  • Feature-switch metadata now resolves default=True to the flag_value received at call time.

    8.5.0release notes

  • Avoids a BytesWarning under python -bb when checking allow_dash values against the dash convention.

    8.5.0release notes

  • Applies remaining steps when the bar finishes so show_pos displays the final total.

    8.5.0release notes

  • Strips ANSI color and style codes from prompts when the output stream does not support them.

    8.5.0release notes

  • Raw mode detection now parses option tokens.

    8.5.0release notes

  • Optional arguments no longer produce double square brackets when their type already brackets the metavar.

    8.4.2release notes

  • Deprecated commands and options with empty or missing help text no longer show a stray leading space before the deprecation label.

    8.4.2release notes

  • Newlines and tabs in option help text are escaped so multi-line help preserves the original completion format.

    8.4.2release notes

  • Groups configured with invoke_without_command=True mark their subcommand as optional in usage help.

    8.4.2release notes

  • package_name can resolve a top-level import name when it does not match the installed distribution name.

    8.4.2release notes

  • Shell completion of Choice Enum values now produces a valid completion result.

    8.4.1release notes

  • Empty byte-string handling in echo is fixed.

    8.4.1release notes

  • The closed file error with echo_via_pager is fixed.

    8.4.1release notes

  • get_parameter_source() is available during eager callbacks and type conversion again.

    8.4.1release notes

  • Zsh completion scripts now parse correctly on Windows.

    8.4.1release notes

  • Deprecated option labels now have correct spacing and localization matching the command label.

    8.4.0release notes

  • Error hints now choose non-shadowed help options and show all surviving names.

    8.4.0release notes

  • Non-Windows prompts now support proper backspace, line editing, and line wrapping.

    8.4.0release notes

  • Debugger calls in isolation now interact with the real terminal instead of captured I/O streams.

    8.3.3release notes

  • Redirected streams expose the original file descriptor, preventing crashes for faulthandler, subprocess, and other C-level consumers.

    8.3.3release notes

  • For boolean flags, default=True remains the literal value True instead of being replaced by flag_value.

    8.3.3release notes

  • Sentinel.UNSET values are treated as absent, allowing the next default source to provide the value.

    8.3.3release notes

  • Custom show_default strings are now displayed in prompts, matching existing help text behavior.

    8.3.3release notes

  • Options with is_flag=False can use flag_value without requiring an explicit value.

    8.3.2release notes

  • Callable flag_value values are no longer instantiated when used as defaults through default=True.

    8.3.2release notes

  • Sentinel.UNSET values are returned as None when resolving defaults.

    8.3.2release notes

  • Sentinel.UNSET default values are replaced by None when passed through Context.invoke().

    8.3.1release notes

  • Pager arguments are no longer discarded because subprocess.Popen is used correctly.

    8.3.1release notes

  • Sentinel.UNSET values appear as None when callbacks look up other parameters through the context.

    8.3.1release notes

  • Rendering is fixed when prompt or confirm parameter prompt_suffix is empty.

    8.3.1release notes

  • Sentinel.UNSET conversion no longer happens too early, preventing incorrect behavior for multiple parameters sharing a name.

    8.3.1release notes

  • Parsing skips type_cast_value calls when Sentinel.UNSET is encountered.

    8.3.1release notes