Convert changes to markdown.
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 832ca22 · Browse files · 2 files·+2 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
2 files+2 added−1507 removed
- other:+2 added−1507 removed
Provenance
- Commit
a0232a8- Tree
f6c6b40- Author
Edward G <edward.g2013@gmail.com>- Committer
Edward G <edward.g2013@gmail.com>- Parent
832ca22
2 files changed+2 added−1507 removed
modified:docs/changes.md+2 added-2 removed
1234345# Changes
```{eval-rst}.. include:: ../CHANGES.rst
```{include} ../CHANGES.md```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.