Move changes headings down a level.
Before adoption: this commit came in with the history the project adopted, so no landing records it.
authored by Edward G · committed by Edward G · parent a0232a8 · Browse files · 1 file·+1556 added−0 removed
This commit
State
Before adoption: this commit came in with the history the project adopted, so no landing records it.
Diff stats
1 file+1556 added−0 removed
- other:+1556 added−0 removed
Provenance
- Commit
237be50- Tree
8cc348c- Author
Edward G <edward.g2013@gmail.com>- Committer
Edward G <edward.g2013@gmail.com>- Parent
a0232a8
1 file changed+1556 added−0 removed
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.