Convert changes to markdown. (#3559)
Before adoption: this commit came in with the history the project adopted, so no landing records it.
authored by Rowlando13 · committed by GitHub · parents 832ca22, 237be50 · Browse files · 3 files·+1558 added−1507 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+1558 added−1507 removed
- other:+1558 added−1507 removed
Provenance
- Commit
8929d39- Tree
8cc348c- Author
Rowlando13 <67291205+Rowlando13@users.noreply.github.com>- Committer
GitHub <noreply@github.com>- Parent 1
832ca22- Parent 2
237be50
3 files changed+1558 added−1507 removed
modified:docs/changes.md+2 added-2 removed
1234345# Changes
```{eval-rst}.. include:: ../CHANGES.rst
```{include} ../CHANGES.md```added:CHANGES.md+1556 added
1+## Version 8.4.22+3+Unreleased4+5+- Fix Fish shell completion broken in `8.4.0` by {pr}`3126`. Newlines and6+ tabs in option help text are now escaped, keeping the original completion7+ format while still supporting multi-line help. {issue}`3502`8+ {issue}`3043` {pr}`3504` {pr}`3508`9+- Deprecated commands and options with empty or missing help text no longer10+ render a stray leading space before the `(DEPRECATED)` label. {pr}`3509`11+- A {class}`Group` with `invoke_without_command=True` marks its subcommand as12+ optional in the usage help, showing `[COMMAND]` instead of `COMMAND`.13+ {issue}`3059` {pr}`3507`14+- `echo_via_pager` flushes after each write, so passing a generator streams15+ output to the pager incrementally instead of staying hidden until the pipe16+ buffer fills. {issue}`3242` {issue}`2542` {pr}`3534`17+- `echo_via_pager` and `get_pager_file` no longer close a borrowed stdout18+ stream when no external pager runs, completing the partial19+ `I/O operation on closed file` fix from {pr}`3482`. {issue}`3449`20+ {pr}`3533`21+22+## Version 8.4.123+24+Released 2026-05-2125+26+- `get_parameter_source()` is available during eager callbacks and type27+ conversion again. {issue}`3458` {pr}`3484`28+- Zsh completion scripts parse correctly on Windows. {issue}`3277` {pr}`3466`29+- Shell completion of `Enum` values used as `Choice` options produces a30+ valid completion result. {issue}`3015` {pr}`3471`31+- Fix empty byte-string handling in echo. {issue}`3487` {pr}`3493`32+- Fix closed file error with `echo_via_pager`. {issue}`3449` {pr}`3482`33+- Fix `open_url` on Windows when the file path contains spaces.34+ {issue}`2994` {pr}`3478`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}`2868` {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-1505 removed
1-.. currentmodule:: click2-3-Version 8.4.24--------------5-6-Unreleased7-8-- Fix Fish shell completion broken in ``8.4.0`` by :pr:`3126`. Newlines and9- tabs in option help text are now escaped, keeping the original completion10- format while still supporting multi-line help. :issue:`3502`11- :issue:`3043` :pr:`3504` :pr:`3508`12-- Deprecated commands and options with empty or missing help text no longer13- render a stray leading space before the ``(DEPRECATED)`` label. :pr:`3509`14-- A :class:`Group` with ``invoke_without_command=True`` marks its subcommand as15- optional in the usage help, showing ``[COMMAND]`` instead of ``COMMAND``.16- :issue:`3059` :pr:`3507`17-- ``echo_via_pager`` flushes after each write, so passing a generator streams18- output to the pager incrementally instead of staying hidden until the pipe19- buffer fills. :issue:`3242` :issue:`2542` :pr:`3534`20-- ``echo_via_pager`` and ``get_pager_file`` no longer close a borrowed stdout21- stream when no external pager runs, completing the partial22- ``I/O operation on closed file`` fix from :pr:`3482`. :issue:`3449`23- :pr:`3533`24-25-26-Version 8.4.127--------------28-29-Released 2026-05-2130-31-- ``get_parameter_source()`` is available during eager callbacks and type32- conversion again. :issue:`3458` :pr:`3484`33-- Zsh completion scripts parse correctly on Windows. :issue:`3277` :pr:`3466`34-- Shell completion of ``Enum`` values used as ``Choice`` options produces a35- valid completion result. :issue:`3015` :pr:`3471`36-- Fix empty byte-string handling in echo. :issue:`3487` :pr:`3493`37-- Fix closed file error with ``echo_via_pager``. :issue:`3449` :pr:`3482`38-- Fix ``open_url`` on Windows when the file path contains spaces.39- :issue:`2994` :pr:`3478`40-41-42-Version 8.4.043--------------44-45-Released 2026-05-1746-47-- :class:`ParamType` typing improvements. :pr:`3371`48-49- - :class:`ParamType` is now a generic abstract base class,50- parameterized by its converted value type.51- - :meth:`~ParamType.convert` return types are narrowed on all52- concrete types (``str`` for :class:`STRING`, ``int`` for53- :class:`INT`, etc.).54- - :meth:`~ParamType.to_info_dict` returns specific55- :class:`~typing.TypedDict` subclasses instead of56- ``dict[str, Any]``.57- - :class:`CompositeParamType` and the number-range base are now58- generic with abstract methods.59-- Refactor ``convert_type`` to extract type inference into a private60- ``_guess_type`` helper, and add :func:`typing.overload` signatures.61- :pr:`3372`62-- :class:`Parameter` typing improvements. :pr:`2805`63-64- - :class:`Parameter` is now an abstract base class, making explicit65- that it cannot be instantiated directly.66- - :attr:`Parameter.name` is now ``str`` instead of ``str | None``.67- When ``expose_value=False``, the name is set to ``""`` instead68- of ``None``.69- - The ``ctx`` parameter of :meth:`Parameter.get_error_hint` is now70- typed as ``Context | None``, matching the runtime behavior.71-- Split string values from ``default_map`` for parameters with ``nargs > 1``72- or :class:`Tuple` type, matching environment variable behavior.73- :issue:`2745` :pr:`3364`74-- Auto-detect ``type=UNPROCESSED`` for ``flag_value`` of non-basic types75- (not ``str``, ``int``, ``float``, or ``bool``), so programmer-provided76- Python objects like classes and enum members are passed through unchanged77- instead of being stringified. Previously ``type=click.UNPROCESSED`` had78- to be set explicitly. :issue:`2012` :pr:`3363`79-- The error hint now uses :meth:`Command.get_help_option_names` to pick80- non-shadowed help option names, so ``Try '... -h'`` no longer points to a81- subcommand option that shadows ``-h``. The longest surviving name is82- shown (``--help`` over ``-h``) for readability. :issue:`2790` :pr:`3208`83-- Fix readline functionality on non-Windows platforms. Prompt text is now84- passed directly to readline instead of being printed separately, allowing85- proper backspace, line editing, and line wrapping behavior. :issue:`2968`86- :pr:`2969`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:`2868` :issue:`3164` :pr:`3186`90-- Fix Fish shell completion errors when option help text contains newlines.91- :issue:`3043` :pr:`3126`92-- Add :class:`NoSuchCommand` exception with suggestions for misspelled93- commands. :issue:`3107` :pr:`3228`94-- Use :class:`ValueError` message when conversion in :class:`FuncParamType` would95- fail. :issue:`3105` :pr:`3211`96-- Add ``click.get_pager_file`` for file-like access to an output97- pager. :pr:`1572` :pr:`3405`98-- :func:`~click.formatting.wrap_text` now measures line width in visible99- characters, ignoring ANSI escape sequences. :pr:`3420`100-- Fix :meth:`HelpFormatter.write_usage` emitting only a blank line when101- called without ``args``. The usage prefix and program name are now102- written even when no arguments follow, and the trailing separator103- space is stripped so the line ends at the program name.104- :issue:`3360` :pr:`3434`105-- Show custom error messages from types when :func:`prompt` with106- ``hide_input=True`` fails validation, instead of always showing a107- generic message. Built-in type messages mask the input value.108- :issue:`2809` :pr:`3256`109-- Add ``capture`` parameter to :class:`CliRunner` with two modes: ``sys``110- (default) and ``fd``. ``fd`` redirects file descriptors ``1`` and ``2``111- via :func:`os.dup2` so output that bypasses ``sys.stdout`` (stale stream112- references, C extensions, subprocesses, ``faulthandler``) is captured113- with proper isolation. :issue:`854` :issue:`2412` :issue:`2468`114- :issue:`2497` :issue:`2761` :issue:`2827` :issue:`2865` :pr:`3391`115-- Revert the ``8.3.3`` change that exposed the original file descriptor116- via ``fileno()`` on the redirected ``CliRunner`` streams in the default117- capture mode. ``os.dup2(w, sys.stdout.fileno())`` calls inside a CLI no118- longer mutate the host runner's stdout, which broke Pytest's ``fd``-level119- capture teardown. C-level consumers that need a real ``fd`` should use120- ``capture="fd"``. :issue:`3384` :pr:`3391`121-- Mark additional built-in strings with ``gettext()`` to extend translation122- coverage. :pr:`2902`123-- Fix feature switch groups (several ``flag_value`` options sharing one124- parameter name) silently dropping an explicit ``default`` when a sibling125- option without an explicit default was declared first. Arbitration is now126- source-aware: a more explicit :class:`ParameterSource` always wins, and127- within ``ParameterSource.DEFAULT``, an option that received an explicit128- ``default=`` keyword wins over a sibling whose default was auto-derived.129- The 8.3.x first-wins fallback for remaining ties was reverted to the130- pre-8.3.x last-wins fallback. :issue:`3403` :pr:`3404`131-- Fix missing space between option help text and the ``(DEPRECATED)``132- label, and localize the option label so it matches the command label.133- The label and the ``DeprecationWarning`` reason suffix are now produced134- by shared helpers. :pr:`3423`135-- Document short option stacking (``-abc`` is parsed as ``-a -b -c``) and136- clarify that multi-character short option names are not supported.137- :issue:`2779` :pr:`3431`138-139-Version 8.3.3140--------------141-142-Released 2026-04-20143-144-- Use :func:`shlex.split` to split pager and editor commands into ``argv``145- lists for :class:`subprocess.Popen`, removing ``shell=True``.146- :issue:`1026` :pr:`1477` :pr:`2775`147-- Fix ``TypeError`` when rendering help for an option whose default value is148- an object that doesn't support equality comparison with strings, such as149- ``semver.Version``. :issue:`3298` :pr:`3299`150-- Fix pager test pollution under parallel execution by using pytest's151- ``tmp_path`` fixture instead of a shared temporary file path. :pr:`3238`152-- Treat ``Sentinel.UNSET`` values in a ``default_map`` as absent, so they fall153- through to the next default source instead of being used as the value.154- :issue:`3224` :pr:`3240`155-- Patch ``pdb.Pdb`` in ``CliRunner`` isolation so ``pdb.set_trace()``,156- ``breakpoint()``, and debuggers subclassing ``pdb.Pdb`` (ipdb, pdbpp) can157- interact with the real terminal instead of the captured I/O streams.158- :issue:`654` :issue:`824` :issue:`843` :pr:`951` :pr:`3235`159-- Add optional randomized parallel test execution using ``pytest-randomly`` and160- ``pytest-xdist`` to detect test pollution and race conditions. :pr:`3151`161-- Add contributor documentation for running stress tests, randomized162- parallel tests, and Flask smoke tests. :pr:`3151` :pr:`3177`163-- Show custom ``show_default`` string in prompts, matching the existing164- help text behavior. :issue:`2836` :pr:`2837` :pr:`3165` :pr:`3262` :pr:`3280`165- :pr:`3328`166-- Fix ``default=True`` with boolean ``flag_value`` always returning the167- ``flag_value`` instead of ``True``. The ``default=True`` to ``flag_value``168- substitution now only applies to non-boolean flags, where ``True`` acts as a169- sentinel meaning "activate this flag by default". For boolean flags,170- ``default=True`` is returned as a literal value. :issue:`3111` :pr:`3239`171-- Mark ``make_default_short_help`` as private API. :issue:`3189` :pr:`3250`172-- ``CliRunner``'s redirected streams now expose the original file descriptor173- via ``fileno()``, so that ``faulthandler``, ``subprocess``, and other174- C-level consumers no longer crash with ``io.UnsupportedOperation``.175- :issue:`2865`176-- Change :class:`ParameterSource` to an :class:`~enum.IntEnum` and reorder177- its members from most to least explicit, so values can be compared to178- check whether a parameter was explicitly provided. :issue:`2879` :pr:`3248`179-180-Version 8.3.2181--------------182-183-Released 2026-04-02184-185-- Fix handling of ``flag_value`` when ``is_flag=False`` to allow such options to be186- used without an explicit value. :issue:`3084` :pr:`3152`187-- Hide ``Sentinel.UNSET`` values as ``None`` when using ``lookup_default()``.188- :issue:`3136` :pr:`3199` :pr:`3202` :pr:`3209` :pr:`3212` :pr:`3224`189-- Prevent ``_NamedTextIOWrapper`` from closing streams owned by ``StreamMixer``.190- :issue:`824` :issue:`2991` :issue:`2993` :issue:`3110` :pr:`3139` :pr:`3140`191-- Add comprehensive tests for ``CliRunner`` stream lifecycle, covering192- logging interaction, multi-threaded safety, and sequential invocation193- isolation. Add high-iteration stress tests behind a ``stress`` marker194- with a dedicated CI job. :pr:`3139`195-- Fix callable ``flag_value`` being instantiated when used as a default via196- ``default=True``. :issue:`3121` :pr:`3201` :pr:`3213` :pr:`3225`197-198-Version 8.3.1199--------------200-201-Released 2025-11-15202-203-- Don't discard pager arguments by correctly using ``subprocess.Popen``. :issue:`3039`204- :pr:`3055`205-- Replace ``Sentinel.UNSET`` default values by ``None`` as they're passed through206- the ``Context.invoke()`` method. :issue:`3066` :issue:`3065` :pr:`3068`207-- Fix conversion of ``Sentinel.UNSET`` happening too early, which caused incorrect208- behavior for multiple parameters using the same name. :issue:`3071` :pr:`3079`209-- Hide ``Sentinel.UNSET`` values as ``None`` when looking up for other parameters210- through the context inside parameter callbacks. :issue:`3136` :pr:`3137`211-- Fix rendering when ``prompt`` and ``confirm`` parameter ``prompt_suffix`` is212- empty. :issue:`3019` :pr:`3021`213-- When ``Sentinel.UNSET`` is found during parsing, it will skip calls to214- ``type_cast_value``. :issue:`3069` :pr:`3090`215-216-Version 8.3.0217---------------218-219-Released 2025-09-17220-221-- **Improved flag option handling**: Reworked the relationship between ``flag_value``222- and ``default`` parameters for better consistency:223-224- * The ``default`` parameter value is now preserved as-is and passed directly225- to CLI functions (no more unexpected transformations)226- * Exception: flag options with ``default=True`` maintain backward compatibility227- by defaulting to their ``flag_value``228- * The ``default`` parameter can now be any type (``bool``, ``None``, etc.)229- * Fixes inconsistencies reported in: :issue:`1992` :issue:`2514` :issue:`2610`230- :issue:`3024` :pr:`3030`231-- Allow ``default`` to be set on ``Argument`` for ``nargs = -1``. :issue:`2164`232- :pr:`3030`233-- Show correct auto complete value for ``nargs`` option in combination with flag234- option :issue:`2813`235-- Fix handling of quoted and escaped parameters in Fish autocompletion. :issue:`2995` :pr:`3013`236-- Lazily import ``shutil``. :pr:`3023`237-- Properly forward exception information to resources registered with238- ``click.core.Context.with_resource()``. :issue:`2447` :pr:`3058`239-- Fix regression related to EOF handling in ``CliRunner``. :issue:`2939` :pr:`2940`240-241-Version 8.2.2242--------------243-244-Released 2025-07-31245-246-- Fix reconciliation of ``default``, ``flag_value`` and ``type`` parameters for247- flag options, as well as parsing and normalization of environment variables.248- :issue:`2952` :pr:`2956`249-- Fix typing issue in ``BadParameter`` and ``MissingParameter`` exceptions for the250- parameter ``param_hint`` that did not allow for a sequence of string where the251- underlying function ``_join_param_hints`` allows for it. :issue:`2777` :pr:`2990`252-- Use the value of ``Enum`` choices to render their default value in help253- screen. Refs :issue:`2911` :pr:`3004`254-- Fix completion for the Z shell (``zsh``) for completion items containing255- colons. :issue:`2703` :pr:`2846`256-- Don't include envvar in error hint when not configured. :issue:`2971` :pr:`2972`257-- Fix a rare race in ``click.testing.StreamMixer``'s finalization that manifested258- as a ``ValueError`` on close in a multi-threaded test session.259- :issue:`2993` :pr:`2991`260-261-Version 8.2.1262--------------263-264-Released 2025-05-20265-266-- Fix flag value handling for flag options with a provided type. :issue:`2894`267- :issue:`2897` :pr:`2930`268-- Fix shell completion for nested groups. :issue:`2906` :pr:`2907`269-- Flush ``sys.stderr`` at the end of ``CliRunner.invoke``. :issue:`2682`270-- Fix EOF handling for stdin input in CliRunner. :issue:`2787`271-272-Version 8.2.0273--------------274-275-Released 2025-05-10276-277-- Drop support for Python 3.7, 3.8, and 3.9. :pr:`2588` :pr:`2893`278-- Use modern packaging metadata with ``pyproject.toml`` instead of ``setup.cfg``.279- :pr:`2438`280-- Use ``flit_core`` instead of ``setuptools`` as build backend. :pr:`2543`281-- Deprecate the ``__version__`` attribute. Use feature detection, or282- ``importlib.metadata.version("click")``, instead. :issue:`2598`283-- ``BaseCommand`` is deprecated. ``Command`` is the base class for all284- commands. :issue:`2589`285-- ``MultiCommand`` is deprecated. ``Group`` is the base class for all group286- commands. :issue:`2590`287-- The current parser and related classes and methods, are deprecated.288- :issue:`2205`289-290- - ``OptionParser`` and the ``parser`` module, which is a modified copy of291- ``optparse`` in the standard library.292- - ``Context.protected_args`` is unneeded. ``Context.args`` contains any293- remaining arguments while parsing.294- - ``Parameter.add_to_parser`` (on both ``Argument`` and ``Option``) is295- unneeded. Parsing works directly without building a separate parser.296- - ``split_arg_string`` is moved from ``parser`` to ``shell_completion``.297-298-- Enable deferred evaluation of annotations with299- ``from __future__ import annotations``. :pr:`2270`300-- When generating a command's name from a decorated function's name, the301- suffixes ``_command``, ``_cmd``, ``_group``, and ``_grp`` are removed.302- :issue:`2322`303-- Show the ``types.ParamType.name`` for ``types.Choice`` options within304- ``--help`` message if ``show_choices=False`` is specified.305- :issue:`2356`306-- Do not display default values in prompts when ``Option.show_default`` is307- ``False``. :pr:`2509`308-- Add ``get_help_extra`` method on ``Option`` to fetch the generated extra309- items used in ``get_help_record`` to render help text. :issue:`2516`310- :pr:`2517`311-- Keep stdout and stderr streams independent in ``CliRunner``. Always312- collect stderr output and never raise an exception. Add a new313- output stream to simulate what the user sees in its terminal. Removes314- the ``mix_stderr`` parameter in ``CliRunner``. :issue:`2522` :pr:`2523`315-- ``Option.show_envvar`` now also shows environment variable in error messages.316- :issue:`2695` :pr:`2696`317-- ``Context.close`` will be called on exit. This results in all318- ``Context.call_on_close`` callbacks and context managers added via319- ``Context.with_resource`` to be closed on exit as well. :pr:`2680`320-- Add ``ProgressBar(hidden: bool)`` to allow hiding the progressbar. :issue:`2609`321-- A ``UserWarning`` will be shown when multiple parameters attempt to use the322- same name. :issue:`2396`323-- When using ``Option.envvar`` with ``Option.flag_value``, the ``flag_value``324- will always be used instead of the value of the environment variable.325- :issue:`2746` :pr:`2788`326-- Add ``Choice.get_invalid_choice_message`` method for customizing the327- invalid choice message. :issue:`2621` :pr:`2622`328-- If help is shown because ``no_args_is_help`` is enabled (defaults to ``True``329- for groups, ``False`` for commands), the exit code is 2 instead of 0.330- :issue:`1489` :pr:`1489`331-- Contexts created during shell completion are closed properly, fixing332- a ``ResourceWarning`` when using ``click.File``. :issue:`2644` :pr:`2800`333- :pr:`2767`334-- ``click.edit(filename)`` now supports passing an iterable of filenames in335- case the editor supports editing multiple files at once. Its return type336- is now also typed: ``AnyStr`` if ``text`` is passed, otherwise ``None``.337- :issue:`2067` :pr:`2068`338-- Specialized typing of ``progressbar(length=...)`` as ``ProgressBar[int]``.339- :pr:`2630`340-- Improve ``echo_via_pager`` behaviour in face of errors.341- :issue:`2674`342-343- - Terminate the pager in case a generator passed to ``echo_via_pager``344- raises an exception.345- - Ensure to always close the pipe to the pager process and wait for it346- to terminate.347- - ``echo_via_pager`` will not ignore ``KeyboardInterrupt`` anymore. This348- allows the user to search for future output of the generator when349- using less and then aborting the program using ctrl-c.350-351-- ``deprecated: bool | str`` can now be used on options and arguments. This352- previously was only available for ``Command``. The message can now also be353- customised by using a ``str`` instead of a ``bool``. :issue:`2263` :pr:`2271`354-355- - ``Command.deprecated`` formatting in ``--help`` changed from356- ``(Deprecated) help`` to ``help (DEPRECATED)``.357- - Parameters cannot be required nor prompted or an error is raised.358- - A warning will be printed when something deprecated is used.359-360-- Add a ``catch_exceptions`` parameter to ``CliRunner``. If361- ``catch_exceptions`` is not passed to ``CliRunner.invoke``, the value362- from ``CliRunner`` is used. :issue:`2817` :pr:`2818`363-- ``Option.flag_value`` will no longer have a default value set based on364- ``Option.default`` if ``Option.is_flag`` is ``False``. This results in365- ``Option.default`` not needing to implement `__bool__`. :pr:`2829`366-- Incorrect ``click.edit`` typing has been corrected. :pr:`2804`367-- ``Choice`` is now generic and supports any iterable value.368- This allows you to use enums and other non-``str`` values. :pr:`2796`369- :issue:`605`370-- Fix setup of help option's defaults when using a custom class on its371- decorator. Removes ``HelpOption``. :issue:`2832` :pr:`2840`372-373-Version 8.1.8374--------------375-376-Released 2024-12-19377-378-- Fix an issue with type hints for ``click.open_file()``. :issue:`2717`379-- Fix issue where error message for invalid ``click.Path`` displays on380- multiple lines. :issue:`2697`381-- Fixed issue that prevented a default value of ``""`` from being displayed in382- the help for an option. :issue:`2500`383-- The test runner handles stripping color consistently on Windows.384- :issue:`2705`385-- Show correct value for flag default when using ``default_map``.386- :issue:`2632`387-- Fix ``click.echo(color=...)`` passing ``color`` to coloroma so it can be388- forced on Windows. :issue:`2606`.389-- More robust bash version check, fixing problem on Windows with git-bash.390- :issue:`2638`391-- Cache the help option generated by the ``help_option_names`` setting to392- respect its eagerness. :pr:`2811`393-- Replace uses of ``os.system`` with ``subprocess.Popen``. :issue:`1476`394-- Exceptions generated during a command will use the context's ``color``395- setting when being displayed. :issue:`2193`396-- Error message when defining option with invalid name is more descriptive.397- :issue:`2452`398-- Refactor code generating default ``--help`` option to deduplicate code.399- :pr:`2563`400-- Test ``CLIRunner`` resets patched ``_compat.should_strip_ansi``.401- :issue:`2732`402-403-404-Version 8.1.7405--------------406-407-Released 2023-08-17408-409-- Fix issue with regex flags in shell completion. :issue:`2581`410-- Bash version detection issues a warning instead of an error. :issue:`2574`411-- Fix issue with completion script for Fish shell. :issue:`2567`412-413-414-Version 8.1.6415--------------416-417-Released 2023-07-18418-419-- Fix an issue with type hints for ``@click.group()``. :issue:`2558`420-421-422-Version 8.1.5423--------------424-425-Released 2023-07-13426-427-- Fix an issue with type hints for ``@click.command()``, ``@click.option()``, and428- other decorators. Introduce typing tests. :issue:`2558`429-430-431-Version 8.1.4432--------------433-434-Released 2023-07-06435-436-- Replace all ``typing.Dict`` occurrences to ``typing.MutableMapping`` for437- parameter hints. :issue:`2255`438-- Improve type hinting for decorators and give all generic types parameters.439- :issue:`2398`440-- Fix return value and type signature of `shell_completion.add_completion_class`441- function. :pr:`2421`442-- Bash version detection doesn't fail on Windows. :issue:`2461`443-- Completion works if there is a dot (``.``) in the program name. :issue:`2166`444-- Improve type annotations for pyright type checker. :issue:`2268`445-- Improve responsiveness of ``click.clear()``. :issue:`2284`446-- Improve command name detection when using Shiv or PEX. :issue:`2332`447-- Avoid showing empty lines if command help text is empty. :issue:`2368`448-- ZSH completion script works when loaded from ``fpath``. :issue:`2344`.449-- ``EOFError`` and ``KeyboardInterrupt`` tracebacks are not suppressed when450- ``standalone_mode`` is disabled. :issue:`2380`451-- ``@group.command`` does not fail if the group was created with a custom452- ``command_class``. :issue:`2416`453-- ``multiple=True`` is allowed for flag options again and does not require454- setting ``default=()``. :issue:`2246, 2292, 2295`455-- Make the decorators returned by ``@argument()`` and ``@option()`` reusable when the456- ``cls`` parameter is used. :issue:`2294`457-- Don't fail when writing filenames to streams with strict errors. Replace invalid458- bytes with the replacement character (``�``). :issue:`2395`459-- Remove unnecessary attempt to detect MSYS2 environment. :issue:`2355`460-- Remove outdated and unnecessary detection of App Engine environment. :pr:`2554`461-- ``echo()`` does not fail when no streams are attached, such as with ``pythonw`` on462- Windows. :issue:`2415`463-- Argument with ``expose_value=False`` do not cause completion to fail. :issue:`2336`464-465-466-Version 8.1.3467--------------468-469-Released 2022-04-28470-471-- Use verbose form of ``typing.Callable`` for ``@command`` and472- ``@group``. :issue:`2255`473-- Show error when attempting to create an option with474- ``multiple=True, is_flag=True``. Use ``count`` instead.475- :issue:`2246`476-477-478-Version 8.1.2479--------------480-481-Released 2022-03-31482-483-- Fix error message for readable path check that was mixed up with the484- executable check. :pr:`2236`485-- Restore parameter order for ``Path``, placing the ``executable``486- parameter at the end. It is recommended to use keyword arguments487- instead of positional arguments. :issue:`2235`488-489-490-Version 8.1.1491--------------492-493-Released 2022-03-30494-495-- Fix an issue with decorator typing that caused type checking to496- report that a command was not callable. :issue:`2227`497-498-499-Version 8.1.0500--------------501-502-Released 2022-03-28503-504-- Drop support for Python 3.6. :pr:`2129`505-- Remove previously deprecated code. :pr:`2130`506-507- - ``Group.resultcallback`` is renamed to ``result_callback``.508- - ``autocompletion`` parameter to ``Command`` is renamed to509- ``shell_complete``.510- - ``get_terminal_size`` is removed, use511- ``shutil.get_terminal_size`` instead.512- - ``get_os_args`` is removed, use ``sys.argv[1:]`` instead.513-514-- Rely on :pep:`538` and :pep:`540` to handle selecting UTF-8 encoding515- instead of ASCII. Click's locale encoding detection is removed.516- :issue:`2198`517-- Single options boolean flags with ``show_default=True`` only show518- the default if it is ``True``. :issue:`1971`519-- The ``command`` and ``group`` decorators can be applied with or520- without parentheses. :issue:`1359`521-- The ``Path`` type can check whether the target is executable.522- :issue:`1961`523-- ``Command.show_default`` overrides ``Context.show_default``, instead524- of the other way around. :issue:`1963`525-- Parameter decorators and ``@group`` handles ``cls=None`` the same as526- not passing ``cls``. ``@option`` handles ``help=None`` the same as527- not passing ``help``. :issue:`#1959`528-- A flag option with ``required=True`` requires that the flag is529- passed instead of choosing the implicit default value. :issue:`1978`530-- Indentation in help text passed to ``Option`` and ``Command`` is531- cleaned the same as using the ``@option`` and ``@command``532- decorators does. A command's ``epilog`` and ``short_help`` are also533- processed. :issue:`1985`534-- Store unprocessed ``Command.help``, ``epilog`` and ``short_help``535- strings. Processing is only done when formatting help text for536- output. :issue:`2149`537-- Allow empty str input for ``prompt()`` when538- ``confirmation_prompt=True`` and ``default=""``. :issue:`2157`539-- Windows glob pattern expansion doesn't fail if a value is an invalid540- pattern. :issue:`2195`541-- It's possible to pass a list of ``params`` to ``@command``. Any542- params defined with decorators are appended to the passed params.543- :issue:`2131`.544-- ``@command`` decorator is annotated as returning the correct type if545- a ``cls`` argument is used. :issue:`2211`546-- A ``Group`` with ``invoke_without_command=True`` and ``chain=False``547- will invoke its result callback with the group function's return548- value. :issue:`2124`549-- ``to_info_dict`` will not fail if a ``ParamType`` doesn't define a550- ``name``. :issue:`2168`551-- Shell completion prioritizes option values with option prefixes over552- new options. :issue:`2040`553-- Options that get an environment variable value using554- ``autoenvvar_prefix`` treat an empty value as ``None``, consistent555- with a direct ``envvar``. :issue:`2146`556-557-558-Version 8.0.4559--------------560-561-Released 2022-02-18562-563-- ``open_file`` recognizes ``Path("-")`` as a standard stream, the564- same as the string ``"-"``. :issue:`2106`565-- The ``option`` and ``argument`` decorators preserve the type566- annotation of the decorated function. :pr:`2155`567-- A callable default value can customize its help text by overriding568- ``__str__`` instead of always showing ``(dynamic)``. :issue:`2099`569-- Fix a typo in the Bash completion script that affected file and570- directory completion. If this script was generated by a previous571- version, it should be regenerated. :issue:`2163`572-- Fix typing for ``echo`` and ``secho`` file argument.573- :issue:`2174, 2185`574-575-576-Version 8.0.3577--------------578-579-Released 2021-10-10580-581-- Fix issue with ``Path(resolve_path=True)`` type creating invalid582- paths. :issue:`2088`583-- Importing ``readline`` does not cause the ``confirm()`` prompt to584- disappear when pressing backspace. :issue:`2092`585-- Any default values injected by ``invoke()`` are cast to the586- corresponding parameter's type. :issue:`2089, 2090`587-588-589-Version 8.0.2590--------------591-592-Released 2021-10-08593-594-- ``is_bool_flag`` is not set to ``True`` if ``is_flag`` is ``False``.595- :issue:`1925`596-- Bash version detection is locale independent. :issue:`1940`597-- Empty ``default`` value is not shown for ``multiple=True``.598- :issue:`1969`599-- Fix shell completion for arguments that start with a forward slash600- such as absolute file paths. :issue:`1929`601-- ``Path`` type with ``resolve_path=True`` resolves relative symlinks602- to be relative to the containing directory. :issue:`1921`603-- Completion does not skip Python's resource cleanup when exiting,604- avoiding some unexpected warning output. :issue:`1738, 2017`605-- Fix type annotation for ``type`` argument in ``prompt`` function.606- :issue:`2062`607-- Fix overline and italic styles, which were incorrectly added when608- adding underline. :pr:`2058`609-- An option with ``count=True`` will not show "[x>=0]" in help text.610- :issue:`2072`611-- Default values are not cast to the parameter type twice during612- processing. :issue:`2085`613-- Options with ``multiple`` and ``flag_value`` use the flag value614- instead of leaving an internal placeholder. :issue:`2001`615-616-617-Version 8.0.1618--------------619-620-Released 2021-05-19621-622-- Mark top-level names as exported so type checking understand imports623- in user projects. :issue:`1879`624-- Annotate ``Context.obj`` as ``Any`` so type checking allows all625- operations on the arbitrary object. :issue:`1885`626-- Fix some types that weren't available in Python 3.6.0. :issue:`1882`627-- Fix type checking for iterating over ``ProgressBar`` object.628- :issue:`1892`629-- The ``importlib_metadata`` backport package is installed on Python <630- 3.8. :issue:`1889`631-- Arguments with ``nargs=-1`` only use env var value if no command632- line values are given. :issue:`1903`633-- Flag options guess their type from ``flag_value`` if given, like634- regular options do from ``default``. :issue:`1886`635-- Added documentation that custom parameter types may be passed636- already valid values in addition to strings. :issue:`1898`637-- Resolving commands returns the name that was given, not638- ``command.name``, fixing an unintended change to help text and639- ``default_map`` lookups. When using patterns like ``AliasedGroup``,640- override ``resolve_command`` to change the name that is returned if641- needed. :issue:`1895`642-- If a default value is invalid, it does not prevent showing help643- text. :issue:`1889`644-- Pass ``windows_expand_args=False`` when calling the main command to645- disable pattern expansion on Windows. There is no way to escape646- patterns in CMD, so if the program needs to pass them on as-is then647- expansion must be disabled. :issue:`1901`648-649-650-Version 8.0.0651--------------652-653-Released 2021-05-11654-655-- Drop support for Python 2 and 3.5.656-- Colorama is always installed on Windows in order to provide style657- and color support. :pr:`1784`658-- Adds a repr to Command, showing the command name for friendlier659- debugging. :issue:`1267`, :pr:`1295`660-- Add support for distinguishing the source of a command line661- parameter. :issue:`1264`, :pr:`1329`662-- Add an optional parameter to ``ProgressBar.update`` to set the663- ``current_item``. :issue:`1226`, :pr:`1332`664-- ``version_option`` uses ``importlib.metadata`` (or the665- ``importlib_metadata`` backport) instead of ``pkg_resources``. The666- version is detected based on the package name, not the entry point667- name. The Python package name must match the installed package668- name, or be passed with ``package_name=``. :issue:`1582`669-- If validation fails for a prompt with ``hide_input=True``, the value670- is not shown in the error message. :issue:`1460`671-- An ``IntRange`` or ``FloatRange`` option shows the accepted range in672- its help text. :issue:`1525`, :pr:`1303`673-- ``IntRange`` and ``FloatRange`` bounds can be open (``<``) instead674- of closed (``<=``) by setting ``min_open`` and ``max_open``. Error675- messages have changed to reflect this. :issue:`1100`676-- An option defined with duplicate flag names (``"--foo/--foo"``)677- raises a ``ValueError``. :issue:`1465`678-- ``echo()`` will not fail when using pytest's ``capsys`` fixture on679- Windows. :issue:`1590`680-- Resolving commands returns the canonical command name instead of the681- matched name. This makes behavior such as help text and682- ``Context.invoked_subcommand`` consistent when using patterns like683- ``AliasedGroup``. :issue:`1422`684-- The ``BOOL`` type accepts the values "on" and "off". :issue:`1629`685-- A ``Group`` with ``invoke_without_command=True`` will always invoke686- its result callback. :issue:`1178`687-- ``nargs == -1`` and ``nargs > 1`` is parsed and validated for688- values from environment variables and defaults. :issue:`729`689-- Detect the program name when executing a module or package with690- ``python -m name``. :issue:`1603`691-- Include required parent arguments in help synopsis of subcommands.692- :issue:`1475`693-- Help for boolean flags with ``show_default=True`` shows the flag694- name instead of ``True`` or ``False``. :issue:`1538`695-- Non-string objects passed to ``style()`` and ``secho()`` will be696- converted to string. :pr:`1146`697-- ``edit(require_save=True)`` will detect saves for editors that exit698- very fast on filesystems with 1 second resolution. :pr:`1050`699-- New class attributes make it easier to use custom core objects700- throughout an entire application. :pr:`938`701-702- - ``Command.context_class`` controls the context created when703- running the command.704- - ``Context.invoke`` creates new contexts of the same type, so a705- custom type will persist to invoked subcommands.706- - ``Context.formatter_class`` controls the formatter used to707- generate help and usage.708- - ``Group.command_class`` changes the default type for709- subcommands with ``@group.command()``.710- - ``Group.group_class`` changes the default type for subgroups711- with ``@group.group()``. Setting it to ``type`` will create712- subgroups of the same type as the group itself.713- - Core objects use ``super()`` consistently for better support of714- subclassing.715-716-- Use ``Context.with_resource()`` to manage resources that would717- normally be used in a ``with`` statement, allowing them to be used718- across subcommands and callbacks, then cleaned up when the context719- ends. :pr:`1191`720-- The result object returned by the test runner's ``invoke()`` method721- has a ``return_value`` attribute with the value returned by the722- invoked command. :pr:`1312`723-- Required arguments with the ``Choice`` type show the choices in724- curly braces to indicate that one is required (``{a|b|c}``).725- :issue:`1272`726-- If only a name is passed to ``option()``, Click suggests renaming it727- to ``--name``. :pr:`1355`728-- A context's ``show_default`` parameter defaults to the value from729- the parent context. :issue:`1565`730-- ``click.style()`` can output 256 and RGB color codes. Most modern731- terminals support these codes. :pr:`1429`732-- When using ``CliRunner.invoke()``, the replaced ``stdin`` file has733- ``name`` and ``mode`` attributes. This lets ``File`` options with734- the ``-`` value match non-testing behavior. :issue:`1064`735-- When creating a ``Group``, allow passing a list of commands instead736- of a dict. :issue:`1339`737-- When a long option name isn't valid, use ``difflib`` to make better738- suggestions for possible corrections. :issue:`1446`739-- Core objects have a ``to_info_dict()`` method. This gathers740- information about the object's structure that could be useful for a741- tool generating user-facing documentation. To get the structure of742- an entire CLI, use ``Context(cli).to_info_dict()``. :issue:`461`743-- Redesign the shell completion system. :issue:`1484`, :pr:`1622`744-745- - Support Bash >= 4.4, Zsh, and Fish, with the ability for746- extensions to add support for other shells.747- - Allow commands, groups, parameters, and types to override their748- completions suggestions.749- - Groups complete the names commands were registered with, which750- can differ from the name they were created with.751- - The ``autocompletion`` parameter for options and arguments is752- renamed to ``shell_complete``. The function must take753- ``ctx, param, incomplete``, must do matching rather than return754- all values, and must return a list of strings or a list of755- ``CompletionItem``. The old name and behavior is deprecated and756- will be removed in 8.1.757- - The env var values used to start completion have changed order.758- The shell now comes first, such as ``{shell}_source`` rather759- than ``source_{shell}``, and is always required.760-761-- Completion correctly parses command line strings with incomplete762- quoting or escape sequences. :issue:`1708`763-- Extra context settings (``obj=...``, etc.) are passed on to the764- completion system. :issue:`942`765-- Include ``--help`` option in completion. :pr:`1504`766-- ``ParameterSource`` is an ``enum.Enum`` subclass. :issue:`1530`767-- Boolean and UUID types strip surrounding space before converting.768- :issue:`1605`769-- Adjusted error message from parameter type validation to be more770- consistent. Quotes are used to distinguish the invalid value.771- :issue:`1605`772-- The default value for a parameter with ``nargs`` > 1 and773- ``multiple=True`` must be a list of tuples. :issue:`1649`774-- When getting the value for a parameter, the default is tried in the775- same section as other sources to ensure consistent processing.776- :issue:`1649`777-- All parameter types accept a value that is already the correct type.778- :issue:`1649`779-- For shell completion, an argument is considered incomplete if its780- value did not come from the command line args. :issue:`1649`781-- Added ``ParameterSource.PROMPT`` to track parameter values that were782- prompted for. :issue:`1649`783-- Options with ``nargs`` > 1 no longer raise an error if a default is784- not given. Parameters with ``nargs`` > 1 default to ``None``, and785- parameters with ``multiple=True`` or ``nargs=-1`` default to an786- empty tuple. :issue:`472`787-- Handle empty env vars as though the option were not passed. This788- extends the change introduced in 7.1 to be consistent in more cases.789- :issue:`1285`790-- ``Parameter.get_default()`` checks ``Context.default_map`` to791- handle overrides consistently in help text, ``invoke()``, and792- prompts. :issue:`1548`793-- Add ``prompt_required`` param to ``Option``. When set to ``False``,794- the user will only be prompted for an input if no value was passed.795- :issue:`736`796-- Providing the value to an option can be made optional through797- ``is_flag=False``, and the value can instead be prompted for or798- passed in as a default value.799- :issue:`549, 736, 764, 921, 1015, 1618`800-- Fix formatting when ``Command.options_metavar`` is empty. :pr:`1551`801-- Revert adding space between option help text that wraps.802- :issue:`1831`803-- The default value passed to ``prompt`` will be cast to the correct804- type like an input value would be. :pr:`1517`805-- Automatically generated short help messages will stop at the first806- ending of a phrase or double linebreak. :issue:`1082`807-- Skip progress bar render steps for efficiency with very fast808- iterators by setting ``update_min_steps``. :issue:`676`809-- Respect ``case_sensitive=False`` when doing shell completion for810- ``Choice`` :issue:`1692`811-- Use ``mkstemp()`` instead of ``mktemp()`` in pager implementation.812- :issue:`1752`813-- If ``Option.show_default`` is a string, it is displayed even if814- ``default`` is ``None``. :issue:`1732`815-- ``click.get_terminal_size()`` is deprecated and will be removed in816- 8.1. Use :func:`shutil.get_terminal_size` instead. :issue:`1736`817-- Control the location of the temporary directory created by818- ``CLIRunner.isolated_filesystem`` by passing ``temp_dir``. A custom819- directory will not be removed automatically. :issue:`395`820-- ``click.confirm()`` will prompt until input is given if called with821- ``default=None``. :issue:`1381`822-- Option prompts validate the value with the option's callback in823- addition to its type. :issue:`457`824-- ``confirmation_prompt`` can be set to a custom string. :issue:`723`825-- Allow styled output in Jupyter on Windows. :issue:`1271`826-- ``style()`` supports the ``strikethrough``, ``italic``, and827- ``overline`` styles. :issue:`805, 1821`828-- Multiline marker is removed from short help text. :issue:`1597`829-- Restore progress bar behavior of echoing only the label if the file830- is not a TTY. :issue:`1138`831-- Progress bar output is shown even if execution time is less than 0.5832- seconds. :issue:`1648`833-- Progress bar ``item_show_func`` shows the current item, not the834- previous item. :issue:`1353`835-- The ``Path`` param type can be passed ``path_type=pathlib.Path`` to836- return a path object instead of a string. :issue:`405`837-- ``TypeError`` is raised when parameter with ``multiple=True`` or838- ``nargs > 1`` has non-iterable default. :issue:`1749`839-- Add a ``pass_meta_key`` decorator for passing a key from840- ``Context.meta``. This is useful for extensions using ``meta`` to841- store information. :issue:`1739`842-- ``Path`` ``resolve_path`` resolves symlinks on Windows Python < 3.8.843- :issue:`1813`844-- Command deprecation notice appears at the start of the help text, as845- well as in the short help. The notice is not in all caps.846- :issue:`1791`847-- When taking arguments from ``sys.argv`` on Windows, glob patterns,848- user dir, and env vars are expanded. :issue:`1096`849-- Marked messages shown by the CLI with ``gettext()`` to allow850- applications to translate Click's built-in strings. :issue:`303`851-- Writing invalid characters to ``stderr`` when using the test runner852- does not raise a ``UnicodeEncodeError``. :issue:`848`853-- Fix an issue where ``readline`` would clear the entire ``prompt()``854- line instead of only the input when pressing backspace. :issue:`665`855-- Add all kwargs passed to ``Context.invoke()`` to ``ctx.params``.856- Fixes an inconsistency when nesting ``Context.forward()`` calls.857- :issue:`1568`858-- The ``MultiCommand.resultcallback`` decorator is renamed to859- ``result_callback``. The old name is deprecated. :issue:`1160`860-- Fix issues with ``CliRunner`` output when using ``echo_stdin=True``.861- :issue:`1101`862-- Fix a bug of ``click.utils.make_default_short_help`` for which the863- returned string could be as long as ``max_width + 3``. :issue:`1849`864-- When defining a parameter, ``default`` is validated with865- ``multiple`` and ``nargs``. More validation is done for values being866- processed as well. :issue:`1806`867-- ``HelpFormatter.write_text`` uses the full line width when wrapping868- text. :issue:`1871`869-870-871-Version 7.1.2872--------------873-874-Released 2020-04-27875-876-- Revert applying shell quoting to commands for ``echo_with_pager``877- and ``edit``. This was intended to allows spaces in commands, but878- caused issues if the string was actually a command and arguments, or879- on Windows. Instead, the string must be quoted manually as it should880- appear on the command line. :issue:`1514`881-882-883-Version 7.1.1884--------------885-886-Released 2020-03-09887-888-- Fix ``ClickException`` output going to stdout instead of stderr.889- :issue:`1495`890-891-892-Version 7.1893------------894-895-Released 2020-03-09896-897-- Fix PyPI package name, "click" is lowercase again.898-- Fix link in ``unicode_literals`` error message. :pr:`1151`899-- Add support for colored output on UNIX Jupyter notebooks.900- :issue:`1185`901-- Operations that strip ANSI controls will strip the cursor hide/show902- sequences. :issue:`1216`903-- Remove unused compat shim for ``bytes``. :pr:`1195`904-- Expand testing around termui, especially getchar on Windows.905- :issue:`1116`906-- Fix output on Windows Python 2.7 built with MSVC 14. :pr:`1342`907-- Fix ``OSError`` when running in MSYS2. :issue:`1338`908-- Fix ``OSError`` when redirecting to ``NUL`` stream on Windows.909- :issue:`1065`910-- Fix memory leak when parsing Unicode arguments on Windows.911- :issue:`1136`912-- Fix error in new AppEngine environments. :issue:`1462`913-- Always return one of the passed choices for ``click.Choice``914- :issue:`1277`, :pr:`1318`915-- Add ``no_args_is_help`` option to ``click.Command``, defaults to916- False :pr:`1167`917-- Add ``show_default`` parameter to ``Context`` to enable showing918- defaults globally. :issue:`1018`919-- Handle ``env MYPATH=''`` as though the option were not passed.920- :issue:`1196`921-- It is once again possible to call ``next(bar)`` on an active922- progress bar instance. :issue:`1125`923-- ``open_file`` with ``atomic=True`` retains permissions of existing924- files and respects the current umask for new files. :issue:`1376`925-- When using the test ``CliRunner`` with ``mix_stderr=False``, if926- ``result.stderr`` is empty it will not raise a ``ValueError``.927- :issue:`1193`928-- Remove the unused ``mix_stderr`` parameter from929- ``CliRunner.invoke``. :issue:`1435`930-- Fix ``TypeError`` raised when using bool flags and specifying931- ``type=bool``. :issue:`1287`932-- Newlines in option help text are replaced with spaces before933- re-wrapping to avoid uneven line breaks. :issue:`834`934-- ``MissingParameter`` exceptions are printable in the Python935- interpreter. :issue:`1139`936-- Fix how default values for file-type options are shown during937- prompts. :issue:`914`938-- Fix environment variable automatic generation for commands939- containing ``-``. :issue:`1253`940-- Option help text replaces newlines with spaces when rewrapping, but941- preserves paragraph breaks, fixing multiline formatting.942- :issue:`834, 1066, 1397`943-- Option help text that is wrapped adds an extra newline at the end to944- distinguish it from the next option. :issue:`1075`945-- Consider ``sensible-editor`` when determining the editor to use for946- ``click.edit()``. :pr:`1469`947-- Arguments to system calls such as the executable path passed to948- ``click.edit`` can contains spaces. :pr:`1470`949-- Add ZSH completion autoloading and error handling. :issue:`1348`950-- Add a repr to ``Command``, ``Group``, ``Option``, and ``Argument``,951- showing the name for friendlier debugging. :issue:`1267`952-- Completion doesn't consider option names if a value starts with953- ``-`` after the ``--`` separator. :issue:`1247`954-- ZSH completion escapes special characters in values. :pr:`1418`955-- Add completion support for Fish shell. :pr:`1423`956-- Decoding bytes option values falls back to UTF-8 in more cases.957- :pr:`1468`958-- Make the warning about old 2-arg parameter callbacks a deprecation959- warning, to be removed in 8.0. This has been a warning since Click960- 2.0. :pr:`1492`961-- Adjust error messages to standardize the types of quotes used so962- they match error messages from Python.963-964-965-Version 7.0966------------967-968-Released 2018-09-25969-970-- Drop support for Python 2.6 and 3.3. :pr:`967, 976`971-- Wrap ``click.Choice``'s missing message. :issue:`202`, :pr:`1000`972-- Add native ZSH autocompletion support. :issue:`323`, :pr:`865`973-- Document that ANSI color info isn't parsed from bytearrays in Python974- 2. :issue:`334`975-- Document byte-stripping behavior of ``CliRunner``. :issue:`334`,976- :pr:`1010`977-- Usage errors now hint at the ``--help`` option. :issue:`393`,978- :pr:`557`979-- Implement streaming pager. :issue:`409`, :pr:`889`980-- Extract bar formatting to its own method. :pr:`414`981-- Add ``DateTime`` type for converting input in given date time982- formats. :pr:`423`983-- ``secho``'s first argument can now be ``None``, like in ``echo``.984- :pr:`424`985-- Fixes a ``ZeroDivisionError`` in ``ProgressBar.make_step``, when the986- arg passed to the first call of ``ProgressBar.update`` is 0.987- :issue:`447`, :pr:`1012`988-- Show progressbar only if total execution time is visible. :pr:`487`989-- Added the ability to hide commands and options from help. :pr:`500`990-- Document that options can be ``required=True``. :issue:`514`,991- :pr:`1022`992-- Non-standalone calls to ``Context.exit`` return the exit code,993- rather than calling ``sys.exit``. :issue:`667`, :pr:`533, 1098`994-- ``click.getchar()`` returns Unicode in Python 3 on Windows,995- consistent with other platforms. :issue:`537, 821, 822, 1088`,996- :pr:`1108`997-- Added ``FloatRange`` type. :pr:`538, 553`998-- Added support for bash completion of ``type=click.Choice`` for999- ``Options`` and ``Arguments``. :issue:`535`, :pr:`681`1000-- Only allow one positional arg for ``Argument`` parameter1001- declaration. :issue:`568, 574`, :pr:`1014`1002-- Add ``case_sensitive=False`` as an option to Choice. :issue:`569`1003-- ``click.getchar()`` correctly raises ``KeyboardInterrupt`` on "^C"1004- and ``EOFError`` on "^D" on Linux. :issue:`583`, :pr:`1115`1005-- Fix encoding issue with ``click.getchar(echo=True)`` on Linux.1006- :pr:`1115`1007-- ``param_hint`` in errors now derived from param itself.1008- :issue:`598, 704`, :pr:`709`1009-- Add a test that ensures that when an argument is formatted into a1010- usage error, its metavar is used, not its name. :pr:`612`1011-- Allow setting ``prog_name`` as extra in ``CliRunner.invoke``.1012- :issue:`616`, :pr:`999`1013-- Help text taken from docstrings truncates at the ``\f`` form feed1014- character, useful for hiding Sphinx-style parameter documentation.1015- :pr:`629, 1091`1016-- ``launch`` now works properly under Cygwin. :pr:`650`1017-- Update progress after iteration. :issue:`651`, :pr:`706`1018-- ``CliRunner.invoke`` now may receive ``args`` as a string1019- representing a Unix shell command. :pr:`664`1020-- Make ``Argument.make_metavar()`` default to type metavar. :pr:`675`1021-- Add documentation for ``ignore_unknown_options``. :pr:`684`1022-- Add bright colors support for ``click.style`` and fix the reset1023- option for parameters ``fg`` and ``bg``. :issue:`703`, :pr:`809`1024-- Add ``show_envvar`` for showing environment variables in help.1025- :pr:`710`1026-- Avoid ``BrokenPipeError`` during interpreter shutdown when stdout or1027- stderr is a closed pipe. :issue:`712`, :pr:`1106`1028-- Document customizing option names. :issue:`725`, :pr:`1016`1029-- Disable ``sys._getframes()`` on Python interpreters that don't1030- support it. :pr:`728`1031-- Fix bug in test runner when calling ``sys.exit`` with ``None``.1032- :pr:`739`1033-- Clarify documentation on command line options. :issue:`741`,1034- :pr:`1003`1035-- Fix crash on Windows console. :issue:`744`1036-- Fix bug that caused bash completion to give improper completions on1037- chained commands. :issue:`754`, :pr:`774`1038-- Added support for dynamic bash completion from a user-supplied1039- callback. :pr:`755`1040-- Added support for bash completions containing spaces. :pr:`773`1041-- Allow autocompletion function to determine whether or not to return1042- completions that start with the incomplete argument. :issue:`790`,1043- :pr:`806`1044-- Fix option naming routine to match documentation and be1045- deterministic. :issue:`793`, :pr:`794`1046-- Fix path validation bug. :issue:`795`, :pr:`1020`1047-- Add test and documentation for ``Option`` naming: functionality.1048- :pr:`799`1049-- Update doc to match arg name for ``path_type``. :pr:`801`1050-- Raw strings added so correct escaping occurs. :pr:`807`1051-- Fix 16k character limit of ``click.echo`` on Windows. :issue:`816`,1052- :pr:`819`1053-- Overcome 64k character limit when writing to binary stream on1054- Windows 7. :issue:`825`, :pr:`830`1055-- Add bool conversion for "t" and "f". :pr:`842`1056-- ``NoSuchOption`` errors take ``ctx`` so that ``--help`` hint gets1057- printed in error output. :pr:`860`1058-- Fixed the behavior of Click error messages with regards to Unicode1059- on 2.x and 3.x. Message is now always Unicode and the str and1060- Unicode special methods work as you expect on that platform.1061- :issue:`862`1062-- Progress bar now uses stderr by default. :pr:`863`1063-- Add support for auto-completion documentation. :issue:`866`,1064- :pr:`869`1065-- Allow ``CliRunner`` to separate stdout and stderr. :pr:`868`1066-- Fix variable precedence. :issue:`873`, :pr:`874`1067-- Fix invalid escape sequences. :pr:`877`1068-- Fix ``ResourceWarning`` that occurs during some tests. :pr:`878`1069-- When detecting a misconfigured locale, don't fail if the ``locale``1070- command fails. :pr:`880`1071-- Add ``case_sensitive=False`` as an option to ``Choice`` types.1072- :pr:`887`1073-- Force stdout/stderr writable. This works around issues with badly1074- patched standard streams like those from Jupyter. :pr:`918`1075-- Fix completion of subcommand options after last argument1076- :issue:`919`, :pr:`930`1077-- ``_AtomicFile`` now uses the ``realpath`` of the original filename1078- so that changing the working directory does not affect it. :pr:`920`1079-- Fix incorrect completions when defaults are present :issue:`925`,1080- :pr:`930`1081-- Add copy option attrs so that custom classes can be reused.1082- :issue:`926`, :pr:`994`1083-- "x" and "a" file modes now use stdout when file is ``"-"``.1084- :pr:`929`1085-- Fix missing comma in ``__all__`` list. :pr:`935`1086-- Clarify how parameters are named. :issue:`949`, :pr:`1009`1087-- Stdout is now automatically set to non blocking. :pr:`954`1088-- Do not set options twice. :pr:`962`1089-- Move ``fcntl`` import. :pr:`965`1090-- Fix Google App Engine ``ImportError``. :pr:`995`1091-- Better handling of help text for dynamic default option values.1092- :pr:`996`1093-- Fix ``get_winter_size()`` so it correctly returns ``(0,0)``.1094- :pr:`997`1095-- Add test case checking for custom param type. :pr:`1001`1096-- Allow short width to address cmd formatting. :pr:`1002`1097-- Add details about Python version support. :pr:`1004`1098-- Added deprecation flag to commands. :pr:`1005`1099-- Fixed issues where ``fd`` was undefined. :pr:`1007`1100-- Fix formatting for short help. :pr:`1008`1101-- Document how ``auto_envvar_prefix`` works with command groups.1102- :pr:`1011`1103-- Don't add newlines by default for progress bars. :pr:`1013`1104-- Use Python sorting order for ZSH completions. :issue:`1047`,1105- :pr:`1059`1106-- Document that parameter names are converted to lowercase by default.1107- :pr:`1055`1108-- Subcommands that are named by the function now automatically have1109- the underscore replaced with a dash. If you register a function1110- named ``my_command`` it becomes ``my-command`` in the command line1111- interface.1112-- Hide hidden commands and options from completion. :issue:`1058`,1113- :pr:`1061`1114-- Fix absolute import blocking Click from being vendored into a1115- project on Windows. :issue:`1068`, :pr:`1069`1116-- Fix issue where a lowercase ``auto_envvar_prefix`` would not be1117- converted to uppercase. :pr:`1105`1118-1119-1120-Version 6.71121------------1122-1123-Released 2017-01-061124-1125-- Make ``click.progressbar`` work with ``codecs.open`` files.1126- :pr:`637`1127-- Fix bug in bash completion with nested subcommands. :pr:`639`1128-- Fix test runner not saving caller env correctly. :pr:`644`1129-- Fix handling of SIGPIPE. :pr:`62`1130-- Deal with broken Windows environments such as Google App Engine's.1131- :issue:`711`1132-1133-1134-Version 6.61135------------1136-1137-Released 2016-04-041138-1139-- Fix bug in ``click.Path`` where it would crash when passed a ``-``.1140- :issue:`551`1141-1142-1143-Version 6.41144------------1145-1146-Released 2016-03-241147-1148-- Fix bug in bash completion where click would discard one or more1149- trailing arguments. :issue:`471`1150-1151-1152-Version 6.31153------------1154-1155-Released 2016-02-221156-1157-- Fix argument checks for interpreter invoke with ``-m`` and ``-c`` on1158- Windows.1159-- Fixed a bug that cased locale detection to error out on Python 3.1160-1161-1162-Version 6.21163------------1164-1165-Released 2015-11-271166-1167-- Correct fix for hidden progress bars.1168-1169-1170-Version 6.11171------------1172-1173-Released 2015-11-271174-1175-- Resolved an issue with invisible progress bars no longer rendering.1176-- Disable chain commands with subcommands as they were inherently1177- broken.1178-- Fix ``MissingParameter`` not working without parameters passed.1179-1180-1181-Version 6.01182------------1183-1184-Released 2015-11-24, codename "pow pow"1185-1186-- Optimized the progressbar rendering to not render when it did not1187- actually change.1188-- Explicitly disallow ``nargs=-1`` with a set default.1189-- The context is now closed before it's popped from the stack.1190-- Added support for short aliases for the false flag on toggles.1191-- Click will now attempt to aid you with debugging locale errors1192- better by listing with the help of the OS what locales are1193- available.1194-- Click used to return byte strings on Python 2 in some unit-testing1195- situations. This has been fixed to correctly return unicode strings1196- now.1197-- For Windows users on Python 2, Click will now handle Unicode more1198- correctly handle Unicode coming in from the system. This also has1199- the disappointing side effect that filenames will now be always1200- unicode by default in the ``Path`` type which means that this can1201- introduce small bugs for code not aware of this.1202-- Added a ``type`` parameter to ``Path`` to force a specific string1203- type on the value.1204-- For users running Python on Windows the ``echo`` and ``prompt``1205- functions now work with full unicode functionality in the Python1206- windows console by emulating an output stream. This also applies to1207- getting the virtual output and input streams via1208- ``click.get_text_stream(...)``.1209-- Unittests now always force a certain virtual terminal width.1210-- Added support for allowing dashes to indicate standard streams to1211- the ``Path`` type.1212-- Multi commands in chain mode no longer propagate arguments left over1213- from parsing to the callbacks. It's also now disallowed through an1214- exception when optional arguments are attached to multi commands if1215- chain mode is enabled.1216-- Relaxed restriction that disallowed chained commands to have other1217- chained commands as child commands.1218-- Arguments with positive nargs can now have defaults implemented.1219- Previously this configuration would often result in slightly1220- unexpected values be returned.1221-1222-1223-Version 5.11224------------1225-1226-Released 2015-08-171227-1228-- Fix a bug in ``pass_obj`` that would accidentally pass the context1229- too.1230-1231-1232-Version 5.01233------------1234-1235-Released 2015-08-16, codename "tok tok"1236-1237-- Removed various deprecated functionality.1238-- Atomic files now only accept the ``w`` mode.1239-- Change the usage part of help output for very long commands to wrap1240- their arguments onto the next line, indented by 4 spaces.1241-- Fix a bug where return code and error messages were incorrect when1242- using ``CliRunner``.1243-- Added ``get_current_context``.1244-- Added a ``meta`` dictionary to the context which is shared across1245- the linked list of contexts to allow click utilities to place state1246- there.1247-- Introduced ``Context.scope``.1248-- The ``echo`` function is now threadsafe: It calls the ``write``1249- method of the underlying object only once.1250-- ``prompt(hide_input=True)`` now prints a newline on ``^C``.1251-- Click will now warn if users are using ``unicode_literals``.1252-- Click will now ignore the ``PAGER`` environment variable if it is1253- empty or contains only whitespace.1254-- The ``click-contrib`` GitHub organization was created.1255-1256-1257-Version 4.11258------------1259-1260-Released 2015-07-141261-1262-- Fix a bug where error messages would include a trailing ``None``1263- string.1264-- Fix a bug where Click would crash on docstrings with trailing1265- newlines.1266-- Support streams with encoding set to ``None`` on Python 3 by barfing1267- with a better error.1268-- Handle ^C in less-pager properly.1269-- Handle return value of ``None`` from ``sys.getfilesystemencoding``1270-- Fix crash when writing to unicode files with ``click.echo``.1271-- Fix type inference with multiple options.1272-1273-1274-Version 4.01275------------1276-1277-Released 2015-03-31, codename "zoom zoom"1278-1279-- Added ``color`` parameters to lots of interfaces that directly or1280- indirectly call into echoing. This previously was always1281- autodetection (with the exception of the ``echo_via_pager``1282- function). Now you can forcefully enable or disable it, overriding1283- the auto detection of Click.1284-- Added an ``UNPROCESSED`` type which does not perform any type1285- changes which simplifies text handling on 2.x / 3.x in some special1286- advanced usecases.1287-- Added ``NoSuchOption`` and ``BadOptionUsage`` exceptions for more1288- generic handling of errors.1289-- Added support for handling of unprocessed options which can be1290- useful in situations where arguments are forwarded to underlying1291- tools.1292-- Added ``max_content_width`` parameter to the context which can be1293- used to change the maximum width of help output. By default Click1294- will not format content for more than 80 characters width.1295-- Added support for writing prompts to stderr.1296-- Fix a bug when showing the default for multiple arguments.1297-- Added support for custom subclasses to ``option`` and ``argument``.1298-- Fix bug in ``clear()`` on Windows when colorama is installed.1299-- Reject ``nargs=-1`` for options properly. Options cannot be1300- variadic.1301-- Fixed an issue with bash completion not working properly for1302- commands with non ASCII characters or dashes.1303-- Added a way to manually update the progressbar.1304-- Changed the formatting of missing arguments. Previously the internal1305- argument name was shown in error messages, now the metavar is shown1306- if passed. In case an automated metavar is selected, it's stripped1307- of extra formatting first.1308-1309-1310-Version 3.31311------------1312-1313-Released 2014-09-081314-1315-- Fixed an issue with error reporting on Python 3 for invalid1316- forwarding of commands.1317-1318-1319-Version 3.21320------------1321-1322-Released 2014-08-221323-1324-- Added missing ``err`` parameter forwarding to the ``secho``1325- function.1326-- Fixed default parameters not being handled properly by the context1327- invoke method. This is a backwards incompatible change if the1328- function was used improperly.1329-- Removed the ``invoked_subcommands`` attribute largely. It is not1330- possible to provide it to work error free due to how the parsing1331- works so this API has been deprecated.1332-- Restored the functionality of ``invoked_subcommand`` which was1333- broken as a regression in 3.1.1334-1335-1336-Version 3.11337------------1338-1339-Released 2014-08-131340-1341-- Fixed a regression that caused contexts of subcommands to be created1342- before the parent command was invoked which was a regression from1343- earlier Click versions.1344-1345-1346-Version 3.01347------------1348-1349-Released 2014-08-12, codename "clonk clonk"1350-1351-- Formatter now no longer attempts to accommodate for terminals1352- smaller than 50 characters. If that happens it just assumes a1353- minimal width.1354-- Added a way to not swallow exceptions in the test system.1355-- Added better support for colors with pagers and ways to override the1356- autodetection.1357-- The CLI runner's result object now has a traceback attached.1358-- Improved automatic short help detection to work better with dots1359- that do not terminate sentences.1360-- When defining options without actual valid option strings now,1361- Click will give an error message instead of silently passing. This1362- should catch situations where users wanted to created arguments1363- instead of options.1364-- Restructured Click internally to support vendoring.1365-- Added support for multi command chaining.1366-- Added support for defaults on options with ``multiple`` and options1367- and arguments with ``nargs != 1``.1368-- Label passed to ``progressbar`` is no longer rendered with1369- whitespace stripped.1370-- Added a way to disable the standalone mode of the ``main`` method on1371- a Click command to be able to handle errors better.1372-- Added support for returning values from command callbacks.1373-- Added simplifications for printing to stderr from ``echo``.1374-- Added result callbacks for groups.1375-- Entering a context multiple times defers the cleanup until the last1376- exit occurs.1377-- Added ``open_file``.1378-1379-1380-Version 2.61381------------1382-1383-Released 2014-08-111384-1385-- Fixed an issue where the wrapped streams on Python 3 would be1386- reporting incorrect values for seekable.1387-1388-1389-Version 2.51390------------1391-1392-Released 2014-07-281393-1394-- Fixed a bug with text wrapping on Python 3.1395-1396-1397-Version 2.41398------------1399-1400-Released 2014-07-041401-1402-- Corrected a bug in the change of the help option in 2.3.1403-1404-1405-Version 2.31406------------1407-1408-Released 2014-07-031409-1410-- Fixed an incorrectly formatted help record for count options.1411-- Add support for ansi code stripping on Windows if colorama is not1412- available.1413-- Restored the Click 1.0 handling of the help parameter for certain1414- edge cases.1415-1416-1417-Version 2.21418------------1419-1420-Released 2014-06-261421-1422-- Fixed tty detection on PyPy.1423-- Fixed an issue that progress bars were not rendered when the context1424- manager was entered.1425-1426-1427-Version 2.11428------------1429-1430-Released 2014-06-141431-1432-- Fixed the :func:`launch` function on windows.1433-- Improved the colorama support on windows to try hard to not screw up1434- the console if the application is interrupted.1435-- Fixed windows terminals incorrectly being reported to be 801436- characters wide instead of 791437-- Use colorama win32 bindings if available to get the correct1438- dimensions of a windows terminal.1439-- Fixed an issue with custom function types on Python 3.1440-- Fixed an issue with unknown options being incorrectly reported in1441- error messages.1442-1443-1444-Version 2.01445------------1446-1447-Released 2014-06-06, codename "tap tap tap"1448-1449-- Added support for opening stdin/stdout on Windows in binary mode1450- correctly.1451-- Added support for atomic writes to files by going through a1452- temporary file.1453-- Introduced :exc:`BadParameter` which can be used to easily perform1454- custom validation with the same error messages as in the type1455- system.1456-- Added :func:`progressbar`; a function to show progress bars.1457-- Added :func:`get_app_dir`; a function to calculate the home folder1458- for configs.1459-- Added transparent handling for ANSI codes into the :func:`echo`1460- function through ``colorama``.1461-- Added :func:`clear` function.1462-- Breaking change: parameter callbacks now get the parameter object1463- passed as second argument. There is legacy support for old callbacks1464- which will warn but still execute the script.1465-- Added :func:`style`, :func:`unstyle` and :func:`secho` for ANSI1466- styles.1467-- Added an :func:`edit` function that invokes the default editor.1468-- Added an :func:`launch` function that launches browsers and1469- applications.1470-- Nargs of -1 for arguments can now be forced to be a single item1471- through the required flag. It defaults to not required.1472-- Setting a default for arguments now implicitly makes it non1473- required.1474-- Changed "yN" / "Yn" to "y/N" and "Y/n" in confirmation prompts.1475-- Added basic support for bash completion.1476-- Added :func:`getchar` to fetch a single character from the terminal.1477-- Errors now go to stderr as intended.1478-- Fixed various issues with more exotic parameter formats like1479- DOS/Windows style arguments.1480-- Added :func:`pause` which works similar to the Windows ``pause`` cmd1481- built-in but becomes an automatic noop if the application is not run1482- through a terminal.1483-- Added a bit of extra information about missing choice parameters.1484-- Changed how the help function is implemented to allow global1485- overriding of the help option.1486-- Added support for token normalization to implement case insensitive1487- handling.1488-- Added support for providing defaults for context settings.1489-1490-1491-Version 1.11492------------1493-1494-Released 2014-05-231495-1496-- Fixed a bug that caused text files in Python 2 to not accept native1497- strings.1498-1499-1500-Version 1.01501------------1502-1503-Released 2014-05-211504-1505-- Initial release.