Move changes to markdown (#3560)
Before adoption: this commit came in with the history the project adopted, so no landing records it.
authored by Rowlando13 · committed by GitHub · parents c480210, 03d3b8a · Browse files · 3 files·+1557 added−1508 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+1557 added−1508 removed
- other:+1557 added−1508 removed
Provenance
- Commit
4fc0e90- Tree
f575dc7- Author
Rowlando13 <67291205+Rowlando13@users.noreply.github.com>- Committer
GitHub <noreply@github.com>- Parent 1
c480210- Parent 2
03d3b8a
3 files changed+1557 added−1508 removed
modified:docs/changes.md+1 added-2 removed
123434# Changes
```{eval-rst}.. include:: ../CHANGES.rst```{include} ../CHANGES.md```added:CHANGES.md+1556 added
1+## Version 8.5.02+3+Unreleased4+5+- Supported versions of Windows enable ANSI terminal styles by default.6+ Colorama is no longer a dependency and is not used. {issue}`2986` {pr}`3505`7+- {class}`Argument` accepts a `help` parameter, and help output includes8+ a `Positional arguments` section when argument help is available. {issue}`2983` {pr}`3473`9+10+## Version 8.4.211+12+Unreleased13+14+- Fix Fish shell completion broken in `8.4.0` by {pr}`3126`. Newlines and15+ tabs in option help text are now escaped, keeping the original completion16+ format while still supporting multi-line help. {issue}`3502`17+ {issue}`3043` {pr}`3504` {pr}`3508`18+- Deprecated commands and options with empty or missing help text no longer19+ render a stray leading space before the `(DEPRECATED)` label. {pr}`3509`20+- A {class}`Group` with `invoke_without_command=True` marks its subcommand as21+ optional in the usage help, showing `[COMMAND]` instead of `COMMAND`.22+ {issue}`3059` {pr}`3507`23+24+## Version 8.4.125+26+Released 2026-05-2127+28+- `get_parameter_source()` is available during eager callbacks and type29+ conversion again. {issue}`3458` {issue}`3484`30+- Zsh completion scripts parse correctly on Windows. {issue}`3277` {pr}`3466`31+- Shell completion of `Choice` `Enum` values produces a valid completion32+ result. {issue}`3015`33+- Fix empty byte-string handling in echo. {issue}`3487`34+- Fix closed file error with `echo_via_pager`. {issue}`3449`35+36+## Version 8.4.037+38+Released 2026-05-1739+40+- {class}`ParamType` typing improvements. {pr}`3371`41+42+ - {class}`ParamType` is now a generic abstract base class,43+ parameterized by its converted value type.44+ - {meth}`~ParamType.convert` return types are narrowed on all45+ concrete types (`str` for {class}`STRING`, `int` for46+ {class}`INT`, etc.).47+ - {meth}`~ParamType.to_info_dict` returns specific48+ {class}`~typing.TypedDict` subclasses instead of49+ `dict[str, Any]`.50+ - {class}`CompositeParamType` and the number-range base are now51+ generic with abstract methods.52+53+- Refactor `convert_type` to extract type inference into a private54+ `_guess_type` helper, and add {func}`typing.overload` signatures.55+ {pr}`3372`56+57+- {class}`Parameter` typing improvements. {pr}`2805`58+59+ - {class}`Parameter` is now an abstract base class, making explicit60+ that it cannot be instantiated directly.61+ - {attr}`Parameter.name` is now `str` instead of `str | None`.62+ When `expose_value=False`, the name is set to `""` instead63+ of `None`.64+ - The `ctx` parameter of {meth}`Parameter.get_error_hint` is now65+ typed as `Context | None`, matching the runtime behavior.66+67+- Split string values from `default_map` for parameters with `nargs > 1`68+ or {class}`Tuple` type, matching environment variable behavior.69+ {issue}`2745` {pr}`3364`70+71+- Auto-detect `type=UNPROCESSED` for `flag_value` of non-basic types72+ (not `str`, `int`, `float`, or `bool`), so programmer-provided73+ Python objects like classes and enum members are passed through unchanged74+ instead of being stringified. Previously `type=click.UNPROCESSED` had75+ to be set explicitly. {issue}`2012` {pr}`3363`76+77+- The error hint now uses {meth}`Command.get_help_option_names` to pick78+ non-shadowed help option names, so `Try '... -h'` no longer points to a79+ subcommand option that shadows `-h`. The longest surviving name is80+ shown (`--help` over `-h`) for readability. {issue}`2790` {pr}`3208`81+82+- Fix readline functionality on non-Windows platforms. Prompt text is now83+ passed directly to readline instead of being printed separately, allowing84+ proper backspace, line editing, and line wrapping behavior. {issue}`2968`85+ {pr}`2969`86+87+- Use {func}`os.startfile` on Windows to open URLs in {func}`open_url`,88+ replacing the `start` built-in which cannot be invoked without89+ `shell=True`. {issue}`3164` {pr}`3186`90+91+- Fix Fish shell completion errors when option help text contains newlines.92+ {issue}`3043` {pr}`3126`93+94+- Add {class}`NoSuchCommand` exception with suggestions for misspelled95+ commands. {issue}`3107` {pr}`3228`96+97+- Use {class}`ValueError` message when conversion in {class}`FuncParamType` would98+ fail. {issue}`3105` {pr}`3211`99+100+- Add `click.get_pager_file` for file-like access to an output101+ pager. {pr}`1572` {pr}`3405`102+103+- {func}`~click.formatting.wrap_text` now measures line width in visible104+ characters, ignoring ANSI escape sequences. {pr}`3420`105+106+- Fix {meth}`HelpFormatter.write_usage` emitting only a blank line when107+ called without `args`. The usage prefix and program name are now108+ written even when no arguments follow, and the trailing separator109+ space is stripped so the line ends at the program name.110+ {issue}`3360` {pr}`3434`111+112+- Show custom error messages from types when {func}`prompt` with113+ `hide_input=True` fails validation, instead of always showing a114+ generic message. Built-in type messages mask the input value.115+ {issue}`2809` {pr}`3256`116+117+- Add `capture` parameter to {class}`CliRunner` with two modes: `sys`118+ (default) and `fd`. `fd` redirects file descriptors `1` and `2`119+ via {func}`os.dup2` so output that bypasses `sys.stdout` (stale stream120+ references, C extensions, subprocesses, `faulthandler`) is captured121+ with proper isolation. {issue}`854` {issue}`2412` {issue}`2468`122+ {issue}`2497` {issue}`2761` {issue}`2827` {issue}`2865` {pr}`3391`123+124+- Revert the `8.3.3` change that exposed the original file descriptor125+ via `fileno()` on the redirected `CliRunner` streams in the default126+ capture mode. `os.dup2(w, sys.stdout.fileno())` calls inside a CLI no127+ longer mutate the host runner's stdout, which broke Pytest's `fd`-level128+ capture teardown. C-level consumers that need a real `fd` should use129+ `capture="fd"`. {issue}`3384` {pr}`3391`130+131+- Mark additional built-in strings with `gettext()` to extend translation132+ coverage. {pr}`2902`133+134+- Fix feature switch groups (several `flag_value` options sharing one135+ parameter name) silently dropping an explicit `default` when a sibling136+ option without an explicit default was declared first. Arbitration is now137+ source-aware: a more explicit {class}`ParameterSource` always wins, and138+ within `ParameterSource.DEFAULT`, an option that received an explicit139+ `default=` keyword wins over a sibling whose default was auto-derived.140+ The 8.3.x first-wins fallback for remaining ties was reverted to the141+ pre-8.3.x last-wins fallback. {issue}`3403` {pr}`3404`142+143+- Fix missing space between option help text and the `(DEPRECATED)`144+ label, and localize the option label so it matches the command label.145+ The label and the `DeprecationWarning` reason suffix are now produced146+ by shared helpers. {pr}`3423`147+148+- Document short option stacking (`-abc` is parsed as `-a -b -c`) and149+ clarify that multi-character short option names are not supported.150+ {issue}`2779` {pr}`3431`151+152+## Version 8.3.3153+154+Released 2026-04-20155+156+- Use {func}`shlex.split` to split pager and editor commands into `argv`157+ lists for {class}`subprocess.Popen`, removing `shell=True`.158+ {issue}`1026` {pr}`1477` {pr}`2775`159+- Fix `TypeError` when rendering help for an option whose default value is160+ an object that doesn't support equality comparison with strings, such as161+ `semver.Version`. {issue}`3298` {pr}`3299`162+- Fix pager test pollution under parallel execution by using pytest's163+ `tmp_path` fixture instead of a shared temporary file path. {pr}`3238`164+- Treat `Sentinel.UNSET` values in a `default_map` as absent, so they fall165+ through to the next default source instead of being used as the value.166+ {issue}`3224` {pr}`3240`167+- Patch `pdb.Pdb` in `CliRunner` isolation so `pdb.set_trace()`,168+ `breakpoint()`, and debuggers subclassing `pdb.Pdb` (ipdb, pdbpp) can169+ interact with the real terminal instead of the captured I/O streams.170+ {issue}`654` {issue}`824` {issue}`843` {pr}`951` {pr}`3235`171+- Add optional randomized parallel test execution using `pytest-randomly` and172+ `pytest-xdist` to detect test pollution and race conditions. {pr}`3151`173+- Add contributor documentation for running stress tests, randomized174+ parallel tests, and Flask smoke tests. {pr}`3151` {pr}`3177`175+- Show custom `show_default` string in prompts, matching the existing176+ help text behavior. {issue}`2836` {pr}`2837` {pr}`3165` {pr}`3262` {pr}`3280`177+ {pr}`3328`178+- Fix `default=True` with boolean `flag_value` always returning the179+ `flag_value` instead of `True`. The `default=True` to `flag_value`180+ substitution now only applies to non-boolean flags, where `True` acts as a181+ sentinel meaning "activate this flag by default". For boolean flags,182+ `default=True` is returned as a literal value. {issue}`3111` {pr}`3239`183+- Mark `make_default_short_help` as private API. {issue}`3189` {pr}`3250`184+- `CliRunner`'s redirected streams now expose the original file descriptor185+ via `fileno()`, so that `faulthandler`, `subprocess`, and other186+ C-level consumers no longer crash with `io.UnsupportedOperation`.187+ {issue}`2865`188+- Change {class}`ParameterSource` to an {class}`~enum.IntEnum` and reorder189+ its members from most to least explicit, so values can be compared to190+ check whether a parameter was explicitly provided. {issue}`2879` {pr}`3248`191+192+## Version 8.3.2193+194+Released 2026-04-02195+196+- Fix handling of `flag_value` when `is_flag=False` to allow such options to be197+ used without an explicit value. {issue}`3084` {pr}`3152`198+- Hide `Sentinel.UNSET` values as `None` when using `lookup_default()`.199+ {issue}`3136` {pr}`3199` {pr}`3202` {pr}`3209` {pr}`3212` {pr}`3224`200+- Prevent `_NamedTextIOWrapper` from closing streams owned by `StreamMixer`.201+ {issue}`824` {issue}`2991` {issue}`2993` {issue}`3110` {pr}`3139` {pr}`3140`202+- Add comprehensive tests for `CliRunner` stream lifecycle, covering203+ logging interaction, multi-threaded safety, and sequential invocation204+ isolation. Add high-iteration stress tests behind a `stress` marker205+ with a dedicated CI job. {pr}`3139`206+- Fix callable `flag_value` being instantiated when used as a default via207+ `default=True`. {issue}`3121` {pr}`3201` {pr}`3213` {pr}`3225`208+209+## Version 8.3.1210+211+Released 2025-11-15212+213+- Don't discard pager arguments by correctly using `subprocess.Popen`. {issue}`3039`214+ {pr}`3055`215+- Replace `Sentinel.UNSET` default values by `None` as they're passed through216+ the `Context.invoke()` method. {issue}`3066` {issue}`3065` {pr}`3068`217+- Fix conversion of `Sentinel.UNSET` happening too early, which caused incorrect218+ behavior for multiple parameters using the same name. {issue}`3071` {pr}`3079`219+- Hide `Sentinel.UNSET` values as `None` when looking up for other parameters220+ through the context inside parameter callbacks. {issue}`3136` {pr}`3137`221+- Fix rendering when `prompt` and `confirm` parameter `prompt_suffix` is222+ empty. {issue}`3019` {pr}`3021`223+- When `Sentinel.UNSET` is found during parsing, it will skip calls to224+ `type_cast_value`. {issue}`3069` {pr}`3090`225+226+## Version 8.3.0227+228+Released 2025-09-17229+230+- **Improved flag option handling**: Reworked the relationship between `flag_value`231+ and `default` parameters for better consistency:232+233+ - The `default` parameter value is now preserved as-is and passed directly234+ to CLI functions (no more unexpected transformations)235+ - Exception: flag options with `default=True` maintain backward compatibility236+ by defaulting to their `flag_value`237+ - The `default` parameter can now be any type (`bool`, `None`, etc.)238+ - Fixes inconsistencies reported in: {issue}`1992` {issue}`2514` {issue}`2610`239+ {issue}`3024` {pr}`3030`240+241+- Allow `default` to be set on `Argument` for `nargs = -1`. {issue}`2164`242+ {pr}`3030`243+244+- Show correct auto complete value for `nargs` option in combination with flag245+ option {issue}`2813`246+247+- Fix handling of quoted and escaped parameters in Fish autocompletion. {issue}`2995` {pr}`3013`248+249+- Lazily import `shutil`. {pr}`3023`250+251+- Properly forward exception information to resources registered with252+ `click.core.Context.with_resource()`. {issue}`2447` {pr}`3058`253+254+- Fix regression related to EOF handling in `CliRunner`. {issue}`2939` {pr}`2940`255+256+## Version 8.2.2257+258+Released 2025-07-31259+260+- Fix reconciliation of `default`, `flag_value` and `type` parameters for261+ flag options, as well as parsing and normalization of environment variables.262+ {issue}`2952` {pr}`2956`263+- Fix typing issue in `BadParameter` and `MissingParameter` exceptions for the264+ parameter `param_hint` that did not allow for a sequence of string where the265+ underlying function `_join_param_hints` allows for it. {issue}`2777` {pr}`2990`266+- Use the value of `Enum` choices to render their default value in help267+ screen. Refs {issue}`2911` {pr}`3004`268+- Fix completion for the Z shell (`zsh`) for completion items containing269+ colons. {issue}`2703` {pr}`2846`270+- Don't include envvar in error hint when not configured. {issue}`2971` {pr}`2972`271+- Fix a rare race in `click.testing.StreamMixer`'s finalization that manifested272+ as a `ValueError` on close in a multi-threaded test session.273+ {issue}`2993` {pr}`2991`274+275+## Version 8.2.1276+277+Released 2025-05-20278+279+- Fix flag value handling for flag options with a provided type. {issue}`2894`280+ {issue}`2897` {pr}`2930`281+- Fix shell completion for nested groups. {issue}`2906` {pr}`2907`282+- Flush `sys.stderr` at the end of `CliRunner.invoke`. {issue}`2682`283+- Fix EOF handling for stdin input in CliRunner. {issue}`2787`284+285+## Version 8.2.0286+287+Released 2025-05-10288+289+- Drop support for Python 3.7, 3.8, and 3.9. {pr}`2588` {pr}`2893`290+291+- Use modern packaging metadata with `pyproject.toml` instead of `setup.cfg`.292+ {pr}`2438`293+294+- Use `flit_core` instead of `setuptools` as build backend. {pr}`2543`295+296+- Deprecate the `__version__` attribute. Use feature detection, or297+ `importlib.metadata.version("click")`, instead. {issue}`2598`298+299+- `BaseCommand` is deprecated. `Command` is the base class for all300+ commands. {issue}`2589`301+302+- `MultiCommand` is deprecated. `Group` is the base class for all group303+ commands. {issue}`2590`304+305+- The current parser and related classes and methods, are deprecated.306+ {issue}`2205`307+308+ - `OptionParser` and the `parser` module, which is a modified copy of309+ `optparse` in the standard library.310+ - `Context.protected_args` is unneeded. `Context.args` contains any311+ remaining arguments while parsing.312+ - `Parameter.add_to_parser` (on both `Argument` and `Option`) is313+ unneeded. Parsing works directly without building a separate parser.314+ - `split_arg_string` is moved from `parser` to `shell_completion`.315+316+- Enable deferred evaluation of annotations with317+ `from __future__ import annotations`. {pr}`2270`318+319+- When generating a command's name from a decorated function's name, the320+ suffixes `_command`, `_cmd`, `_group`, and `_grp` are removed.321+ {issue}`2322`322+323+- Show the `types.ParamType.name` for `types.Choice` options within324+ `--help` message if `show_choices=False` is specified.325+ {issue}`2356`326+327+- Do not display default values in prompts when `Option.show_default` is328+ `False`. {pr}`2509`329+330+- Add `get_help_extra` method on `Option` to fetch the generated extra331+ items used in `get_help_record` to render help text. {issue}`2516`332+ {pr}`2517`333+334+- Keep stdout and stderr streams independent in `CliRunner`. Always335+ collect stderr output and never raise an exception. Add a new336+ output stream to simulate what the user sees in its terminal. Removes337+ the `mix_stderr` parameter in `CliRunner`. {issue}`2522` {pr}`2523`338+339+- `Option.show_envvar` now also shows environment variable in error messages.340+ {issue}`2695` {pr}`2696`341+342+- `Context.close` will be called on exit. This results in all343+ `Context.call_on_close` callbacks and context managers added via344+ `Context.with_resource` to be closed on exit as well. {pr}`2680`345+346+- Add `ProgressBar(hidden: bool)` to allow hiding the progressbar. {issue}`2609`347+348+- A `UserWarning` will be shown when multiple parameters attempt to use the349+ same name. {issue}`2396`350+351+- When using `Option.envvar` with `Option.flag_value`, the `flag_value`352+ will always be used instead of the value of the environment variable.353+ {issue}`2746` {pr}`2788`354+355+- Add `Choice.get_invalid_choice_message` method for customizing the356+ invalid choice message. {issue}`2621` {pr}`2622`357+358+- If help is shown because `no_args_is_help` is enabled (defaults to `True`359+ for groups, `False` for commands), the exit code is 2 instead of 0.360+ {issue}`1489` {pr}`1489`361+362+- Contexts created during shell completion are closed properly, fixing363+ a `ResourceWarning` when using `click.File`. {issue}`2644` {pr}`2800`364+ {pr}`2767`365+366+- `click.edit(filename)` now supports passing an iterable of filenames in367+ case the editor supports editing multiple files at once. Its return type368+ is now also typed: `AnyStr` if `text` is passed, otherwise `None`.369+ {issue}`2067` {pr}`2068`370+371+- Specialized typing of `progressbar(length=...)` as `ProgressBar[int]`.372+ {pr}`2630`373+374+- Improve `echo_via_pager` behaviour in face of errors.375+ {issue}`2674`376+377+ - Terminate the pager in case a generator passed to `echo_via_pager`378+ raises an exception.379+ - Ensure to always close the pipe to the pager process and wait for it380+ to terminate.381+ - `echo_via_pager` will not ignore `KeyboardInterrupt` anymore. This382+ allows the user to search for future output of the generator when383+ using less and then aborting the program using ctrl-c.384+385+- `deprecated: bool | str` can now be used on options and arguments. This386+ previously was only available for `Command`. The message can now also be387+ customised by using a `str` instead of a `bool`. {issue}`2263` {pr}`2271`388+389+ - `Command.deprecated` formatting in `--help` changed from390+ `(Deprecated) help` to `help (DEPRECATED)`.391+ - Parameters cannot be required nor prompted or an error is raised.392+ - A warning will be printed when something deprecated is used.393+394+- Add a `catch_exceptions` parameter to `CliRunner`. If395+ `catch_exceptions` is not passed to `CliRunner.invoke`, the value396+ from `CliRunner` is used. {issue}`2817` {pr}`2818`397+398+- `Option.flag_value` will no longer have a default value set based on399+ `Option.default` if `Option.is_flag` is `False`. This results in400+ `Option.default` not needing to implement `__bool__`. {pr}`2829`401+402+- Incorrect `click.edit` typing has been corrected. {pr}`2804`403+404+- `Choice` is now generic and supports any iterable value.405+ This allows you to use enums and other non-`str` values. {pr}`2796`406+ {issue}`605`407+408+- Fix setup of help option's defaults when using a custom class on its409+ decorator. Removes `HelpOption`. {issue}`2832` {pr}`2840`410+411+## Version 8.1.8412+413+Released 2024-12-19414+415+- Fix an issue with type hints for `click.open_file()`. {issue}`2717`416+- Fix issue where error message for invalid `click.Path` displays on417+ multiple lines. {issue}`2697`418+- Fixed issue that prevented a default value of `""` from being displayed in419+ the help for an option. {issue}`2500`420+- The test runner handles stripping color consistently on Windows.421+ {issue}`2705`422+- Show correct value for flag default when using `default_map`.423+ {issue}`2632`424+- Fix `click.echo(color=...)` passing `color` to coloroma so it can be425+ forced on Windows. {issue}`2606`.426+- More robust bash version check, fixing problem on Windows with git-bash.427+ {issue}`2638`428+- Cache the help option generated by the `help_option_names` setting to429+ respect its eagerness. {pr}`2811`430+- Replace uses of `os.system` with `subprocess.Popen`. {issue}`1476`431+- Exceptions generated during a command will use the context's `color`432+ setting when being displayed. {issue}`2193`433+- Error message when defining option with invalid name is more descriptive.434+ {issue}`2452`435+- Refactor code generating default `--help` option to deduplicate code.436+ {pr}`2563`437+- Test `CLIRunner` resets patched `_compat.should_strip_ansi`.438+ {issue}`2732`439+440+## Version 8.1.7441+442+Released 2023-08-17443+444+- Fix issue with regex flags in shell completion. {issue}`2581`445+- Bash version detection issues a warning instead of an error. {issue}`2574`446+- Fix issue with completion script for Fish shell. {issue}`2567`447+448+## Version 8.1.6449+450+Released 2023-07-18451+452+- Fix an issue with type hints for `@click.group()`. {issue}`2558`453+454+## Version 8.1.5455+456+Released 2023-07-13457+458+- Fix an issue with type hints for `@click.command()`, `@click.option()`, and459+ other decorators. Introduce typing tests. {issue}`2558`460+461+## Version 8.1.4462+463+Released 2023-07-06464+465+- Replace all `typing.Dict` occurrences to `typing.MutableMapping` for466+ parameter hints. {issue}`2255`467+- Improve type hinting for decorators and give all generic types parameters.468+ {issue}`2398`469+- Fix return value and type signature of `shell_completion.add_completion_class`470+ function. {pr}`2421`471+- Bash version detection doesn't fail on Windows. {issue}`2461`472+- Completion works if there is a dot (`.`) in the program name. {issue}`2166`473+- Improve type annotations for pyright type checker. {issue}`2268`474+- Improve responsiveness of `click.clear()`. {issue}`2284`475+- Improve command name detection when using Shiv or PEX. {issue}`2332`476+- Avoid showing empty lines if command help text is empty. {issue}`2368`477+- ZSH completion script works when loaded from `fpath`. {issue}`2344`.478+- `EOFError` and `KeyboardInterrupt` tracebacks are not suppressed when479+ `standalone_mode` is disabled. {issue}`2380`480+- `@group.command` does not fail if the group was created with a custom481+ `command_class`. {issue}`2416`482+- `multiple=True` is allowed for flag options again and does not require483+ setting `default=()`. {issue}`2246, 2292, 2295`484+- Make the decorators returned by `@argument()` and `@option()` reusable when the485+ `cls` parameter is used. {issue}`2294`486+- Don't fail when writing filenames to streams with strict errors. Replace invalid487+ bytes with the replacement character (`�`). {issue}`2395`488+- Remove unnecessary attempt to detect MSYS2 environment. {issue}`2355`489+- Remove outdated and unnecessary detection of App Engine environment. {pr}`2554`490+- `echo()` does not fail when no streams are attached, such as with `pythonw` on491+ Windows. {issue}`2415`492+- Argument with `expose_value=False` do not cause completion to fail. {issue}`2336`493+494+## Version 8.1.3495+496+Released 2022-04-28497+498+- Use verbose form of `typing.Callable` for `@command` and499+ `@group`. {issue}`2255`500+- Show error when attempting to create an option with501+ `multiple=True, is_flag=True`. Use `count` instead.502+ {issue}`2246`503+504+## Version 8.1.2505+506+Released 2022-03-31507+508+- Fix error message for readable path check that was mixed up with the509+ executable check. {pr}`2236`510+- Restore parameter order for `Path`, placing the `executable`511+ parameter at the end. It is recommended to use keyword arguments512+ instead of positional arguments. {issue}`2235`513+514+## Version 8.1.1515+516+Released 2022-03-30517+518+- Fix an issue with decorator typing that caused type checking to519+ report that a command was not callable. {issue}`2227`520+521+## Version 8.1.0522+523+Released 2022-03-28524+525+- Drop support for Python 3.6. {pr}`2129`526+527+- Remove previously deprecated code. {pr}`2130`528+529+ - `Group.resultcallback` is renamed to `result_callback`.530+ - `autocompletion` parameter to `Command` is renamed to531+ `shell_complete`.532+ - `get_terminal_size` is removed, use533+ `shutil.get_terminal_size` instead.534+ - `get_os_args` is removed, use `sys.argv[1:]` instead.535+536+- Rely on {pep}`538` and {pep}`540` to handle selecting UTF-8 encoding537+ instead of ASCII. Click's locale encoding detection is removed.538+ {issue}`2198`539+540+- Single options boolean flags with `show_default=True` only show541+ the default if it is `True`. {issue}`1971`542+543+- The `command` and `group` decorators can be applied with or544+ without parentheses. {issue}`1359`545+546+- The `Path` type can check whether the target is executable.547+ {issue}`1961`548+549+- `Command.show_default` overrides `Context.show_default`, instead550+ of the other way around. {issue}`1963`551+552+- Parameter decorators and `@group` handles `cls=None` the same as553+ not passing `cls`. `@option` handles `help=None` the same as554+ not passing `help`. {issue}`##1959`555+556+- A flag option with `required=True` requires that the flag is557+ passed instead of choosing the implicit default value. {issue}`1978`558+559+- Indentation in help text passed to `Option` and `Command` is560+ cleaned the same as using the `@option` and `@command`561+ decorators does. A command's `epilog` and `short_help` are also562+ processed. {issue}`1985`563+564+- Store unprocessed `Command.help`, `epilog` and `short_help`565+ strings. Processing is only done when formatting help text for566+ output. {issue}`2149`567+568+- Allow empty str input for `prompt()` when569+ `confirmation_prompt=True` and `default=""`. {issue}`2157`570+571+- Windows glob pattern expansion doesn't fail if a value is an invalid572+ pattern. {issue}`2195`573+574+- It's possible to pass a list of `params` to `@command`. Any575+ params defined with decorators are appended to the passed params.576+ {issue}`2131`.577+578+- `@command` decorator is annotated as returning the correct type if579+ a `cls` argument is used. {issue}`2211`580+581+- A `Group` with `invoke_without_command=True` and `chain=False`582+ will invoke its result callback with the group function's return583+ value. {issue}`2124`584+585+- `to_info_dict` will not fail if a `ParamType` doesn't define a586+ `name`. {issue}`2168`587+588+- Shell completion prioritizes option values with option prefixes over589+ new options. {issue}`2040`590+591+- Options that get an environment variable value using592+ `autoenvvar_prefix` treat an empty value as `None`, consistent593+ with a direct `envvar`. {issue}`2146`594+595+## Version 8.0.4596+597+Released 2022-02-18598+599+- `open_file` recognizes `Path("-")` as a standard stream, the600+ same as the string `"-"`. {issue}`2106`601+- The `option` and `argument` decorators preserve the type602+ annotation of the decorated function. {pr}`2155`603+- A callable default value can customize its help text by overriding604+ `__str__` instead of always showing `(dynamic)`. {issue}`2099`605+- Fix a typo in the Bash completion script that affected file and606+ directory completion. If this script was generated by a previous607+ version, it should be regenerated. {issue}`2163`608+- Fix typing for `echo` and `secho` file argument.609+ {issue}`2174, 2185`610+611+## Version 8.0.3612+613+Released 2021-10-10614+615+- Fix issue with `Path(resolve_path=True)` type creating invalid616+ paths. {issue}`2088`617+- Importing `readline` does not cause the `confirm()` prompt to618+ disappear when pressing backspace. {issue}`2092`619+- Any default values injected by `invoke()` are cast to the620+ corresponding parameter's type. {issue}`2089, 2090`621+622+## Version 8.0.2623+624+Released 2021-10-08625+626+- `is_bool_flag` is not set to `True` if `is_flag` is `False`.627+ {issue}`1925`628+- Bash version detection is locale independent. {issue}`1940`629+- Empty `default` value is not shown for `multiple=True`.630+ {issue}`1969`631+- Fix shell completion for arguments that start with a forward slash632+ such as absolute file paths. {issue}`1929`633+- `Path` type with `resolve_path=True` resolves relative symlinks634+ to be relative to the containing directory. {issue}`1921`635+- Completion does not skip Python's resource cleanup when exiting,636+ avoiding some unexpected warning output. {issue}`1738, 2017`637+- Fix type annotation for `type` argument in `prompt` function.638+ {issue}`2062`639+- Fix overline and italic styles, which were incorrectly added when640+ adding underline. {pr}`2058`641+- An option with `count=True` will not show "[x>=0]" in help text.642+ {issue}`2072`643+- Default values are not cast to the parameter type twice during644+ processing. {issue}`2085`645+- Options with `multiple` and `flag_value` use the flag value646+ instead of leaving an internal placeholder. {issue}`2001`647+648+## Version 8.0.1649+650+Released 2021-05-19651+652+- Mark top-level names as exported so type checking understand imports653+ in user projects. {issue}`1879`654+- Annotate `Context.obj` as `Any` so type checking allows all655+ operations on the arbitrary object. {issue}`1885`656+- Fix some types that weren't available in Python 3.6.0. {issue}`1882`657+- Fix type checking for iterating over `ProgressBar` object.658+ {issue}`1892`659+- The `importlib_metadata` backport package is installed on Python \<660+ 3.8. {issue}`1889`661+- Arguments with `nargs=-1` only use env var value if no command662+ line values are given. {issue}`1903`663+- Flag options guess their type from `flag_value` if given, like664+ regular options do from `default`. {issue}`1886`665+- Added documentation that custom parameter types may be passed666+ already valid values in addition to strings. {issue}`1898`667+- Resolving commands returns the name that was given, not668+ `command.name`, fixing an unintended change to help text and669+ `default_map` lookups. When using patterns like `AliasedGroup`,670+ override `resolve_command` to change the name that is returned if671+ needed. {issue}`1895`672+- If a default value is invalid, it does not prevent showing help673+ text. {issue}`1889`674+- Pass `windows_expand_args=False` when calling the main command to675+ disable pattern expansion on Windows. There is no way to escape676+ patterns in CMD, so if the program needs to pass them on as-is then677+ expansion must be disabled. {issue}`1901`678+679+## Version 8.0.0680+681+Released 2021-05-11682+683+- Drop support for Python 2 and 3.5.684+685+- Colorama is always installed on Windows in order to provide style686+ and color support. {pr}`1784`687+688+- Adds a repr to Command, showing the command name for friendlier689+ debugging. {issue}`1267`, {pr}`1295`690+691+- Add support for distinguishing the source of a command line692+ parameter. {issue}`1264`, {pr}`1329`693+694+- Add an optional parameter to `ProgressBar.update` to set the695+ `current_item`. {issue}`1226`, {pr}`1332`696+697+- `version_option` uses `importlib.metadata` (or the698+ `importlib_metadata` backport) instead of `pkg_resources`. The699+ version is detected based on the package name, not the entry point700+ name. The Python package name must match the installed package701+ name, or be passed with `package_name=`. {issue}`1582`702+703+- If validation fails for a prompt with `hide_input=True`, the value704+ is not shown in the error message. {issue}`1460`705+706+- An `IntRange` or `FloatRange` option shows the accepted range in707+ its help text. {issue}`1525`, {pr}`1303`708+709+- `IntRange` and `FloatRange` bounds can be open (`<`) instead710+ of closed (`<=`) by setting `min_open` and `max_open`. Error711+ messages have changed to reflect this. {issue}`1100`712+713+- An option defined with duplicate flag names (`"--foo/--foo"`)714+ raises a `ValueError`. {issue}`1465`715+716+- `echo()` will not fail when using pytest's `capsys` fixture on717+ Windows. {issue}`1590`718+719+- Resolving commands returns the canonical command name instead of the720+ matched name. This makes behavior such as help text and721+ `Context.invoked_subcommand` consistent when using patterns like722+ `AliasedGroup`. {issue}`1422`723+724+- The `BOOL` type accepts the values "on" and "off". {issue}`1629`725+726+- A `Group` with `invoke_without_command=True` will always invoke727+ its result callback. {issue}`1178`728+729+- `nargs == -1` and `nargs > 1` is parsed and validated for730+ values from environment variables and defaults. {issue}`729`731+732+- Detect the program name when executing a module or package with733+ `python -m name`. {issue}`1603`734+735+- Include required parent arguments in help synopsis of subcommands.736+ {issue}`1475`737+738+- Help for boolean flags with `show_default=True` shows the flag739+ name instead of `True` or `False`. {issue}`1538`740+741+- Non-string objects passed to `style()` and `secho()` will be742+ converted to string. {pr}`1146`743+744+- `edit(require_save=True)` will detect saves for editors that exit745+ very fast on filesystems with 1 second resolution. {pr}`1050`746+747+- New class attributes make it easier to use custom core objects748+ throughout an entire application. {pr}`938`749+750+ - `Command.context_class` controls the context created when751+ running the command.752+ - `Context.invoke` creates new contexts of the same type, so a753+ custom type will persist to invoked subcommands.754+ - `Context.formatter_class` controls the formatter used to755+ generate help and usage.756+ - `Group.command_class` changes the default type for757+ subcommands with `@group.command()`.758+ - `Group.group_class` changes the default type for subgroups759+ with `@group.group()`. Setting it to `type` will create760+ subgroups of the same type as the group itself.761+ - Core objects use `super()` consistently for better support of762+ subclassing.763+764+- Use `Context.with_resource()` to manage resources that would765+ normally be used in a `with` statement, allowing them to be used766+ across subcommands and callbacks, then cleaned up when the context767+ ends. {pr}`1191`768+769+- The result object returned by the test runner's `invoke()` method770+ has a `return_value` attribute with the value returned by the771+ invoked command. {pr}`1312`772+773+- Required arguments with the `Choice` type show the choices in774+ curly braces to indicate that one is required (`{a|b|c}`).775+ {issue}`1272`776+777+- If only a name is passed to `option()`, Click suggests renaming it778+ to `--name`. {pr}`1355`779+780+- A context's `show_default` parameter defaults to the value from781+ the parent context. {issue}`1565`782+783+- `click.style()` can output 256 and RGB color codes. Most modern784+ terminals support these codes. {pr}`1429`785+786+- When using `CliRunner.invoke()`, the replaced `stdin` file has787+ `name` and `mode` attributes. This lets `File` options with788+ the `-` value match non-testing behavior. {issue}`1064`789+790+- When creating a `Group`, allow passing a list of commands instead791+ of a dict. {issue}`1339`792+793+- When a long option name isn't valid, use `difflib` to make better794+ suggestions for possible corrections. {issue}`1446`795+796+- Core objects have a `to_info_dict()` method. This gathers797+ information about the object's structure that could be useful for a798+ tool generating user-facing documentation. To get the structure of799+ an entire CLI, use `Context(cli).to_info_dict()`. {issue}`461`800+801+- Redesign the shell completion system. {issue}`1484`, {pr}`1622`802+803+ - Support Bash >= 4.4, Zsh, and Fish, with the ability for804+ extensions to add support for other shells.805+ - Allow commands, groups, parameters, and types to override their806+ completions suggestions.807+ - Groups complete the names commands were registered with, which808+ can differ from the name they were created with.809+ - The `autocompletion` parameter for options and arguments is810+ renamed to `shell_complete`. The function must take811+ `ctx, param, incomplete`, must do matching rather than return812+ all values, and must return a list of strings or a list of813+ `CompletionItem`. The old name and behavior is deprecated and814+ will be removed in 8.1.815+ - The env var values used to start completion have changed order.816+ The shell now comes first, such as `{shell}_source` rather817+ than `source_{shell}`, and is always required.818+819+- Completion correctly parses command line strings with incomplete820+ quoting or escape sequences. {issue}`1708`821+822+- Extra context settings (`obj=...`, etc.) are passed on to the823+ completion system. {issue}`942`824+825+- Include `--help` option in completion. {pr}`1504`826+827+- `ParameterSource` is an `enum.Enum` subclass. {issue}`1530`828+829+- Boolean and UUID types strip surrounding space before converting.830+ {issue}`1605`831+832+- Adjusted error message from parameter type validation to be more833+ consistent. Quotes are used to distinguish the invalid value.834+ {issue}`1605`835+836+- The default value for a parameter with `nargs` > 1 and837+ `multiple=True` must be a list of tuples. {issue}`1649`838+839+- When getting the value for a parameter, the default is tried in the840+ same section as other sources to ensure consistent processing.841+ {issue}`1649`842+843+- All parameter types accept a value that is already the correct type.844+ {issue}`1649`845+846+- For shell completion, an argument is considered incomplete if its847+ value did not come from the command line args. {issue}`1649`848+849+- Added `ParameterSource.PROMPT` to track parameter values that were850+ prompted for. {issue}`1649`851+852+- Options with `nargs` > 1 no longer raise an error if a default is853+ not given. Parameters with `nargs` > 1 default to `None`, and854+ parameters with `multiple=True` or `nargs=-1` default to an855+ empty tuple. {issue}`472`856+857+- Handle empty env vars as though the option were not passed. This858+ extends the change introduced in 7.1 to be consistent in more cases.859+ {issue}`1285`860+861+- `Parameter.get_default()` checks `Context.default_map` to862+ handle overrides consistently in help text, `invoke()`, and863+ prompts. {issue}`1548`864+865+- Add `prompt_required` param to `Option`. When set to `False`,866+ the user will only be prompted for an input if no value was passed.867+ {issue}`736`868+869+- Providing the value to an option can be made optional through870+ `is_flag=False`, and the value can instead be prompted for or871+ passed in as a default value.872+ {issue}`549, 736, 764, 921, 1015, 1618`873+874+- Fix formatting when `Command.options_metavar` is empty. {pr}`1551`875+876+- Revert adding space between option help text that wraps.877+ {issue}`1831`878+879+- The default value passed to `prompt` will be cast to the correct880+ type like an input value would be. {pr}`1517`881+882+- Automatically generated short help messages will stop at the first883+ ending of a phrase or double linebreak. {issue}`1082`884+885+- Skip progress bar render steps for efficiency with very fast886+ iterators by setting `update_min_steps`. {issue}`676`887+888+- Respect `case_sensitive=False` when doing shell completion for889+ `Choice` {issue}`1692`890+891+- Use `mkstemp()` instead of `mktemp()` in pager implementation.892+ {issue}`1752`893+894+- If `Option.show_default` is a string, it is displayed even if895+ `default` is `None`. {issue}`1732`896+897+- `click.get_terminal_size()` is deprecated and will be removed in898+ 8.1. Use {func}`shutil.get_terminal_size` instead. {issue}`1736`899+900+- Control the location of the temporary directory created by901+ `CLIRunner.isolated_filesystem` by passing `temp_dir`. A custom902+ directory will not be removed automatically. {issue}`395`903+904+- `click.confirm()` will prompt until input is given if called with905+ `default=None`. {issue}`1381`906+907+- Option prompts validate the value with the option's callback in908+ addition to its type. {issue}`457`909+910+- `confirmation_prompt` can be set to a custom string. {issue}`723`911+912+- Allow styled output in Jupyter on Windows. {issue}`1271`913+914+- `style()` supports the `strikethrough`, `italic`, and915+ `overline` styles. {issue}`805, 1821`916+917+- Multiline marker is removed from short help text. {issue}`1597`918+919+- Restore progress bar behavior of echoing only the label if the file920+ is not a TTY. {issue}`1138`921+922+- Progress bar output is shown even if execution time is less than 0.5923+ seconds. {issue}`1648`924+925+- Progress bar `item_show_func` shows the current item, not the926+ previous item. {issue}`1353`927+928+- The `Path` param type can be passed `path_type=pathlib.Path` to929+ return a path object instead of a string. {issue}`405`930+931+- `TypeError` is raised when parameter with `multiple=True` or932+ `nargs > 1` has non-iterable default. {issue}`1749`933+934+- Add a `pass_meta_key` decorator for passing a key from935+ `Context.meta`. This is useful for extensions using `meta` to936+ store information. {issue}`1739`937+938+- `Path` `resolve_path` resolves symlinks on Windows Python < 3.8.939+ {issue}`1813`940+941+- Command deprecation notice appears at the start of the help text, as942+ well as in the short help. The notice is not in all caps.943+ {issue}`1791`944+945+- When taking arguments from `sys.argv` on Windows, glob patterns,946+ user dir, and env vars are expanded. {issue}`1096`947+948+- Marked messages shown by the CLI with `gettext()` to allow949+ applications to translate Click's built-in strings. {issue}`303`950+951+- Writing invalid characters to `stderr` when using the test runner952+ does not raise a `UnicodeEncodeError`. {issue}`848`953+954+- Fix an issue where `readline` would clear the entire `prompt()`955+ line instead of only the input when pressing backspace. {issue}`665`956+957+- Add all kwargs passed to `Context.invoke()` to `ctx.params`.958+ Fixes an inconsistency when nesting `Context.forward()` calls.959+ {issue}`1568`960+961+- The `MultiCommand.resultcallback` decorator is renamed to962+ `result_callback`. The old name is deprecated. {issue}`1160`963+964+- Fix issues with `CliRunner` output when using `echo_stdin=True`.965+ {issue}`1101`966+967+- Fix a bug of `click.utils.make_default_short_help` for which the968+ returned string could be as long as `max_width + 3`. {issue}`1849`969+970+- When defining a parameter, `default` is validated with971+ `multiple` and `nargs`. More validation is done for values being972+ processed as well. {issue}`1806`973+974+- `HelpFormatter.write_text` uses the full line width when wrapping975+ text. {issue}`1871`976+977+## Version 7.1.2978+979+Released 2020-04-27980+981+- Revert applying shell quoting to commands for `echo_with_pager`982+ and `edit`. This was intended to allows spaces in commands, but983+ caused issues if the string was actually a command and arguments, or984+ on Windows. Instead, the string must be quoted manually as it should985+ appear on the command line. {issue}`1514`986+987+## Version 7.1.1988+989+Released 2020-03-09990+991+- Fix `ClickException` output going to stdout instead of stderr.992+ {issue}`1495`993+994+## Version 7.1995+996+Released 2020-03-09997+998+- Fix PyPI package name, "click" is lowercase again.999+- Fix link in `unicode_literals` error message. {pr}`1151`1000+- Add support for colored output on UNIX Jupyter notebooks.1001+ {issue}`1185`1002+- Operations that strip ANSI controls will strip the cursor hide/show1003+ sequences. {issue}`1216`1004+- Remove unused compat shim for `bytes`. {pr}`1195`1005+- Expand testing around termui, especially getchar on Windows.1006+ {issue}`1116`1007+- Fix output on Windows Python 2.7 built with MSVC 14. {pr}`1342`1008+- Fix `OSError` when running in MSYS2. {issue}`1338`1009+- Fix `OSError` when redirecting to `NUL` stream on Windows.1010+ {issue}`1065`1011+- Fix memory leak when parsing Unicode arguments on Windows.1012+ {issue}`1136`1013+- Fix error in new AppEngine environments. {issue}`1462`1014+- Always return one of the passed choices for `click.Choice`1015+ {issue}`1277`, {pr}`1318`1016+- Add `no_args_is_help` option to `click.Command`, defaults to1017+ False {pr}`1167`1018+- Add `show_default` parameter to `Context` to enable showing1019+ defaults globally. {issue}`1018`1020+- Handle `env MYPATH=''` as though the option were not passed.1021+ {issue}`1196`1022+- It is once again possible to call `next(bar)` on an active1023+ progress bar instance. {issue}`1125`1024+- `open_file` with `atomic=True` retains permissions of existing1025+ files and respects the current umask for new files. {issue}`1376`1026+- When using the test `CliRunner` with `mix_stderr=False`, if1027+ `result.stderr` is empty it will not raise a `ValueError`.1028+ {issue}`1193`1029+- Remove the unused `mix_stderr` parameter from1030+ `CliRunner.invoke`. {issue}`1435`1031+- Fix `TypeError` raised when using bool flags and specifying1032+ `type=bool`. {issue}`1287`1033+- Newlines in option help text are replaced with spaces before1034+ re-wrapping to avoid uneven line breaks. {issue}`834`1035+- `MissingParameter` exceptions are printable in the Python1036+ interpreter. {issue}`1139`1037+- Fix how default values for file-type options are shown during1038+ prompts. {issue}`914`1039+- Fix environment variable automatic generation for commands1040+ containing `-`. {issue}`1253`1041+- Option help text replaces newlines with spaces when rewrapping, but1042+ preserves paragraph breaks, fixing multiline formatting.1043+ {issue}`834, 1066, 1397`1044+- Option help text that is wrapped adds an extra newline at the end to1045+ distinguish it from the next option. {issue}`1075`1046+- Consider `sensible-editor` when determining the editor to use for1047+ `click.edit()`. {pr}`1469`1048+- Arguments to system calls such as the executable path passed to1049+ `click.edit` can contains spaces. {pr}`1470`1050+- Add ZSH completion autoloading and error handling. {issue}`1348`1051+- Add a repr to `Command`, `Group`, `Option`, and `Argument`,1052+ showing the name for friendlier debugging. {issue}`1267`1053+- Completion doesn't consider option names if a value starts with1054+ `-` after the `--` separator. {issue}`1247`1055+- ZSH completion escapes special characters in values. {pr}`1418`1056+- Add completion support for Fish shell. {pr}`1423`1057+- Decoding bytes option values falls back to UTF-8 in more cases.1058+ {pr}`1468`1059+- Make the warning about old 2-arg parameter callbacks a deprecation1060+ warning, to be removed in 8.0. This has been a warning since Click1061+ 2.0. {pr}`1492`1062+- Adjust error messages to standardize the types of quotes used so1063+ they match error messages from Python.1064+1065+## Version 7.01066+1067+Released 2018-09-251068+1069+- Drop support for Python 2.6 and 3.3. {pr}`967, 976`1070+- Wrap `click.Choice`'s missing message. {issue}`202`, {pr}`1000`1071+- Add native ZSH autocompletion support. {issue}`323`, {pr}`865`1072+- Document that ANSI color info isn't parsed from bytearrays in Python1073+ 2\. {issue}`334`1074+- Document byte-stripping behavior of `CliRunner`. {issue}`334`,1075+ {pr}`1010`1076+- Usage errors now hint at the `--help` option. {issue}`393`,1077+ {pr}`557`1078+- Implement streaming pager. {issue}`409`, {pr}`889`1079+- Extract bar formatting to its own method. {pr}`414`1080+- Add `DateTime` type for converting input in given date time1081+ formats. {pr}`423`1082+- `secho`'s first argument can now be `None`, like in `echo`.1083+ {pr}`424`1084+- Fixes a `ZeroDivisionError` in `ProgressBar.make_step`, when the1085+ arg passed to the first call of `ProgressBar.update` is 0.1086+ {issue}`447`, {pr}`1012`1087+- Show progressbar only if total execution time is visible. {pr}`487`1088+- Added the ability to hide commands and options from help. {pr}`500`1089+- Document that options can be `required=True`. {issue}`514`,1090+ {pr}`1022`1091+- Non-standalone calls to `Context.exit` return the exit code,1092+ rather than calling `sys.exit`. {issue}`667`, {pr}`533, 1098`1093+- `click.getchar()` returns Unicode in Python 3 on Windows,1094+ consistent with other platforms. {issue}`537, 821, 822, 1088`,1095+ {pr}`1108`1096+- Added `FloatRange` type. {pr}`538, 553`1097+- Added support for bash completion of `type=click.Choice` for1098+ `Options` and `Arguments`. {issue}`535`, {pr}`681`1099+- Only allow one positional arg for `Argument` parameter1100+ declaration. {issue}`568, 574`, {pr}`1014`1101+- Add `case_sensitive=False` as an option to Choice. {issue}`569`1102+- `click.getchar()` correctly raises `KeyboardInterrupt` on "^C"1103+ and `EOFError` on "^D" on Linux. {issue}`583`, {pr}`1115`1104+- Fix encoding issue with `click.getchar(echo=True)` on Linux.1105+ {pr}`1115`1106+- `param_hint` in errors now derived from param itself.1107+ {issue}`598, 704`, {pr}`709`1108+- Add a test that ensures that when an argument is formatted into a1109+ usage error, its metavar is used, not its name. {pr}`612`1110+- Allow setting `prog_name` as extra in `CliRunner.invoke`.1111+ {issue}`616`, {pr}`999`1112+- Help text taken from docstrings truncates at the `\f` form feed1113+ character, useful for hiding Sphinx-style parameter documentation.1114+ {pr}`629, 1091`1115+- `launch` now works properly under Cygwin. {pr}`650`1116+- Update progress after iteration. {issue}`651`, {pr}`706`1117+- `CliRunner.invoke` now may receive `args` as a string1118+ representing a Unix shell command. {pr}`664`1119+- Make `Argument.make_metavar()` default to type metavar. {pr}`675`1120+- Add documentation for `ignore_unknown_options`. {pr}`684`1121+- Add bright colors support for `click.style` and fix the reset1122+ option for parameters `fg` and `bg`. {issue}`703`, {pr}`809`1123+- Add `show_envvar` for showing environment variables in help.1124+ {pr}`710`1125+- Avoid `BrokenPipeError` during interpreter shutdown when stdout or1126+ stderr is a closed pipe. {issue}`712`, {pr}`1106`1127+- Document customizing option names. {issue}`725`, {pr}`1016`1128+- Disable `sys._getframes()` on Python interpreters that don't1129+ support it. {pr}`728`1130+- Fix bug in test runner when calling `sys.exit` with `None`.1131+ {pr}`739`1132+- Clarify documentation on command line options. {issue}`741`,1133+ {pr}`1003`1134+- Fix crash on Windows console. {issue}`744`1135+- Fix bug that caused bash completion to give improper completions on1136+ chained commands. {issue}`754`, {pr}`774`1137+- Added support for dynamic bash completion from a user-supplied1138+ callback. {pr}`755`1139+- Added support for bash completions containing spaces. {pr}`773`1140+- Allow autocompletion function to determine whether or not to return1141+ completions that start with the incomplete argument. {issue}`790`,1142+ {pr}`806`1143+- Fix option naming routine to match documentation and be1144+ deterministic. {issue}`793`, {pr}`794`1145+- Fix path validation bug. {issue}`795`, {pr}`1020`1146+- Add test and documentation for `Option` naming: functionality.1147+ {pr}`799`1148+- Update doc to match arg name for `path_type`. {pr}`801`1149+- Raw strings added so correct escaping occurs. {pr}`807`1150+- Fix 16k character limit of `click.echo` on Windows. {issue}`816`,1151+ {pr}`819`1152+- Overcome 64k character limit when writing to binary stream on1153+ Windows 7. {issue}`825`, {pr}`830`1154+- Add bool conversion for "t" and "f". {pr}`842`1155+- `NoSuchOption` errors take `ctx` so that `--help` hint gets1156+ printed in error output. {pr}`860`1157+- Fixed the behavior of Click error messages with regards to Unicode1158+ on 2.x and 3.x. Message is now always Unicode and the str and1159+ Unicode special methods work as you expect on that platform.1160+ {issue}`862`1161+- Progress bar now uses stderr by default. {pr}`863`1162+- Add support for auto-completion documentation. {issue}`866`,1163+ {pr}`869`1164+- Allow `CliRunner` to separate stdout and stderr. {pr}`868`1165+- Fix variable precedence. {issue}`873`, {pr}`874`1166+- Fix invalid escape sequences. {pr}`877`1167+- Fix `ResourceWarning` that occurs during some tests. {pr}`878`1168+- When detecting a misconfigured locale, don't fail if the `locale`1169+ command fails. {pr}`880`1170+- Add `case_sensitive=False` as an option to `Choice` types.1171+ {pr}`887`1172+- Force stdout/stderr writable. This works around issues with badly1173+ patched standard streams like those from Jupyter. {pr}`918`1174+- Fix completion of subcommand options after last argument1175+ {issue}`919`, {pr}`930`1176+- `_AtomicFile` now uses the `realpath` of the original filename1177+ so that changing the working directory does not affect it. {pr}`920`1178+- Fix incorrect completions when defaults are present {issue}`925`,1179+ {pr}`930`1180+- Add copy option attrs so that custom classes can be reused.1181+ {issue}`926`, {pr}`994`1182+- "x" and "a" file modes now use stdout when file is `"-"`.1183+ {pr}`929`1184+- Fix missing comma in `__all__` list. {pr}`935`1185+- Clarify how parameters are named. {issue}`949`, {pr}`1009`1186+- Stdout is now automatically set to non blocking. {pr}`954`1187+- Do not set options twice. {pr}`962`1188+- Move `fcntl` import. {pr}`965`1189+- Fix Google App Engine `ImportError`. {pr}`995`1190+- Better handling of help text for dynamic default option values.1191+ {pr}`996`1192+- Fix `get_winter_size()` so it correctly returns `(0,0)`.1193+ {pr}`997`1194+- Add test case checking for custom param type. {pr}`1001`1195+- Allow short width to address cmd formatting. {pr}`1002`1196+- Add details about Python version support. {pr}`1004`1197+- Added deprecation flag to commands. {pr}`1005`1198+- Fixed issues where `fd` was undefined. {pr}`1007`1199+- Fix formatting for short help. {pr}`1008`1200+- Document how `auto_envvar_prefix` works with command groups.1201+ {pr}`1011`1202+- Don't add newlines by default for progress bars. {pr}`1013`1203+- Use Python sorting order for ZSH completions. {issue}`1047`,1204+ {pr}`1059`1205+- Document that parameter names are converted to lowercase by default.1206+ {pr}`1055`1207+- Subcommands that are named by the function now automatically have1208+ the underscore replaced with a dash. If you register a function1209+ named `my_command` it becomes `my-command` in the command line1210+ interface.1211+- Hide hidden commands and options from completion. {issue}`1058`,1212+ {pr}`1061`1213+- Fix absolute import blocking Click from being vendored into a1214+ project on Windows. {issue}`1068`, {pr}`1069`1215+- Fix issue where a lowercase `auto_envvar_prefix` would not be1216+ converted to uppercase. {pr}`1105`1217+1218+## Version 6.71219+1220+Released 2017-01-061221+1222+- Make `click.progressbar` work with `codecs.open` files.1223+ {pr}`637`1224+- Fix bug in bash completion with nested subcommands. {pr}`639`1225+- Fix test runner not saving caller env correctly. {pr}`644`1226+- Fix handling of SIGPIPE. {pr}`62`1227+- Deal with broken Windows environments such as Google App Engine's.1228+ {issue}`711`1229+1230+## Version 6.61231+1232+Released 2016-04-041233+1234+- Fix bug in `click.Path` where it would crash when passed a `-`.1235+ {issue}`551`1236+1237+## Version 6.41238+1239+Released 2016-03-241240+1241+- Fix bug in bash completion where click would discard one or more1242+ trailing arguments. {issue}`471`1243+1244+## Version 6.31245+1246+Released 2016-02-221247+1248+- Fix argument checks for interpreter invoke with `-m` and `-c` on1249+ Windows.1250+- Fixed a bug that cased locale detection to error out on Python 3.1251+1252+## Version 6.21253+1254+Released 2015-11-271255+1256+- Correct fix for hidden progress bars.1257+1258+## Version 6.11259+1260+Released 2015-11-271261+1262+- Resolved an issue with invisible progress bars no longer rendering.1263+- Disable chain commands with subcommands as they were inherently1264+ broken.1265+- Fix `MissingParameter` not working without parameters passed.1266+1267+## Version 6.01268+1269+Released 2015-11-24, codename "pow pow"1270+1271+- Optimized the progressbar rendering to not render when it did not1272+ actually change.1273+- Explicitly disallow `nargs=-1` with a set default.1274+- The context is now closed before it's popped from the stack.1275+- Added support for short aliases for the false flag on toggles.1276+- Click will now attempt to aid you with debugging locale errors1277+ better by listing with the help of the OS what locales are1278+ available.1279+- Click used to return byte strings on Python 2 in some unit-testing1280+ situations. This has been fixed to correctly return unicode strings1281+ now.1282+- For Windows users on Python 2, Click will now handle Unicode more1283+ correctly handle Unicode coming in from the system. This also has1284+ the disappointing side effect that filenames will now be always1285+ unicode by default in the `Path` type which means that this can1286+ introduce small bugs for code not aware of this.1287+- Added a `type` parameter to `Path` to force a specific string1288+ type on the value.1289+- For users running Python on Windows the `echo` and `prompt`1290+ functions now work with full unicode functionality in the Python1291+ windows console by emulating an output stream. This also applies to1292+ getting the virtual output and input streams via1293+ `click.get_text_stream(...)`.1294+- Unittests now always force a certain virtual terminal width.1295+- Added support for allowing dashes to indicate standard streams to1296+ the `Path` type.1297+- Multi commands in chain mode no longer propagate arguments left over1298+ from parsing to the callbacks. It's also now disallowed through an1299+ exception when optional arguments are attached to multi commands if1300+ chain mode is enabled.1301+- Relaxed restriction that disallowed chained commands to have other1302+ chained commands as child commands.1303+- Arguments with positive nargs can now have defaults implemented.1304+ Previously this configuration would often result in slightly1305+ unexpected values be returned.1306+1307+## Version 5.11308+1309+Released 2015-08-171310+1311+- Fix a bug in `pass_obj` that would accidentally pass the context1312+ too.1313+1314+## Version 5.01315+1316+Released 2015-08-16, codename "tok tok"1317+1318+- Removed various deprecated functionality.1319+- Atomic files now only accept the `w` mode.1320+- Change the usage part of help output for very long commands to wrap1321+ their arguments onto the next line, indented by 4 spaces.1322+- Fix a bug where return code and error messages were incorrect when1323+ using `CliRunner`.1324+- Added `get_current_context`.1325+- Added a `meta` dictionary to the context which is shared across1326+ the linked list of contexts to allow click utilities to place state1327+ there.1328+- Introduced `Context.scope`.1329+- The `echo` function is now threadsafe: It calls the `write`1330+ method of the underlying object only once.1331+- `prompt(hide_input=True)` now prints a newline on `^C`.1332+- Click will now warn if users are using `unicode_literals`.1333+- Click will now ignore the `PAGER` environment variable if it is1334+ empty or contains only whitespace.1335+- The `click-contrib` GitHub organization was created.1336+1337+## Version 4.11338+1339+Released 2015-07-141340+1341+- Fix a bug where error messages would include a trailing `None`1342+ string.1343+- Fix a bug where Click would crash on docstrings with trailing1344+ newlines.1345+- Support streams with encoding set to `None` on Python 3 by barfing1346+ with a better error.1347+- Handle ^C in less-pager properly.1348+- Handle return value of `None` from `sys.getfilesystemencoding`1349+- Fix crash when writing to unicode files with `click.echo`.1350+- Fix type inference with multiple options.1351+1352+## Version 4.01353+1354+Released 2015-03-31, codename "zoom zoom"1355+1356+- Added `color` parameters to lots of interfaces that directly or1357+ indirectly call into echoing. This previously was always1358+ autodetection (with the exception of the `echo_via_pager`1359+ function). Now you can forcefully enable or disable it, overriding1360+ the auto detection of Click.1361+- Added an `UNPROCESSED` type which does not perform any type1362+ changes which simplifies text handling on 2.x / 3.x in some special1363+ advanced usecases.1364+- Added `NoSuchOption` and `BadOptionUsage` exceptions for more1365+ generic handling of errors.1366+- Added support for handling of unprocessed options which can be1367+ useful in situations where arguments are forwarded to underlying1368+ tools.1369+- Added `max_content_width` parameter to the context which can be1370+ used to change the maximum width of help output. By default Click1371+ will not format content for more than 80 characters width.1372+- Added support for writing prompts to stderr.1373+- Fix a bug when showing the default for multiple arguments.1374+- Added support for custom subclasses to `option` and `argument`.1375+- Fix bug in `clear()` on Windows when colorama is installed.1376+- Reject `nargs=-1` for options properly. Options cannot be1377+ variadic.1378+- Fixed an issue with bash completion not working properly for1379+ commands with non ASCII characters or dashes.1380+- Added a way to manually update the progressbar.1381+- Changed the formatting of missing arguments. Previously the internal1382+ argument name was shown in error messages, now the metavar is shown1383+ if passed. In case an automated metavar is selected, it's stripped1384+ of extra formatting first.1385+1386+## Version 3.31387+1388+Released 2014-09-081389+1390+- Fixed an issue with error reporting on Python 3 for invalid1391+ forwarding of commands.1392+1393+## Version 3.21394+1395+Released 2014-08-221396+1397+- Added missing `err` parameter forwarding to the `secho`1398+ function.1399+- Fixed default parameters not being handled properly by the context1400+ invoke method. This is a backwards incompatible change if the1401+ function was used improperly.1402+- Removed the `invoked_subcommands` attribute largely. It is not1403+ possible to provide it to work error free due to how the parsing1404+ works so this API has been deprecated.1405+- Restored the functionality of `invoked_subcommand` which was1406+ broken as a regression in 3.1.1407+1408+## Version 3.11409+1410+Released 2014-08-131411+1412+- Fixed a regression that caused contexts of subcommands to be created1413+ before the parent command was invoked which was a regression from1414+ earlier Click versions.1415+1416+## Version 3.01417+1418+Released 2014-08-12, codename "clonk clonk"1419+1420+- Formatter now no longer attempts to accommodate for terminals1421+ smaller than 50 characters. If that happens it just assumes a1422+ minimal width.1423+- Added a way to not swallow exceptions in the test system.1424+- Added better support for colors with pagers and ways to override the1425+ autodetection.1426+- The CLI runner's result object now has a traceback attached.1427+- Improved automatic short help detection to work better with dots1428+ that do not terminate sentences.1429+- When defining options without actual valid option strings now,1430+ Click will give an error message instead of silently passing. This1431+ should catch situations where users wanted to created arguments1432+ instead of options.1433+- Restructured Click internally to support vendoring.1434+- Added support for multi command chaining.1435+- Added support for defaults on options with `multiple` and options1436+ and arguments with `nargs != 1`.1437+- Label passed to `progressbar` is no longer rendered with1438+ whitespace stripped.1439+- Added a way to disable the standalone mode of the `main` method on1440+ a Click command to be able to handle errors better.1441+- Added support for returning values from command callbacks.1442+- Added simplifications for printing to stderr from `echo`.1443+- Added result callbacks for groups.1444+- Entering a context multiple times defers the cleanup until the last1445+ exit occurs.1446+- Added `open_file`.1447+1448+## Version 2.61449+1450+Released 2014-08-111451+1452+- Fixed an issue where the wrapped streams on Python 3 would be1453+ reporting incorrect values for seekable.1454+1455+## Version 2.51456+1457+Released 2014-07-281458+1459+- Fixed a bug with text wrapping on Python 3.1460+1461+## Version 2.41462+1463+Released 2014-07-041464+1465+- Corrected a bug in the change of the help option in 2.3.1466+1467+## Version 2.31468+1469+Released 2014-07-031470+1471+- Fixed an incorrectly formatted help record for count options.1472+- Add support for ansi code stripping on Windows if colorama is not1473+ available.1474+- Restored the Click 1.0 handling of the help parameter for certain1475+ edge cases.1476+1477+## Version 2.21478+1479+Released 2014-06-261480+1481+- Fixed tty detection on PyPy.1482+- Fixed an issue that progress bars were not rendered when the context1483+ manager was entered.1484+1485+## Version 2.11486+1487+Released 2014-06-141488+1489+- Fixed the {func}`launch` function on windows.1490+- Improved the colorama support on windows to try hard to not screw up1491+ the console if the application is interrupted.1492+- Fixed windows terminals incorrectly being reported to be 801493+ characters wide instead of 791494+- Use colorama win32 bindings if available to get the correct1495+ dimensions of a windows terminal.1496+- Fixed an issue with custom function types on Python 3.1497+- Fixed an issue with unknown options being incorrectly reported in1498+ error messages.1499+1500+## Version 2.01501+1502+Released 2014-06-06, codename "tap tap tap"1503+1504+- Added support for opening stdin/stdout on Windows in binary mode1505+ correctly.1506+- Added support for atomic writes to files by going through a1507+ temporary file.1508+- Introduced {exc}`BadParameter` which can be used to easily perform1509+ custom validation with the same error messages as in the type1510+ system.1511+- Added {func}`progressbar`; a function to show progress bars.1512+- Added {func}`get_app_dir`; a function to calculate the home folder1513+ for configs.1514+- Added transparent handling for ANSI codes into the {func}`echo`1515+ function through `colorama`.1516+- Added {func}`clear` function.1517+- Breaking change: parameter callbacks now get the parameter object1518+ passed as second argument. There is legacy support for old callbacks1519+ which will warn but still execute the script.1520+- Added {func}`style`, {func}`unstyle` and {func}`secho` for ANSI1521+ styles.1522+- Added an {func}`edit` function that invokes the default editor.1523+- Added an {func}`launch` function that launches browsers and1524+ applications.1525+- Nargs of -1 for arguments can now be forced to be a single item1526+ through the required flag. It defaults to not required.1527+- Setting a default for arguments now implicitly makes it non1528+ required.1529+- Changed "yN" / "Yn" to "y/N" and "Y/n" in confirmation prompts.1530+- Added basic support for bash completion.1531+- Added {func}`getchar` to fetch a single character from the terminal.1532+- Errors now go to stderr as intended.1533+- Fixed various issues with more exotic parameter formats like1534+ DOS/Windows style arguments.1535+- Added {func}`pause` which works similar to the Windows `pause` cmd1536+ built-in but becomes an automatic noop if the application is not run1537+ through a terminal.1538+- Added a bit of extra information about missing choice parameters.1539+- Changed how the help function is implemented to allow global1540+ overriding of the help option.1541+- Added support for token normalization to implement case insensitive1542+ handling.1543+- Added support for providing defaults for context settings.1544+1545+## Version 1.11546+1547+Released 2014-05-231548+1549+- Fixed a bug that caused text files in Python 2 to not accept native1550+ strings.1551+1552+## Version 1.01553+1554+Released 2014-05-211555+1556+- Initial release.deleted:CHANGES.rst-1506 removed
1-.. currentmodule:: click2-3-Version 8.5.04--------------5-6-Unreleased7-8-- Supported versions of Windows enable ANSI terminal styles by default.9- Colorama is no longer a dependency and is not used. :issue:`2986` :pr:`3505`10-- :class:`Argument` accepts a ``help`` parameter, and help output includes11- a ``Positional arguments`` section when argument help is available. :issue:`2983` :pr:`3473`12-13-14-Version 8.4.215--------------16-17-Unreleased18-19-- Fix Fish shell completion broken in ``8.4.0`` by :pr:`3126`. Newlines and20- tabs in option help text are now escaped, keeping the original completion21- format while still supporting multi-line help. :issue:`3502`22- :issue:`3043` :pr:`3504` :pr:`3508`23-- Deprecated commands and options with empty or missing help text no longer24- render a stray leading space before the ``(DEPRECATED)`` label. :pr:`3509`25-- A :class:`Group` with ``invoke_without_command=True`` marks its subcommand as26- optional in the usage help, showing ``[COMMAND]`` instead of ``COMMAND``.27- :issue:`3059` :pr:`3507`28-29-30-Version 8.4.131--------------32-33-Released 2026-05-2134-35-- ``get_parameter_source()`` is available during eager callbacks and type36- conversion again. :issue:`3458` :issue:`3484`37-- Zsh completion scripts parse correctly on Windows. :issue:`3277` :pr:`3466`38-- Shell completion of `Choice` `Enum` values produces a valid completion39- result. :issue:`3015`40-- Fix empty byte-string handling in echo. :issue:`3487`41-- Fix closed file error with `echo_via_pager`. :issue:`3449`42-43-Version 8.4.044--------------45-46-Released 2026-05-1747-48-- :class:`ParamType` typing improvements. :pr:`3371`49-50- - :class:`ParamType` is now a generic abstract base class,51- parameterized by its converted value type.52- - :meth:`~ParamType.convert` return types are narrowed on all53- concrete types (``str`` for :class:`STRING`, ``int`` for54- :class:`INT`, etc.).55- - :meth:`~ParamType.to_info_dict` returns specific56- :class:`~typing.TypedDict` subclasses instead of57- ``dict[str, Any]``.58- - :class:`CompositeParamType` and the number-range base are now59- generic with abstract methods.60-- Refactor ``convert_type`` to extract type inference into a private61- ``_guess_type`` helper, and add :func:`typing.overload` signatures.62- :pr:`3372`63-- :class:`Parameter` typing improvements. :pr:`2805`64-65- - :class:`Parameter` is now an abstract base class, making explicit66- that it cannot be instantiated directly.67- - :attr:`Parameter.name` is now ``str`` instead of ``str | None``.68- When ``expose_value=False``, the name is set to ``""`` instead69- of ``None``.70- - The ``ctx`` parameter of :meth:`Parameter.get_error_hint` is now71- typed as ``Context | None``, matching the runtime behavior.72-- Split string values from ``default_map`` for parameters with ``nargs > 1``73- or :class:`Tuple` type, matching environment variable behavior.74- :issue:`2745` :pr:`3364`75-- Auto-detect ``type=UNPROCESSED`` for ``flag_value`` of non-basic types76- (not ``str``, ``int``, ``float``, or ``bool``), so programmer-provided77- Python objects like classes and enum members are passed through unchanged78- instead of being stringified. Previously ``type=click.UNPROCESSED`` had79- to be set explicitly. :issue:`2012` :pr:`3363`80-- The error hint now uses :meth:`Command.get_help_option_names` to pick81- non-shadowed help option names, so ``Try '... -h'`` no longer points to a82- subcommand option that shadows ``-h``. The longest surviving name is83- shown (``--help`` over ``-h``) for readability. :issue:`2790` :pr:`3208`84-- Fix readline functionality on non-Windows platforms. Prompt text is now85- passed directly to readline instead of being printed separately, allowing86- proper backspace, line editing, and line wrapping behavior. :issue:`2968`87- :pr:`2969`88-- Use :func:`os.startfile` on Windows to open URLs in :func:`open_url`,89- replacing the ``start`` built-in which cannot be invoked without90- ``shell=True``. :issue:`3164` :pr:`3186`91-- Fix Fish shell completion errors when option help text contains newlines.92- :issue:`3043` :pr:`3126`93-- Add :class:`NoSuchCommand` exception with suggestions for misspelled94- commands. :issue:`3107` :pr:`3228`95-- Use :class:`ValueError` message when conversion in :class:`FuncParamType` would96- fail. :issue:`3105` :pr:`3211`97-- Add ``click.get_pager_file`` for file-like access to an output98- pager. :pr:`1572` :pr:`3405`99-- :func:`~click.formatting.wrap_text` now measures line width in visible100- characters, ignoring ANSI escape sequences. :pr:`3420`101-- Fix :meth:`HelpFormatter.write_usage` emitting only a blank line when102- called without ``args``. The usage prefix and program name are now103- written even when no arguments follow, and the trailing separator104- space is stripped so the line ends at the program name.105- :issue:`3360` :pr:`3434`106-- Show custom error messages from types when :func:`prompt` with107- ``hide_input=True`` fails validation, instead of always showing a108- generic message. Built-in type messages mask the input value.109- :issue:`2809` :pr:`3256`110-- Add ``capture`` parameter to :class:`CliRunner` with two modes: ``sys``111- (default) and ``fd``. ``fd`` redirects file descriptors ``1`` and ``2``112- via :func:`os.dup2` so output that bypasses ``sys.stdout`` (stale stream113- references, C extensions, subprocesses, ``faulthandler``) is captured114- with proper isolation. :issue:`854` :issue:`2412` :issue:`2468`115- :issue:`2497` :issue:`2761` :issue:`2827` :issue:`2865` :pr:`3391`116-- Revert the ``8.3.3`` change that exposed the original file descriptor117- via ``fileno()`` on the redirected ``CliRunner`` streams in the default118- capture mode. ``os.dup2(w, sys.stdout.fileno())`` calls inside a CLI no119- longer mutate the host runner's stdout, which broke Pytest's ``fd``-level120- capture teardown. C-level consumers that need a real ``fd`` should use121- ``capture="fd"``. :issue:`3384` :pr:`3391`122-- Mark additional built-in strings with ``gettext()`` to extend translation123- coverage. :pr:`2902`124-- Fix feature switch groups (several ``flag_value`` options sharing one125- parameter name) silently dropping an explicit ``default`` when a sibling126- option without an explicit default was declared first. Arbitration is now127- source-aware: a more explicit :class:`ParameterSource` always wins, and128- within ``ParameterSource.DEFAULT``, an option that received an explicit129- ``default=`` keyword wins over a sibling whose default was auto-derived.130- The 8.3.x first-wins fallback for remaining ties was reverted to the131- pre-8.3.x last-wins fallback. :issue:`3403` :pr:`3404`132-- Fix missing space between option help text and the ``(DEPRECATED)``133- label, and localize the option label so it matches the command label.134- The label and the ``DeprecationWarning`` reason suffix are now produced135- by shared helpers. :pr:`3423`136-- Document short option stacking (``-abc`` is parsed as ``-a -b -c``) and137- clarify that multi-character short option names are not supported.138- :issue:`2779` :pr:`3431`139-140-Version 8.3.3141--------------142-143-Released 2026-04-20144-145-- Use :func:`shlex.split` to split pager and editor commands into ``argv``146- lists for :class:`subprocess.Popen`, removing ``shell=True``.147- :issue:`1026` :pr:`1477` :pr:`2775`148-- Fix ``TypeError`` when rendering help for an option whose default value is149- an object that doesn't support equality comparison with strings, such as150- ``semver.Version``. :issue:`3298` :pr:`3299`151-- Fix pager test pollution under parallel execution by using pytest's152- ``tmp_path`` fixture instead of a shared temporary file path. :pr:`3238`153-- Treat ``Sentinel.UNSET`` values in a ``default_map`` as absent, so they fall154- through to the next default source instead of being used as the value.155- :issue:`3224` :pr:`3240`156-- Patch ``pdb.Pdb`` in ``CliRunner`` isolation so ``pdb.set_trace()``,157- ``breakpoint()``, and debuggers subclassing ``pdb.Pdb`` (ipdb, pdbpp) can158- interact with the real terminal instead of the captured I/O streams.159- :issue:`654` :issue:`824` :issue:`843` :pr:`951` :pr:`3235`160-- Add optional randomized parallel test execution using ``pytest-randomly`` and161- ``pytest-xdist`` to detect test pollution and race conditions. :pr:`3151`162-- Add contributor documentation for running stress tests, randomized163- parallel tests, and Flask smoke tests. :pr:`3151` :pr:`3177`164-- Show custom ``show_default`` string in prompts, matching the existing165- help text behavior. :issue:`2836` :pr:`2837` :pr:`3165` :pr:`3262` :pr:`3280`166- :pr:`3328`167-- Fix ``default=True`` with boolean ``flag_value`` always returning the168- ``flag_value`` instead of ``True``. The ``default=True`` to ``flag_value``169- substitution now only applies to non-boolean flags, where ``True`` acts as a170- sentinel meaning "activate this flag by default". For boolean flags,171- ``default=True`` is returned as a literal value. :issue:`3111` :pr:`3239`172-- Mark ``make_default_short_help`` as private API. :issue:`3189` :pr:`3250`173-- ``CliRunner``'s redirected streams now expose the original file descriptor174- via ``fileno()``, so that ``faulthandler``, ``subprocess``, and other175- C-level consumers no longer crash with ``io.UnsupportedOperation``.176- :issue:`2865`177-- Change :class:`ParameterSource` to an :class:`~enum.IntEnum` and reorder178- its members from most to least explicit, so values can be compared to179- check whether a parameter was explicitly provided. :issue:`2879` :pr:`3248`180-181-Version 8.3.2182--------------183-184-Released 2026-04-02185-186-- Fix handling of ``flag_value`` when ``is_flag=False`` to allow such options to be187- used without an explicit value. :issue:`3084` :pr:`3152`188-- Hide ``Sentinel.UNSET`` values as ``None`` when using ``lookup_default()``.189- :issue:`3136` :pr:`3199` :pr:`3202` :pr:`3209` :pr:`3212` :pr:`3224`190-- Prevent ``_NamedTextIOWrapper`` from closing streams owned by ``StreamMixer``.191- :issue:`824` :issue:`2991` :issue:`2993` :issue:`3110` :pr:`3139` :pr:`3140`192-- Add comprehensive tests for ``CliRunner`` stream lifecycle, covering193- logging interaction, multi-threaded safety, and sequential invocation194- isolation. Add high-iteration stress tests behind a ``stress`` marker195- with a dedicated CI job. :pr:`3139`196-- Fix callable ``flag_value`` being instantiated when used as a default via197- ``default=True``. :issue:`3121` :pr:`3201` :pr:`3213` :pr:`3225`198-199-Version 8.3.1200--------------201-202-Released 2025-11-15203-204-- Don't discard pager arguments by correctly using ``subprocess.Popen``. :issue:`3039`205- :pr:`3055`206-- Replace ``Sentinel.UNSET`` default values by ``None`` as they're passed through207- the ``Context.invoke()`` method. :issue:`3066` :issue:`3065` :pr:`3068`208-- Fix conversion of ``Sentinel.UNSET`` happening too early, which caused incorrect209- behavior for multiple parameters using the same name. :issue:`3071` :pr:`3079`210-- Hide ``Sentinel.UNSET`` values as ``None`` when looking up for other parameters211- through the context inside parameter callbacks. :issue:`3136` :pr:`3137`212-- Fix rendering when ``prompt`` and ``confirm`` parameter ``prompt_suffix`` is213- empty. :issue:`3019` :pr:`3021`214-- When ``Sentinel.UNSET`` is found during parsing, it will skip calls to215- ``type_cast_value``. :issue:`3069` :pr:`3090`216-217-Version 8.3.0218---------------219-220-Released 2025-09-17221-222-- **Improved flag option handling**: Reworked the relationship between ``flag_value``223- and ``default`` parameters for better consistency:224-225- * The ``default`` parameter value is now preserved as-is and passed directly226- to CLI functions (no more unexpected transformations)227- * Exception: flag options with ``default=True`` maintain backward compatibility228- by defaulting to their ``flag_value``229- * The ``default`` parameter can now be any type (``bool``, ``None``, etc.)230- * Fixes inconsistencies reported in: :issue:`1992` :issue:`2514` :issue:`2610`231- :issue:`3024` :pr:`3030`232-- Allow ``default`` to be set on ``Argument`` for ``nargs = -1``. :issue:`2164`233- :pr:`3030`234-- Show correct auto complete value for ``nargs`` option in combination with flag235- option :issue:`2813`236-- Fix handling of quoted and escaped parameters in Fish autocompletion. :issue:`2995` :pr:`3013`237-- Lazily import ``shutil``. :pr:`3023`238-- Properly forward exception information to resources registered with239- ``click.core.Context.with_resource()``. :issue:`2447` :pr:`3058`240-- Fix regression related to EOF handling in ``CliRunner``. :issue:`2939` :pr:`2940`241-242-Version 8.2.2243--------------244-245-Released 2025-07-31246-247-- Fix reconciliation of ``default``, ``flag_value`` and ``type`` parameters for248- flag options, as well as parsing and normalization of environment variables.249- :issue:`2952` :pr:`2956`250-- Fix typing issue in ``BadParameter`` and ``MissingParameter`` exceptions for the251- parameter ``param_hint`` that did not allow for a sequence of string where the252- underlying function ``_join_param_hints`` allows for it. :issue:`2777` :pr:`2990`253-- Use the value of ``Enum`` choices to render their default value in help254- screen. Refs :issue:`2911` :pr:`3004`255-- Fix completion for the Z shell (``zsh``) for completion items containing256- colons. :issue:`2703` :pr:`2846`257-- Don't include envvar in error hint when not configured. :issue:`2971` :pr:`2972`258-- Fix a rare race in ``click.testing.StreamMixer``'s finalization that manifested259- as a ``ValueError`` on close in a multi-threaded test session.260- :issue:`2993` :pr:`2991`261-262-Version 8.2.1263--------------264-265-Released 2025-05-20266-267-- Fix flag value handling for flag options with a provided type. :issue:`2894`268- :issue:`2897` :pr:`2930`269-- Fix shell completion for nested groups. :issue:`2906` :pr:`2907`270-- Flush ``sys.stderr`` at the end of ``CliRunner.invoke``. :issue:`2682`271-- Fix EOF handling for stdin input in CliRunner. :issue:`2787`272-273-Version 8.2.0274--------------275-276-Released 2025-05-10277-278-- Drop support for Python 3.7, 3.8, and 3.9. :pr:`2588` :pr:`2893`279-- Use modern packaging metadata with ``pyproject.toml`` instead of ``setup.cfg``.280- :pr:`2438`281-- Use ``flit_core`` instead of ``setuptools`` as build backend. :pr:`2543`282-- Deprecate the ``__version__`` attribute. Use feature detection, or283- ``importlib.metadata.version("click")``, instead. :issue:`2598`284-- ``BaseCommand`` is deprecated. ``Command`` is the base class for all285- commands. :issue:`2589`286-- ``MultiCommand`` is deprecated. ``Group`` is the base class for all group287- commands. :issue:`2590`288-- The current parser and related classes and methods, are deprecated.289- :issue:`2205`290-291- - ``OptionParser`` and the ``parser`` module, which is a modified copy of292- ``optparse`` in the standard library.293- - ``Context.protected_args`` is unneeded. ``Context.args`` contains any294- remaining arguments while parsing.295- - ``Parameter.add_to_parser`` (on both ``Argument`` and ``Option``) is296- unneeded. Parsing works directly without building a separate parser.297- - ``split_arg_string`` is moved from ``parser`` to ``shell_completion``.298-299-- Enable deferred evaluation of annotations with300- ``from __future__ import annotations``. :pr:`2270`301-- When generating a command's name from a decorated function's name, the302- suffixes ``_command``, ``_cmd``, ``_group``, and ``_grp`` are removed.303- :issue:`2322`304-- Show the ``types.ParamType.name`` for ``types.Choice`` options within305- ``--help`` message if ``show_choices=False`` is specified.306- :issue:`2356`307-- Do not display default values in prompts when ``Option.show_default`` is308- ``False``. :pr:`2509`309-- Add ``get_help_extra`` method on ``Option`` to fetch the generated extra310- items used in ``get_help_record`` to render help text. :issue:`2516`311- :pr:`2517`312-- Keep stdout and stderr streams independent in ``CliRunner``. Always313- collect stderr output and never raise an exception. Add a new314- output stream to simulate what the user sees in its terminal. Removes315- the ``mix_stderr`` parameter in ``CliRunner``. :issue:`2522` :pr:`2523`316-- ``Option.show_envvar`` now also shows environment variable in error messages.317- :issue:`2695` :pr:`2696`318-- ``Context.close`` will be called on exit. This results in all319- ``Context.call_on_close`` callbacks and context managers added via320- ``Context.with_resource`` to be closed on exit as well. :pr:`2680`321-- Add ``ProgressBar(hidden: bool)`` to allow hiding the progressbar. :issue:`2609`322-- A ``UserWarning`` will be shown when multiple parameters attempt to use the323- same name. :issue:`2396`324-- When using ``Option.envvar`` with ``Option.flag_value``, the ``flag_value``325- will always be used instead of the value of the environment variable.326- :issue:`2746` :pr:`2788`327-- Add ``Choice.get_invalid_choice_message`` method for customizing the328- invalid choice message. :issue:`2621` :pr:`2622`329-- If help is shown because ``no_args_is_help`` is enabled (defaults to ``True``330- for groups, ``False`` for commands), the exit code is 2 instead of 0.331- :issue:`1489` :pr:`1489`332-- Contexts created during shell completion are closed properly, fixing333- a ``ResourceWarning`` when using ``click.File``. :issue:`2644` :pr:`2800`334- :pr:`2767`335-- ``click.edit(filename)`` now supports passing an iterable of filenames in336- case the editor supports editing multiple files at once. Its return type337- is now also typed: ``AnyStr`` if ``text`` is passed, otherwise ``None``.338- :issue:`2067` :pr:`2068`339-- Specialized typing of ``progressbar(length=...)`` as ``ProgressBar[int]``.340- :pr:`2630`341-- Improve ``echo_via_pager`` behaviour in face of errors.342- :issue:`2674`343-344- - Terminate the pager in case a generator passed to ``echo_via_pager``345- raises an exception.346- - Ensure to always close the pipe to the pager process and wait for it347- to terminate.348- - ``echo_via_pager`` will not ignore ``KeyboardInterrupt`` anymore. This349- allows the user to search for future output of the generator when350- using less and then aborting the program using ctrl-c.351-352-- ``deprecated: bool | str`` can now be used on options and arguments. This353- previously was only available for ``Command``. The message can now also be354- customised by using a ``str`` instead of a ``bool``. :issue:`2263` :pr:`2271`355-356- - ``Command.deprecated`` formatting in ``--help`` changed from357- ``(Deprecated) help`` to ``help (DEPRECATED)``.358- - Parameters cannot be required nor prompted or an error is raised.359- - A warning will be printed when something deprecated is used.360-361-- Add a ``catch_exceptions`` parameter to ``CliRunner``. If362- ``catch_exceptions`` is not passed to ``CliRunner.invoke``, the value363- from ``CliRunner`` is used. :issue:`2817` :pr:`2818`364-- ``Option.flag_value`` will no longer have a default value set based on365- ``Option.default`` if ``Option.is_flag`` is ``False``. This results in366- ``Option.default`` not needing to implement `__bool__`. :pr:`2829`367-- Incorrect ``click.edit`` typing has been corrected. :pr:`2804`368-- ``Choice`` is now generic and supports any iterable value.369- This allows you to use enums and other non-``str`` values. :pr:`2796`370- :issue:`605`371-- Fix setup of help option's defaults when using a custom class on its372- decorator. Removes ``HelpOption``. :issue:`2832` :pr:`2840`373-374-Version 8.1.8375--------------376-377-Released 2024-12-19378-379-- Fix an issue with type hints for ``click.open_file()``. :issue:`2717`380-- Fix issue where error message for invalid ``click.Path`` displays on381- multiple lines. :issue:`2697`382-- Fixed issue that prevented a default value of ``""`` from being displayed in383- the help for an option. :issue:`2500`384-- The test runner handles stripping color consistently on Windows.385- :issue:`2705`386-- Show correct value for flag default when using ``default_map``.387- :issue:`2632`388-- Fix ``click.echo(color=...)`` passing ``color`` to coloroma so it can be389- forced on Windows. :issue:`2606`.390-- More robust bash version check, fixing problem on Windows with git-bash.391- :issue:`2638`392-- Cache the help option generated by the ``help_option_names`` setting to393- respect its eagerness. :pr:`2811`394-- Replace uses of ``os.system`` with ``subprocess.Popen``. :issue:`1476`395-- Exceptions generated during a command will use the context's ``color``396- setting when being displayed. :issue:`2193`397-- Error message when defining option with invalid name is more descriptive.398- :issue:`2452`399-- Refactor code generating default ``--help`` option to deduplicate code.400- :pr:`2563`401-- Test ``CLIRunner`` resets patched ``_compat.should_strip_ansi``.402- :issue:`2732`403-404-405-Version 8.1.7406--------------407-408-Released 2023-08-17409-410-- Fix issue with regex flags in shell completion. :issue:`2581`411-- Bash version detection issues a warning instead of an error. :issue:`2574`412-- Fix issue with completion script for Fish shell. :issue:`2567`413-414-415-Version 8.1.6416--------------417-418-Released 2023-07-18419-420-- Fix an issue with type hints for ``@click.group()``. :issue:`2558`421-422-423-Version 8.1.5424--------------425-426-Released 2023-07-13427-428-- Fix an issue with type hints for ``@click.command()``, ``@click.option()``, and429- other decorators. Introduce typing tests. :issue:`2558`430-431-432-Version 8.1.4433--------------434-435-Released 2023-07-06436-437-- Replace all ``typing.Dict`` occurrences to ``typing.MutableMapping`` for438- parameter hints. :issue:`2255`439-- Improve type hinting for decorators and give all generic types parameters.440- :issue:`2398`441-- Fix return value and type signature of `shell_completion.add_completion_class`442- function. :pr:`2421`443-- Bash version detection doesn't fail on Windows. :issue:`2461`444-- Completion works if there is a dot (``.``) in the program name. :issue:`2166`445-- Improve type annotations for pyright type checker. :issue:`2268`446-- Improve responsiveness of ``click.clear()``. :issue:`2284`447-- Improve command name detection when using Shiv or PEX. :issue:`2332`448-- Avoid showing empty lines if command help text is empty. :issue:`2368`449-- ZSH completion script works when loaded from ``fpath``. :issue:`2344`.450-- ``EOFError`` and ``KeyboardInterrupt`` tracebacks are not suppressed when451- ``standalone_mode`` is disabled. :issue:`2380`452-- ``@group.command`` does not fail if the group was created with a custom453- ``command_class``. :issue:`2416`454-- ``multiple=True`` is allowed for flag options again and does not require455- setting ``default=()``. :issue:`2246, 2292, 2295`456-- Make the decorators returned by ``@argument()`` and ``@option()`` reusable when the457- ``cls`` parameter is used. :issue:`2294`458-- Don't fail when writing filenames to streams with strict errors. Replace invalid459- bytes with the replacement character (``�``). :issue:`2395`460-- Remove unnecessary attempt to detect MSYS2 environment. :issue:`2355`461-- Remove outdated and unnecessary detection of App Engine environment. :pr:`2554`462-- ``echo()`` does not fail when no streams are attached, such as with ``pythonw`` on463- Windows. :issue:`2415`464-- Argument with ``expose_value=False`` do not cause completion to fail. :issue:`2336`465-466-467-Version 8.1.3468--------------469-470-Released 2022-04-28471-472-- Use verbose form of ``typing.Callable`` for ``@command`` and473- ``@group``. :issue:`2255`474-- Show error when attempting to create an option with475- ``multiple=True, is_flag=True``. Use ``count`` instead.476- :issue:`2246`477-478-479-Version 8.1.2480--------------481-482-Released 2022-03-31483-484-- Fix error message for readable path check that was mixed up with the485- executable check. :pr:`2236`486-- Restore parameter order for ``Path``, placing the ``executable``487- parameter at the end. It is recommended to use keyword arguments488- instead of positional arguments. :issue:`2235`489-490-491-Version 8.1.1492--------------493-494-Released 2022-03-30495-496-- Fix an issue with decorator typing that caused type checking to497- report that a command was not callable. :issue:`2227`498-499-500-Version 8.1.0501--------------502-503-Released 2022-03-28504-505-- Drop support for Python 3.6. :pr:`2129`506-- Remove previously deprecated code. :pr:`2130`507-508- - ``Group.resultcallback`` is renamed to ``result_callback``.509- - ``autocompletion`` parameter to ``Command`` is renamed to510- ``shell_complete``.511- - ``get_terminal_size`` is removed, use512- ``shutil.get_terminal_size`` instead.513- - ``get_os_args`` is removed, use ``sys.argv[1:]`` instead.514-515-- Rely on :pep:`538` and :pep:`540` to handle selecting UTF-8 encoding516- instead of ASCII. Click's locale encoding detection is removed.517- :issue:`2198`518-- Single options boolean flags with ``show_default=True`` only show519- the default if it is ``True``. :issue:`1971`520-- The ``command`` and ``group`` decorators can be applied with or521- without parentheses. :issue:`1359`522-- The ``Path`` type can check whether the target is executable.523- :issue:`1961`524-- ``Command.show_default`` overrides ``Context.show_default``, instead525- of the other way around. :issue:`1963`526-- Parameter decorators and ``@group`` handles ``cls=None`` the same as527- not passing ``cls``. ``@option`` handles ``help=None`` the same as528- not passing ``help``. :issue:`#1959`529-- A flag option with ``required=True`` requires that the flag is530- passed instead of choosing the implicit default value. :issue:`1978`531-- Indentation in help text passed to ``Option`` and ``Command`` is532- cleaned the same as using the ``@option`` and ``@command``533- decorators does. A command's ``epilog`` and ``short_help`` are also534- processed. :issue:`1985`535-- Store unprocessed ``Command.help``, ``epilog`` and ``short_help``536- strings. Processing is only done when formatting help text for537- output. :issue:`2149`538-- Allow empty str input for ``prompt()`` when539- ``confirmation_prompt=True`` and ``default=""``. :issue:`2157`540-- Windows glob pattern expansion doesn't fail if a value is an invalid541- pattern. :issue:`2195`542-- It's possible to pass a list of ``params`` to ``@command``. Any543- params defined with decorators are appended to the passed params.544- :issue:`2131`.545-- ``@command`` decorator is annotated as returning the correct type if546- a ``cls`` argument is used. :issue:`2211`547-- A ``Group`` with ``invoke_without_command=True`` and ``chain=False``548- will invoke its result callback with the group function's return549- value. :issue:`2124`550-- ``to_info_dict`` will not fail if a ``ParamType`` doesn't define a551- ``name``. :issue:`2168`552-- Shell completion prioritizes option values with option prefixes over553- new options. :issue:`2040`554-- Options that get an environment variable value using555- ``autoenvvar_prefix`` treat an empty value as ``None``, consistent556- with a direct ``envvar``. :issue:`2146`557-558-559-Version 8.0.4560--------------561-562-Released 2022-02-18563-564-- ``open_file`` recognizes ``Path("-")`` as a standard stream, the565- same as the string ``"-"``. :issue:`2106`566-- The ``option`` and ``argument`` decorators preserve the type567- annotation of the decorated function. :pr:`2155`568-- A callable default value can customize its help text by overriding569- ``__str__`` instead of always showing ``(dynamic)``. :issue:`2099`570-- Fix a typo in the Bash completion script that affected file and571- directory completion. If this script was generated by a previous572- version, it should be regenerated. :issue:`2163`573-- Fix typing for ``echo`` and ``secho`` file argument.574- :issue:`2174, 2185`575-576-577-Version 8.0.3578--------------579-580-Released 2021-10-10581-582-- Fix issue with ``Path(resolve_path=True)`` type creating invalid583- paths. :issue:`2088`584-- Importing ``readline`` does not cause the ``confirm()`` prompt to585- disappear when pressing backspace. :issue:`2092`586-- Any default values injected by ``invoke()`` are cast to the587- corresponding parameter's type. :issue:`2089, 2090`588-589-590-Version 8.0.2591--------------592-593-Released 2021-10-08594-595-- ``is_bool_flag`` is not set to ``True`` if ``is_flag`` is ``False``.596- :issue:`1925`597-- Bash version detection is locale independent. :issue:`1940`598-- Empty ``default`` value is not shown for ``multiple=True``.599- :issue:`1969`600-- Fix shell completion for arguments that start with a forward slash601- such as absolute file paths. :issue:`1929`602-- ``Path`` type with ``resolve_path=True`` resolves relative symlinks603- to be relative to the containing directory. :issue:`1921`604-- Completion does not skip Python's resource cleanup when exiting,605- avoiding some unexpected warning output. :issue:`1738, 2017`606-- Fix type annotation for ``type`` argument in ``prompt`` function.607- :issue:`2062`608-- Fix overline and italic styles, which were incorrectly added when609- adding underline. :pr:`2058`610-- An option with ``count=True`` will not show "[x>=0]" in help text.611- :issue:`2072`612-- Default values are not cast to the parameter type twice during613- processing. :issue:`2085`614-- Options with ``multiple`` and ``flag_value`` use the flag value615- instead of leaving an internal placeholder. :issue:`2001`616-617-618-Version 8.0.1619--------------620-621-Released 2021-05-19622-623-- Mark top-level names as exported so type checking understand imports624- in user projects. :issue:`1879`625-- Annotate ``Context.obj`` as ``Any`` so type checking allows all626- operations on the arbitrary object. :issue:`1885`627-- Fix some types that weren't available in Python 3.6.0. :issue:`1882`628-- Fix type checking for iterating over ``ProgressBar`` object.629- :issue:`1892`630-- The ``importlib_metadata`` backport package is installed on Python <631- 3.8. :issue:`1889`632-- Arguments with ``nargs=-1`` only use env var value if no command633- line values are given. :issue:`1903`634-- Flag options guess their type from ``flag_value`` if given, like635- regular options do from ``default``. :issue:`1886`636-- Added documentation that custom parameter types may be passed637- already valid values in addition to strings. :issue:`1898`638-- Resolving commands returns the name that was given, not639- ``command.name``, fixing an unintended change to help text and640- ``default_map`` lookups. When using patterns like ``AliasedGroup``,641- override ``resolve_command`` to change the name that is returned if642- needed. :issue:`1895`643-- If a default value is invalid, it does not prevent showing help644- text. :issue:`1889`645-- Pass ``windows_expand_args=False`` when calling the main command to646- disable pattern expansion on Windows. There is no way to escape647- patterns in CMD, so if the program needs to pass them on as-is then648- expansion must be disabled. :issue:`1901`649-650-651-Version 8.0.0652--------------653-654-Released 2021-05-11655-656-- Drop support for Python 2 and 3.5.657-- Colorama is always installed on Windows in order to provide style658- and color support. :pr:`1784`659-- Adds a repr to Command, showing the command name for friendlier660- debugging. :issue:`1267`, :pr:`1295`661-- Add support for distinguishing the source of a command line662- parameter. :issue:`1264`, :pr:`1329`663-- Add an optional parameter to ``ProgressBar.update`` to set the664- ``current_item``. :issue:`1226`, :pr:`1332`665-- ``version_option`` uses ``importlib.metadata`` (or the666- ``importlib_metadata`` backport) instead of ``pkg_resources``. The667- version is detected based on the package name, not the entry point668- name. The Python package name must match the installed package669- name, or be passed with ``package_name=``. :issue:`1582`670-- If validation fails for a prompt with ``hide_input=True``, the value671- is not shown in the error message. :issue:`1460`672-- An ``IntRange`` or ``FloatRange`` option shows the accepted range in673- its help text. :issue:`1525`, :pr:`1303`674-- ``IntRange`` and ``FloatRange`` bounds can be open (``<``) instead675- of closed (``<=``) by setting ``min_open`` and ``max_open``. Error676- messages have changed to reflect this. :issue:`1100`677-- An option defined with duplicate flag names (``"--foo/--foo"``)678- raises a ``ValueError``. :issue:`1465`679-- ``echo()`` will not fail when using pytest's ``capsys`` fixture on680- Windows. :issue:`1590`681-- Resolving commands returns the canonical command name instead of the682- matched name. This makes behavior such as help text and683- ``Context.invoked_subcommand`` consistent when using patterns like684- ``AliasedGroup``. :issue:`1422`685-- The ``BOOL`` type accepts the values "on" and "off". :issue:`1629`686-- A ``Group`` with ``invoke_without_command=True`` will always invoke687- its result callback. :issue:`1178`688-- ``nargs == -1`` and ``nargs > 1`` is parsed and validated for689- values from environment variables and defaults. :issue:`729`690-- Detect the program name when executing a module or package with691- ``python -m name``. :issue:`1603`692-- Include required parent arguments in help synopsis of subcommands.693- :issue:`1475`694-- Help for boolean flags with ``show_default=True`` shows the flag695- name instead of ``True`` or ``False``. :issue:`1538`696-- Non-string objects passed to ``style()`` and ``secho()`` will be697- converted to string. :pr:`1146`698-- ``edit(require_save=True)`` will detect saves for editors that exit699- very fast on filesystems with 1 second resolution. :pr:`1050`700-- New class attributes make it easier to use custom core objects701- throughout an entire application. :pr:`938`702-703- - ``Command.context_class`` controls the context created when704- running the command.705- - ``Context.invoke`` creates new contexts of the same type, so a706- custom type will persist to invoked subcommands.707- - ``Context.formatter_class`` controls the formatter used to708- generate help and usage.709- - ``Group.command_class`` changes the default type for710- subcommands with ``@group.command()``.711- - ``Group.group_class`` changes the default type for subgroups712- with ``@group.group()``. Setting it to ``type`` will create713- subgroups of the same type as the group itself.714- - Core objects use ``super()`` consistently for better support of715- subclassing.716-717-- Use ``Context.with_resource()`` to manage resources that would718- normally be used in a ``with`` statement, allowing them to be used719- across subcommands and callbacks, then cleaned up when the context720- ends. :pr:`1191`721-- The result object returned by the test runner's ``invoke()`` method722- has a ``return_value`` attribute with the value returned by the723- invoked command. :pr:`1312`724-- Required arguments with the ``Choice`` type show the choices in725- curly braces to indicate that one is required (``{a|b|c}``).726- :issue:`1272`727-- If only a name is passed to ``option()``, Click suggests renaming it728- to ``--name``. :pr:`1355`729-- A context's ``show_default`` parameter defaults to the value from730- the parent context. :issue:`1565`731-- ``click.style()`` can output 256 and RGB color codes. Most modern732- terminals support these codes. :pr:`1429`733-- When using ``CliRunner.invoke()``, the replaced ``stdin`` file has734- ``name`` and ``mode`` attributes. This lets ``File`` options with735- the ``-`` value match non-testing behavior. :issue:`1064`736-- When creating a ``Group``, allow passing a list of commands instead737- of a dict. :issue:`1339`738-- When a long option name isn't valid, use ``difflib`` to make better739- suggestions for possible corrections. :issue:`1446`740-- Core objects have a ``to_info_dict()`` method. This gathers741- information about the object's structure that could be useful for a742- tool generating user-facing documentation. To get the structure of743- an entire CLI, use ``Context(cli).to_info_dict()``. :issue:`461`744-- Redesign the shell completion system. :issue:`1484`, :pr:`1622`745-746- - Support Bash >= 4.4, Zsh, and Fish, with the ability for747- extensions to add support for other shells.748- - Allow commands, groups, parameters, and types to override their749- completions suggestions.750- - Groups complete the names commands were registered with, which751- can differ from the name they were created with.752- - The ``autocompletion`` parameter for options and arguments is753- renamed to ``shell_complete``. The function must take754- ``ctx, param, incomplete``, must do matching rather than return755- all values, and must return a list of strings or a list of756- ``CompletionItem``. The old name and behavior is deprecated and757- will be removed in 8.1.758- - The env var values used to start completion have changed order.759- The shell now comes first, such as ``{shell}_source`` rather760- than ``source_{shell}``, and is always required.761-762-- Completion correctly parses command line strings with incomplete763- quoting or escape sequences. :issue:`1708`764-- Extra context settings (``obj=...``, etc.) are passed on to the765- completion system. :issue:`942`766-- Include ``--help`` option in completion. :pr:`1504`767-- ``ParameterSource`` is an ``enum.Enum`` subclass. :issue:`1530`768-- Boolean and UUID types strip surrounding space before converting.769- :issue:`1605`770-- Adjusted error message from parameter type validation to be more771- consistent. Quotes are used to distinguish the invalid value.772- :issue:`1605`773-- The default value for a parameter with ``nargs`` > 1 and774- ``multiple=True`` must be a list of tuples. :issue:`1649`775-- When getting the value for a parameter, the default is tried in the776- same section as other sources to ensure consistent processing.777- :issue:`1649`778-- All parameter types accept a value that is already the correct type.779- :issue:`1649`780-- For shell completion, an argument is considered incomplete if its781- value did not come from the command line args. :issue:`1649`782-- Added ``ParameterSource.PROMPT`` to track parameter values that were783- prompted for. :issue:`1649`784-- Options with ``nargs`` > 1 no longer raise an error if a default is785- not given. Parameters with ``nargs`` > 1 default to ``None``, and786- parameters with ``multiple=True`` or ``nargs=-1`` default to an787- empty tuple. :issue:`472`788-- Handle empty env vars as though the option were not passed. This789- extends the change introduced in 7.1 to be consistent in more cases.790- :issue:`1285`791-- ``Parameter.get_default()`` checks ``Context.default_map`` to792- handle overrides consistently in help text, ``invoke()``, and793- prompts. :issue:`1548`794-- Add ``prompt_required`` param to ``Option``. When set to ``False``,795- the user will only be prompted for an input if no value was passed.796- :issue:`736`797-- Providing the value to an option can be made optional through798- ``is_flag=False``, and the value can instead be prompted for or799- passed in as a default value.800- :issue:`549, 736, 764, 921, 1015, 1618`801-- Fix formatting when ``Command.options_metavar`` is empty. :pr:`1551`802-- Revert adding space between option help text that wraps.803- :issue:`1831`804-- The default value passed to ``prompt`` will be cast to the correct805- type like an input value would be. :pr:`1517`806-- Automatically generated short help messages will stop at the first807- ending of a phrase or double linebreak. :issue:`1082`808-- Skip progress bar render steps for efficiency with very fast809- iterators by setting ``update_min_steps``. :issue:`676`810-- Respect ``case_sensitive=False`` when doing shell completion for811- ``Choice`` :issue:`1692`812-- Use ``mkstemp()`` instead of ``mktemp()`` in pager implementation.813- :issue:`1752`814-- If ``Option.show_default`` is a string, it is displayed even if815- ``default`` is ``None``. :issue:`1732`816-- ``click.get_terminal_size()`` is deprecated and will be removed in817- 8.1. Use :func:`shutil.get_terminal_size` instead. :issue:`1736`818-- Control the location of the temporary directory created by819- ``CLIRunner.isolated_filesystem`` by passing ``temp_dir``. A custom820- directory will not be removed automatically. :issue:`395`821-- ``click.confirm()`` will prompt until input is given if called with822- ``default=None``. :issue:`1381`823-- Option prompts validate the value with the option's callback in824- addition to its type. :issue:`457`825-- ``confirmation_prompt`` can be set to a custom string. :issue:`723`826-- Allow styled output in Jupyter on Windows. :issue:`1271`827-- ``style()`` supports the ``strikethrough``, ``italic``, and828- ``overline`` styles. :issue:`805, 1821`829-- Multiline marker is removed from short help text. :issue:`1597`830-- Restore progress bar behavior of echoing only the label if the file831- is not a TTY. :issue:`1138`832-- Progress bar output is shown even if execution time is less than 0.5833- seconds. :issue:`1648`834-- Progress bar ``item_show_func`` shows the current item, not the835- previous item. :issue:`1353`836-- The ``Path`` param type can be passed ``path_type=pathlib.Path`` to837- return a path object instead of a string. :issue:`405`838-- ``TypeError`` is raised when parameter with ``multiple=True`` or839- ``nargs > 1`` has non-iterable default. :issue:`1749`840-- Add a ``pass_meta_key`` decorator for passing a key from841- ``Context.meta``. This is useful for extensions using ``meta`` to842- store information. :issue:`1739`843-- ``Path`` ``resolve_path`` resolves symlinks on Windows Python < 3.8.844- :issue:`1813`845-- Command deprecation notice appears at the start of the help text, as846- well as in the short help. The notice is not in all caps.847- :issue:`1791`848-- When taking arguments from ``sys.argv`` on Windows, glob patterns,849- user dir, and env vars are expanded. :issue:`1096`850-- Marked messages shown by the CLI with ``gettext()`` to allow851- applications to translate Click's built-in strings. :issue:`303`852-- Writing invalid characters to ``stderr`` when using the test runner853- does not raise a ``UnicodeEncodeError``. :issue:`848`854-- Fix an issue where ``readline`` would clear the entire ``prompt()``855- line instead of only the input when pressing backspace. :issue:`665`856-- Add all kwargs passed to ``Context.invoke()`` to ``ctx.params``.857- Fixes an inconsistency when nesting ``Context.forward()`` calls.858- :issue:`1568`859-- The ``MultiCommand.resultcallback`` decorator is renamed to860- ``result_callback``. The old name is deprecated. :issue:`1160`861-- Fix issues with ``CliRunner`` output when using ``echo_stdin=True``.862- :issue:`1101`863-- Fix a bug of ``click.utils.make_default_short_help`` for which the864- returned string could be as long as ``max_width + 3``. :issue:`1849`865-- When defining a parameter, ``default`` is validated with866- ``multiple`` and ``nargs``. More validation is done for values being867- processed as well. :issue:`1806`868-- ``HelpFormatter.write_text`` uses the full line width when wrapping869- text. :issue:`1871`870-871-872-Version 7.1.2873--------------874-875-Released 2020-04-27876-877-- Revert applying shell quoting to commands for ``echo_with_pager``878- and ``edit``. This was intended to allows spaces in commands, but879- caused issues if the string was actually a command and arguments, or880- on Windows. Instead, the string must be quoted manually as it should881- appear on the command line. :issue:`1514`882-883-884-Version 7.1.1885--------------886-887-Released 2020-03-09888-889-- Fix ``ClickException`` output going to stdout instead of stderr.890- :issue:`1495`891-892-893-Version 7.1894------------895-896-Released 2020-03-09897-898-- Fix PyPI package name, "click" is lowercase again.899-- Fix link in ``unicode_literals`` error message. :pr:`1151`900-- Add support for colored output on UNIX Jupyter notebooks.901- :issue:`1185`902-- Operations that strip ANSI controls will strip the cursor hide/show903- sequences. :issue:`1216`904-- Remove unused compat shim for ``bytes``. :pr:`1195`905-- Expand testing around termui, especially getchar on Windows.906- :issue:`1116`907-- Fix output on Windows Python 2.7 built with MSVC 14. :pr:`1342`908-- Fix ``OSError`` when running in MSYS2. :issue:`1338`909-- Fix ``OSError`` when redirecting to ``NUL`` stream on Windows.910- :issue:`1065`911-- Fix memory leak when parsing Unicode arguments on Windows.912- :issue:`1136`913-- Fix error in new AppEngine environments. :issue:`1462`914-- Always return one of the passed choices for ``click.Choice``915- :issue:`1277`, :pr:`1318`916-- Add ``no_args_is_help`` option to ``click.Command``, defaults to917- False :pr:`1167`918-- Add ``show_default`` parameter to ``Context`` to enable showing919- defaults globally. :issue:`1018`920-- Handle ``env MYPATH=''`` as though the option were not passed.921- :issue:`1196`922-- It is once again possible to call ``next(bar)`` on an active923- progress bar instance. :issue:`1125`924-- ``open_file`` with ``atomic=True`` retains permissions of existing925- files and respects the current umask for new files. :issue:`1376`926-- When using the test ``CliRunner`` with ``mix_stderr=False``, if927- ``result.stderr`` is empty it will not raise a ``ValueError``.928- :issue:`1193`929-- Remove the unused ``mix_stderr`` parameter from930- ``CliRunner.invoke``. :issue:`1435`931-- Fix ``TypeError`` raised when using bool flags and specifying932- ``type=bool``. :issue:`1287`933-- Newlines in option help text are replaced with spaces before934- re-wrapping to avoid uneven line breaks. :issue:`834`935-- ``MissingParameter`` exceptions are printable in the Python936- interpreter. :issue:`1139`937-- Fix how default values for file-type options are shown during938- prompts. :issue:`914`939-- Fix environment variable automatic generation for commands940- containing ``-``. :issue:`1253`941-- Option help text replaces newlines with spaces when rewrapping, but942- preserves paragraph breaks, fixing multiline formatting.943- :issue:`834, 1066, 1397`944-- Option help text that is wrapped adds an extra newline at the end to945- distinguish it from the next option. :issue:`1075`946-- Consider ``sensible-editor`` when determining the editor to use for947- ``click.edit()``. :pr:`1469`948-- Arguments to system calls such as the executable path passed to949- ``click.edit`` can contains spaces. :pr:`1470`950-- Add ZSH completion autoloading and error handling. :issue:`1348`951-- Add a repr to ``Command``, ``Group``, ``Option``, and ``Argument``,952- showing the name for friendlier debugging. :issue:`1267`953-- Completion doesn't consider option names if a value starts with954- ``-`` after the ``--`` separator. :issue:`1247`955-- ZSH completion escapes special characters in values. :pr:`1418`956-- Add completion support for Fish shell. :pr:`1423`957-- Decoding bytes option values falls back to UTF-8 in more cases.958- :pr:`1468`959-- Make the warning about old 2-arg parameter callbacks a deprecation960- warning, to be removed in 8.0. This has been a warning since Click961- 2.0. :pr:`1492`962-- Adjust error messages to standardize the types of quotes used so963- they match error messages from Python.964-965-966-Version 7.0967------------968-969-Released 2018-09-25970-971-- Drop support for Python 2.6 and 3.3. :pr:`967, 976`972-- Wrap ``click.Choice``'s missing message. :issue:`202`, :pr:`1000`973-- Add native ZSH autocompletion support. :issue:`323`, :pr:`865`974-- Document that ANSI color info isn't parsed from bytearrays in Python975- 2. :issue:`334`976-- Document byte-stripping behavior of ``CliRunner``. :issue:`334`,977- :pr:`1010`978-- Usage errors now hint at the ``--help`` option. :issue:`393`,979- :pr:`557`980-- Implement streaming pager. :issue:`409`, :pr:`889`981-- Extract bar formatting to its own method. :pr:`414`982-- Add ``DateTime`` type for converting input in given date time983- formats. :pr:`423`984-- ``secho``'s first argument can now be ``None``, like in ``echo``.985- :pr:`424`986-- Fixes a ``ZeroDivisionError`` in ``ProgressBar.make_step``, when the987- arg passed to the first call of ``ProgressBar.update`` is 0.988- :issue:`447`, :pr:`1012`989-- Show progressbar only if total execution time is visible. :pr:`487`990-- Added the ability to hide commands and options from help. :pr:`500`991-- Document that options can be ``required=True``. :issue:`514`,992- :pr:`1022`993-- Non-standalone calls to ``Context.exit`` return the exit code,994- rather than calling ``sys.exit``. :issue:`667`, :pr:`533, 1098`995-- ``click.getchar()`` returns Unicode in Python 3 on Windows,996- consistent with other platforms. :issue:`537, 821, 822, 1088`,997- :pr:`1108`998-- Added ``FloatRange`` type. :pr:`538, 553`999-- Added support for bash completion of ``type=click.Choice`` for1000- ``Options`` and ``Arguments``. :issue:`535`, :pr:`681`1001-- Only allow one positional arg for ``Argument`` parameter1002- declaration. :issue:`568, 574`, :pr:`1014`1003-- Add ``case_sensitive=False`` as an option to Choice. :issue:`569`1004-- ``click.getchar()`` correctly raises ``KeyboardInterrupt`` on "^C"1005- and ``EOFError`` on "^D" on Linux. :issue:`583`, :pr:`1115`1006-- Fix encoding issue with ``click.getchar(echo=True)`` on Linux.1007- :pr:`1115`1008-- ``param_hint`` in errors now derived from param itself.1009- :issue:`598, 704`, :pr:`709`1010-- Add a test that ensures that when an argument is formatted into a1011- usage error, its metavar is used, not its name. :pr:`612`1012-- Allow setting ``prog_name`` as extra in ``CliRunner.invoke``.1013- :issue:`616`, :pr:`999`1014-- Help text taken from docstrings truncates at the ``\f`` form feed1015- character, useful for hiding Sphinx-style parameter documentation.1016- :pr:`629, 1091`1017-- ``launch`` now works properly under Cygwin. :pr:`650`1018-- Update progress after iteration. :issue:`651`, :pr:`706`1019-- ``CliRunner.invoke`` now may receive ``args`` as a string1020- representing a Unix shell command. :pr:`664`1021-- Make ``Argument.make_metavar()`` default to type metavar. :pr:`675`1022-- Add documentation for ``ignore_unknown_options``. :pr:`684`1023-- Add bright colors support for ``click.style`` and fix the reset1024- option for parameters ``fg`` and ``bg``. :issue:`703`, :pr:`809`1025-- Add ``show_envvar`` for showing environment variables in help.1026- :pr:`710`1027-- Avoid ``BrokenPipeError`` during interpreter shutdown when stdout or1028- stderr is a closed pipe. :issue:`712`, :pr:`1106`1029-- Document customizing option names. :issue:`725`, :pr:`1016`1030-- Disable ``sys._getframes()`` on Python interpreters that don't1031- support it. :pr:`728`1032-- Fix bug in test runner when calling ``sys.exit`` with ``None``.1033- :pr:`739`1034-- Clarify documentation on command line options. :issue:`741`,1035- :pr:`1003`1036-- Fix crash on Windows console. :issue:`744`1037-- Fix bug that caused bash completion to give improper completions on1038- chained commands. :issue:`754`, :pr:`774`1039-- Added support for dynamic bash completion from a user-supplied1040- callback. :pr:`755`1041-- Added support for bash completions containing spaces. :pr:`773`1042-- Allow autocompletion function to determine whether or not to return1043- completions that start with the incomplete argument. :issue:`790`,1044- :pr:`806`1045-- Fix option naming routine to match documentation and be1046- deterministic. :issue:`793`, :pr:`794`1047-- Fix path validation bug. :issue:`795`, :pr:`1020`1048-- Add test and documentation for ``Option`` naming: functionality.1049- :pr:`799`1050-- Update doc to match arg name for ``path_type``. :pr:`801`1051-- Raw strings added so correct escaping occurs. :pr:`807`1052-- Fix 16k character limit of ``click.echo`` on Windows. :issue:`816`,1053- :pr:`819`1054-- Overcome 64k character limit when writing to binary stream on1055- Windows 7. :issue:`825`, :pr:`830`1056-- Add bool conversion for "t" and "f". :pr:`842`1057-- ``NoSuchOption`` errors take ``ctx`` so that ``--help`` hint gets1058- printed in error output. :pr:`860`1059-- Fixed the behavior of Click error messages with regards to Unicode1060- on 2.x and 3.x. Message is now always Unicode and the str and1061- Unicode special methods work as you expect on that platform.1062- :issue:`862`1063-- Progress bar now uses stderr by default. :pr:`863`1064-- Add support for auto-completion documentation. :issue:`866`,1065- :pr:`869`1066-- Allow ``CliRunner`` to separate stdout and stderr. :pr:`868`1067-- Fix variable precedence. :issue:`873`, :pr:`874`1068-- Fix invalid escape sequences. :pr:`877`1069-- Fix ``ResourceWarning`` that occurs during some tests. :pr:`878`1070-- When detecting a misconfigured locale, don't fail if the ``locale``1071- command fails. :pr:`880`1072-- Add ``case_sensitive=False`` as an option to ``Choice`` types.1073- :pr:`887`1074-- Force stdout/stderr writable. This works around issues with badly1075- patched standard streams like those from Jupyter. :pr:`918`1076-- Fix completion of subcommand options after last argument1077- :issue:`919`, :pr:`930`1078-- ``_AtomicFile`` now uses the ``realpath`` of the original filename1079- so that changing the working directory does not affect it. :pr:`920`1080-- Fix incorrect completions when defaults are present :issue:`925`,1081- :pr:`930`1082-- Add copy option attrs so that custom classes can be reused.1083- :issue:`926`, :pr:`994`1084-- "x" and "a" file modes now use stdout when file is ``"-"``.1085- :pr:`929`1086-- Fix missing comma in ``__all__`` list. :pr:`935`1087-- Clarify how parameters are named. :issue:`949`, :pr:`1009`1088-- Stdout is now automatically set to non blocking. :pr:`954`1089-- Do not set options twice. :pr:`962`1090-- Move ``fcntl`` import. :pr:`965`1091-- Fix Google App Engine ``ImportError``. :pr:`995`1092-- Better handling of help text for dynamic default option values.1093- :pr:`996`1094-- Fix ``get_winter_size()`` so it correctly returns ``(0,0)``.1095- :pr:`997`1096-- Add test case checking for custom param type. :pr:`1001`1097-- Allow short width to address cmd formatting. :pr:`1002`1098-- Add details about Python version support. :pr:`1004`1099-- Added deprecation flag to commands. :pr:`1005`1100-- Fixed issues where ``fd`` was undefined. :pr:`1007`1101-- Fix formatting for short help. :pr:`1008`1102-- Document how ``auto_envvar_prefix`` works with command groups.1103- :pr:`1011`1104-- Don't add newlines by default for progress bars. :pr:`1013`1105-- Use Python sorting order for ZSH completions. :issue:`1047`,1106- :pr:`1059`1107-- Document that parameter names are converted to lowercase by default.1108- :pr:`1055`1109-- Subcommands that are named by the function now automatically have1110- the underscore replaced with a dash. If you register a function1111- named ``my_command`` it becomes ``my-command`` in the command line1112- interface.1113-- Hide hidden commands and options from completion. :issue:`1058`,1114- :pr:`1061`1115-- Fix absolute import blocking Click from being vendored into a1116- project on Windows. :issue:`1068`, :pr:`1069`1117-- Fix issue where a lowercase ``auto_envvar_prefix`` would not be1118- converted to uppercase. :pr:`1105`1119-1120-1121-Version 6.71122------------1123-1124-Released 2017-01-061125-1126-- Make ``click.progressbar`` work with ``codecs.open`` files.1127- :pr:`637`1128-- Fix bug in bash completion with nested subcommands. :pr:`639`1129-- Fix test runner not saving caller env correctly. :pr:`644`1130-- Fix handling of SIGPIPE. :pr:`62`1131-- Deal with broken Windows environments such as Google App Engine's.1132- :issue:`711`1133-1134-1135-Version 6.61136------------1137-1138-Released 2016-04-041139-1140-- Fix bug in ``click.Path`` where it would crash when passed a ``-``.1141- :issue:`551`1142-1143-1144-Version 6.41145------------1146-1147-Released 2016-03-241148-1149-- Fix bug in bash completion where click would discard one or more1150- trailing arguments. :issue:`471`1151-1152-1153-Version 6.31154------------1155-1156-Released 2016-02-221157-1158-- Fix argument checks for interpreter invoke with ``-m`` and ``-c`` on1159- Windows.1160-- Fixed a bug that cased locale detection to error out on Python 3.1161-1162-1163-Version 6.21164------------1165-1166-Released 2015-11-271167-1168-- Correct fix for hidden progress bars.1169-1170-1171-Version 6.11172------------1173-1174-Released 2015-11-271175-1176-- Resolved an issue with invisible progress bars no longer rendering.1177-- Disable chain commands with subcommands as they were inherently1178- broken.1179-- Fix ``MissingParameter`` not working without parameters passed.1180-1181-1182-Version 6.01183------------1184-1185-Released 2015-11-24, codename "pow pow"1186-1187-- Optimized the progressbar rendering to not render when it did not1188- actually change.1189-- Explicitly disallow ``nargs=-1`` with a set default.1190-- The context is now closed before it's popped from the stack.1191-- Added support for short aliases for the false flag on toggles.1192-- Click will now attempt to aid you with debugging locale errors1193- better by listing with the help of the OS what locales are1194- available.1195-- Click used to return byte strings on Python 2 in some unit-testing1196- situations. This has been fixed to correctly return unicode strings1197- now.1198-- For Windows users on Python 2, Click will now handle Unicode more1199- correctly handle Unicode coming in from the system. This also has1200- the disappointing side effect that filenames will now be always1201- unicode by default in the ``Path`` type which means that this can1202- introduce small bugs for code not aware of this.1203-- Added a ``type`` parameter to ``Path`` to force a specific string1204- type on the value.1205-- For users running Python on Windows the ``echo`` and ``prompt``1206- functions now work with full unicode functionality in the Python1207- windows console by emulating an output stream. This also applies to1208- getting the virtual output and input streams via1209- ``click.get_text_stream(...)``.1210-- Unittests now always force a certain virtual terminal width.1211-- Added support for allowing dashes to indicate standard streams to1212- the ``Path`` type.1213-- Multi commands in chain mode no longer propagate arguments left over1214- from parsing to the callbacks. It's also now disallowed through an1215- exception when optional arguments are attached to multi commands if1216- chain mode is enabled.1217-- Relaxed restriction that disallowed chained commands to have other1218- chained commands as child commands.1219-- Arguments with positive nargs can now have defaults implemented.1220- Previously this configuration would often result in slightly1221- unexpected values be returned.1222-1223-1224-Version 5.11225------------1226-1227-Released 2015-08-171228-1229-- Fix a bug in ``pass_obj`` that would accidentally pass the context1230- too.1231-1232-1233-Version 5.01234------------1235-1236-Released 2015-08-16, codename "tok tok"1237-1238-- Removed various deprecated functionality.1239-- Atomic files now only accept the ``w`` mode.1240-- Change the usage part of help output for very long commands to wrap1241- their arguments onto the next line, indented by 4 spaces.1242-- Fix a bug where return code and error messages were incorrect when1243- using ``CliRunner``.1244-- Added ``get_current_context``.1245-- Added a ``meta`` dictionary to the context which is shared across1246- the linked list of contexts to allow click utilities to place state1247- there.1248-- Introduced ``Context.scope``.1249-- The ``echo`` function is now threadsafe: It calls the ``write``1250- method of the underlying object only once.1251-- ``prompt(hide_input=True)`` now prints a newline on ``^C``.1252-- Click will now warn if users are using ``unicode_literals``.1253-- Click will now ignore the ``PAGER`` environment variable if it is1254- empty or contains only whitespace.1255-- The ``click-contrib`` GitHub organization was created.1256-1257-1258-Version 4.11259------------1260-1261-Released 2015-07-141262-1263-- Fix a bug where error messages would include a trailing ``None``1264- string.1265-- Fix a bug where Click would crash on docstrings with trailing1266- newlines.1267-- Support streams with encoding set to ``None`` on Python 3 by barfing1268- with a better error.1269-- Handle ^C in less-pager properly.1270-- Handle return value of ``None`` from ``sys.getfilesystemencoding``1271-- Fix crash when writing to unicode files with ``click.echo``.1272-- Fix type inference with multiple options.1273-1274-1275-Version 4.01276------------1277-1278-Released 2015-03-31, codename "zoom zoom"1279-1280-- Added ``color`` parameters to lots of interfaces that directly or1281- indirectly call into echoing. This previously was always1282- autodetection (with the exception of the ``echo_via_pager``1283- function). Now you can forcefully enable or disable it, overriding1284- the auto detection of Click.1285-- Added an ``UNPROCESSED`` type which does not perform any type1286- changes which simplifies text handling on 2.x / 3.x in some special1287- advanced usecases.1288-- Added ``NoSuchOption`` and ``BadOptionUsage`` exceptions for more1289- generic handling of errors.1290-- Added support for handling of unprocessed options which can be1291- useful in situations where arguments are forwarded to underlying1292- tools.1293-- Added ``max_content_width`` parameter to the context which can be1294- used to change the maximum width of help output. By default Click1295- will not format content for more than 80 characters width.1296-- Added support for writing prompts to stderr.1297-- Fix a bug when showing the default for multiple arguments.1298-- Added support for custom subclasses to ``option`` and ``argument``.1299-- Fix bug in ``clear()`` on Windows when colorama is installed.1300-- Reject ``nargs=-1`` for options properly. Options cannot be1301- variadic.1302-- Fixed an issue with bash completion not working properly for1303- commands with non ASCII characters or dashes.1304-- Added a way to manually update the progressbar.1305-- Changed the formatting of missing arguments. Previously the internal1306- argument name was shown in error messages, now the metavar is shown1307- if passed. In case an automated metavar is selected, it's stripped1308- of extra formatting first.1309-1310-1311-Version 3.31312------------1313-1314-Released 2014-09-081315-1316-- Fixed an issue with error reporting on Python 3 for invalid1317- forwarding of commands.1318-1319-1320-Version 3.21321------------1322-1323-Released 2014-08-221324-1325-- Added missing ``err`` parameter forwarding to the ``secho``1326- function.1327-- Fixed default parameters not being handled properly by the context1328- invoke method. This is a backwards incompatible change if the1329- function was used improperly.1330-- Removed the ``invoked_subcommands`` attribute largely. It is not1331- possible to provide it to work error free due to how the parsing1332- works so this API has been deprecated.1333-- Restored the functionality of ``invoked_subcommand`` which was1334- broken as a regression in 3.1.1335-1336-1337-Version 3.11338------------1339-1340-Released 2014-08-131341-1342-- Fixed a regression that caused contexts of subcommands to be created1343- before the parent command was invoked which was a regression from1344- earlier Click versions.1345-1346-1347-Version 3.01348------------1349-1350-Released 2014-08-12, codename "clonk clonk"1351-1352-- Formatter now no longer attempts to accommodate for terminals1353- smaller than 50 characters. If that happens it just assumes a1354- minimal width.1355-- Added a way to not swallow exceptions in the test system.1356-- Added better support for colors with pagers and ways to override the1357- autodetection.1358-- The CLI runner's result object now has a traceback attached.1359-- Improved automatic short help detection to work better with dots1360- that do not terminate sentences.1361-- When defining options without actual valid option strings now,1362- Click will give an error message instead of silently passing. This1363- should catch situations where users wanted to created arguments1364- instead of options.1365-- Restructured Click internally to support vendoring.1366-- Added support for multi command chaining.1367-- Added support for defaults on options with ``multiple`` and options1368- and arguments with ``nargs != 1``.1369-- Label passed to ``progressbar`` is no longer rendered with1370- whitespace stripped.1371-- Added a way to disable the standalone mode of the ``main`` method on1372- a Click command to be able to handle errors better.1373-- Added support for returning values from command callbacks.1374-- Added simplifications for printing to stderr from ``echo``.1375-- Added result callbacks for groups.1376-- Entering a context multiple times defers the cleanup until the last1377- exit occurs.1378-- Added ``open_file``.1379-1380-1381-Version 2.61382------------1383-1384-Released 2014-08-111385-1386-- Fixed an issue where the wrapped streams on Python 3 would be1387- reporting incorrect values for seekable.1388-1389-1390-Version 2.51391------------1392-1393-Released 2014-07-281394-1395-- Fixed a bug with text wrapping on Python 3.1396-1397-1398-Version 2.41399------------1400-1401-Released 2014-07-041402-1403-- Corrected a bug in the change of the help option in 2.3.1404-1405-1406-Version 2.31407------------1408-1409-Released 2014-07-031410-1411-- Fixed an incorrectly formatted help record for count options.1412-- Add support for ansi code stripping on Windows if colorama is not1413- available.1414-- Restored the Click 1.0 handling of the help parameter for certain1415- edge cases.1416-1417-1418-Version 2.21419------------1420-1421-Released 2014-06-261422-1423-- Fixed tty detection on PyPy.1424-- Fixed an issue that progress bars were not rendered when the context1425- manager was entered.1426-1427-1428-Version 2.11429------------1430-1431-Released 2014-06-141432-1433-- Fixed the :func:`launch` function on windows.1434-- Improved the colorama support on windows to try hard to not screw up1435- the console if the application is interrupted.1436-- Fixed windows terminals incorrectly being reported to be 801437- characters wide instead of 791438-- Use colorama win32 bindings if available to get the correct1439- dimensions of a windows terminal.1440-- Fixed an issue with custom function types on Python 3.1441-- Fixed an issue with unknown options being incorrectly reported in1442- error messages.1443-1444-1445-Version 2.01446------------1447-1448-Released 2014-06-06, codename "tap tap tap"1449-1450-- Added support for opening stdin/stdout on Windows in binary mode1451- correctly.1452-- Added support for atomic writes to files by going through a1453- temporary file.1454-- Introduced :exc:`BadParameter` which can be used to easily perform1455- custom validation with the same error messages as in the type1456- system.1457-- Added :func:`progressbar`; a function to show progress bars.1458-- Added :func:`get_app_dir`; a function to calculate the home folder1459- for configs.1460-- Added transparent handling for ANSI codes into the :func:`echo`1461- function through ``colorama``.1462-- Added :func:`clear` function.1463-- Breaking change: parameter callbacks now get the parameter object1464- passed as second argument. There is legacy support for old callbacks1465- which will warn but still execute the script.1466-- Added :func:`style`, :func:`unstyle` and :func:`secho` for ANSI1467- styles.1468-- Added an :func:`edit` function that invokes the default editor.1469-- Added an :func:`launch` function that launches browsers and1470- applications.1471-- Nargs of -1 for arguments can now be forced to be a single item1472- through the required flag. It defaults to not required.1473-- Setting a default for arguments now implicitly makes it non1474- required.1475-- Changed "yN" / "Yn" to "y/N" and "Y/n" in confirmation prompts.1476-- Added basic support for bash completion.1477-- Added :func:`getchar` to fetch a single character from the terminal.1478-- Errors now go to stderr as intended.1479-- Fixed various issues with more exotic parameter formats like1480- DOS/Windows style arguments.1481-- Added :func:`pause` which works similar to the Windows ``pause`` cmd1482- built-in but becomes an automatic noop if the application is not run1483- through a terminal.1484-- Added a bit of extra information about missing choice parameters.1485-- Changed how the help function is implemented to allow global1486- overriding of the help option.1487-- Added support for token normalization to implement case insensitive1488- handling.1489-- Added support for providing defaults for context settings.1490-1491-1492-Version 1.11493------------1494-1495-Released 2014-05-231496-1497-- Fixed a bug that caused text files in Python 2 to not accept native1498- strings.1499-1500-1501-Version 1.01502------------1503-1504-Released 2014-05-211505-1506-- Initial release.