|
1 | 1 | .. currentmodule:: click |
2 | 2 |
|
| 3 | +Version 8.2.0 |
| 4 | +------------- |
| 5 | + |
| 6 | +Unreleased |
| 7 | + |
| 8 | +- Drop support for Python 3.7. :pr:`2588` |
| 9 | +- Use modern packaging metadata with ``pyproject.toml`` instead of ``setup.cfg``. |
| 10 | + :pr:`2438` |
| 11 | +- Use ``flit_core`` instead of ``setuptools`` as build backend. :pr:`2543` |
| 12 | +- Deprecate the ``__version__`` attribute. Use feature detection, or |
| 13 | + ``importlib.metadata.version("click")``, instead. :issue:`2598` |
| 14 | +- ``BaseCommand`` is deprecated. ``Command`` is the base class for all |
| 15 | + commands. :issue:`2589` |
| 16 | +- ``MultiCommand`` is deprecated. ``Group`` is the base class for all group |
| 17 | + commands. :issue:`2590` |
| 18 | +- The current parser and related classes and methods, are deprecated. |
| 19 | + :issue:`2205` |
| 20 | + |
| 21 | + - ``OptionParser`` and the ``parser`` module, which is a modified copy of |
| 22 | + ``optparse`` in the standard library. |
| 23 | + - ``Context.protected_args`` is unneeded. ``Context.args`` contains any |
| 24 | + remaining arguments while parsing. |
| 25 | + - ``Parameter.add_to_parser`` (on both ``Argument`` and ``Option``) is |
| 26 | + unneeded. Parsing works directly without building a separate parser. |
| 27 | + - ``split_arg_string`` is moved from ``parser`` to ``shell_completion``. |
| 28 | + |
| 29 | +- Enable deferred evaluation of annotations with |
| 30 | + ``from __future__ import annotations``. :pr:`2270` |
| 31 | +- When generating a command's name from a decorated function's name, the |
| 32 | + suffixes ``_command``, ``_cmd``, ``_group``, and ``_grp`` are removed. |
| 33 | + :issue:`2322` |
| 34 | +- Show the ``types.ParamType.name`` for ``types.Choice`` options within |
| 35 | + ``--help`` message if ``show_choices=False`` is specified. |
| 36 | + :issue:`2356` |
| 37 | +- Do not display default values in prompts when ``Option.show_default`` is |
| 38 | + ``False``. :pr:`2509` |
| 39 | +- Add ``get_help_extra`` method on ``Option`` to fetch the generated extra |
| 40 | + items used in ``get_help_record`` to render help text. :issue:`2516` |
| 41 | + :pr:`2517` |
| 42 | +- Keep stdout and stderr streams independent in ``CliRunner``. Always |
| 43 | + collect stderr output and never raise an exception. Add a new |
| 44 | + output stream to simulate what the user sees in its terminal. Removes |
| 45 | + the ``mix_stderr`` parameter in ``CliRunner``. :issue:`2522` :pr:`2523` |
| 46 | +- ``Option.show_envvar`` now also shows environment variable in error messages. |
| 47 | + :issue:`2695` :pr:`2696` |
| 48 | +- ``Context.close`` will be called on exit. This results in all |
| 49 | + ``Context.call_on_close`` callbacks and context managers added via |
| 50 | + ``Context.with_resource`` to be closed on exit as well. :pr:`2680` |
| 51 | +- Add ``ProgressBar(hidden: bool)`` to allow hiding the progressbar. :issue:`2609` |
| 52 | +- A ``UserWarning`` will be shown when multiple parameters attempt to use the |
| 53 | + same name. :issue:`2396` |
| 54 | +- When using ``Option.envvar`` with ``Option.flag_value``, the ``flag_value`` |
| 55 | + will always be used instead of the value of the environment variable. |
| 56 | + :issue:`2746` :pr:`2788` |
| 57 | +- Add ``Choice.get_invalid_choice_message`` method for customizing the |
| 58 | + invalid choice message. :issue:`2621` :pr:`2622` |
| 59 | +- If help is shown because ``no_args_is_help`` is enabled (defaults to ``True`` |
| 60 | + for groups, ``False`` for commands), the exit code is 2 instead of 0. |
| 61 | + :issue:`1489` :pr:`1489` |
| 62 | +- Contexts created during shell completion are closed properly, fixing |
| 63 | + a ``ResourceWarning`` when using ``click.File``. :issue:`2644` :pr:`2800` |
| 64 | + :pr:`2767` |
| 65 | +- ``click.edit(filename)`` now supports passing an iterable of filenames in |
| 66 | + case the editor supports editing multiple files at once. Its return type |
| 67 | + is now also typed: ``AnyStr`` if ``text`` is passed, otherwise ``None``. |
| 68 | + :issue:`2067` :pr:`2068` |
| 69 | +- Specialized typing of ``progressbar(length=...)`` as ``ProgressBar[int]``. |
| 70 | + :pr:`2630` |
| 71 | +- Improve ``echo_via_pager`` behaviour in face of errors. |
| 72 | + :issue:`2674` |
| 73 | + |
| 74 | + - Terminate the pager in case a generator passed to ``echo_via_pager`` |
| 75 | + raises an exception. |
| 76 | + - Ensure to always close the pipe to the pager process and wait for it |
| 77 | + to terminate. |
| 78 | + - ``echo_via_pager`` will not ignore ``KeyboardInterrupt`` anymore. This |
| 79 | + allows the user to search for future output of the generator when |
| 80 | + using less and then aborting the program using ctrl-c. |
| 81 | + |
| 82 | +- ``deprecated: bool | str`` can now be used on options and arguments. This |
| 83 | + previously was only available for ``Command``. The message can now also be |
| 84 | + customised by using a ``str`` instead of a ``bool``. :issue:`2263` :pr:`2271` |
| 85 | + |
| 86 | + - ``Command.deprecated`` formatting in ``--help`` changed from |
| 87 | + ``(Deprecated) help`` to ``help (DEPRECATED)``. |
| 88 | + - Parameters cannot be required nor prompted or an error is raised. |
| 89 | + - A warning will be printed when something deprecated is used. |
| 90 | + |
| 91 | +- Add a ``catch_exceptions`` parameter to ``CliRunner``. If |
| 92 | + ``catch_exceptions`` is not passed to ``CliRunner.invoke``, |
| 93 | + the value from ``CliRunner``. :issue:`2817` :pr:`2818` |
| 94 | +- ``Option.flag_value`` will no longer have a default value set based on |
| 95 | + ``Option.default`` if ``Option.is_flag`` is ``False``. This results in |
| 96 | + ``Option.default`` not needing to implement `__bool__`. :pr:`2829` |
| 97 | +- Incorrect ``click.edit`` typing has been corrected. :pr:`2804` |
| 98 | +- ``Choice`` is now generic and supports any iterable value. |
| 99 | + This allows you to use enums and other non-``str`` values. :pr:`2796` |
| 100 | + :issue:`605` |
| 101 | + |
3 | 102 | Version 8.1.8 |
4 | 103 | ------------- |
5 | 104 |
|
@@ -957,12 +1056,10 @@ Released 2014-08-22 |
957 | 1056 | function. |
958 | 1057 | - Fixed default parameters not being handled properly by the context |
959 | 1058 | invoke method. This is a backwards incompatible change if the |
960 | | - function was used improperly. See :ref:`upgrade-to-3.2` for more |
961 | | - information. |
| 1059 | + function was used improperly. |
962 | 1060 | - Removed the ``invoked_subcommands`` attribute largely. It is not |
963 | 1061 | possible to provide it to work error free due to how the parsing |
964 | | - works so this API has been deprecated. See :ref:`upgrade-to-3.2` for |
965 | | - more information. |
| 1062 | + works so this API has been deprecated. |
966 | 1063 | - Restored the functionality of ``invoked_subcommand`` which was |
967 | 1064 | broken as a regression in 3.1. |
968 | 1065 |
|
|
0 commit comments