| 1 |
.. currentmodule:: click |
| 2 |
|
| 3 |
Version 8.3.3 |
| 4 |
------------- |
| 5 |
|
| 6 |
Released 2026-04-20 |
| 7 |
|
| 8 |
- Use :func:`shlex.split` to split pager and editor commands into ``argv`` |
| 9 |
lists for :class:`subprocess.Popen`, removing ``shell=True``. |
| 10 |
:issue:`1026` :pr:`1477` :pr:`2775` |
| 11 |
- Fix ``TypeError`` when rendering help for an option whose default value is |
| 12 |
an object that doesn't support equality comparison with strings, such as |
| 13 |
``semver.Version``. :issue:`3298` :pr:`3299` |
| 14 |
- Fix pager test pollution under parallel execution by using pytest's |
| 15 |
``tmp_path`` fixture instead of a shared temporary file path. :pr:`3238` |
| 16 |
- Treat ``Sentinel.UNSET`` values in a ``default_map`` as absent, so they fall |
| 17 |
through to the next default source instead of being used as the value. |
| 18 |
:issue:`3224` :pr:`3240` |
| 19 |
- Patch ``pdb.Pdb`` in ``CliRunner`` isolation so ``pdb.set_trace()``, |
| 20 |
``breakpoint()``, and debuggers subclassing ``pdb.Pdb`` (ipdb, pdbpp) can |
| 21 |
interact with the real terminal instead of the captured I/O streams. |
| 22 |
:issue:`654` :issue:`824` :issue:`843` :pr:`951` :pr:`3235` |
| 23 |
- Add optional randomized parallel test execution using ``pytest-randomly`` and |
| 24 |
``pytest-xdist`` to detect test pollution and race conditions. :pr:`3151` |
| 25 |
- Add contributor documentation for running stress tests, randomized |
| 26 |
parallel tests, and Flask smoke tests. :pr:`3151` :pr:`3177` |
| 27 |
- Show custom ``show_default`` string in prompts, matching the existing |
| 28 |
help text behavior. :issue:`2836` :pr:`2837` :pr:`3165` :pr:`3262` :pr:`3280` |
| 29 |
:pr:`3328` |
| 30 |
- Fix ``default=True`` with boolean ``flag_value`` always returning the |
| 31 |
``flag_value`` instead of ``True``. The ``default=True`` to ``flag_value`` |
| 32 |
substitution now only applies to non-boolean flags, where ``True`` acts as a |
| 33 |
sentinel meaning "activate this flag by default". For boolean flags, |
| 34 |
``default=True`` is returned as a literal value. :issue:`3111` :pr:`3239` |
| 35 |
- Mark ``make_default_short_help`` as private API. :issue:`3189` :pr:`3250` |
| 36 |
- ``CliRunner``'s redirected streams now expose the original file descriptor |
| 37 |
via ``fileno()``, so that ``faulthandler``, ``subprocess``, and other |
| 38 |
C-level consumers no longer crash with ``io.UnsupportedOperation``. |
| 39 |
:issue:`2865` |
| 40 |
- Change :class:`ParameterSource` to an :class:`~enum.IntEnum` and reorder |
| 41 |
its members from most to least explicit, so values can be compared to |
| 42 |
check whether a parameter was explicitly provided. :issue:`2879` :pr:`3248` |
| 43 |
|
| 44 |
Version 8.3.2 |
| 45 |
------------- |
| 46 |
|
| 47 |
Released 2026-04-02 |
| 48 |
|
| 49 |
- Fix handling of ``flag_value`` when ``is_flag=False`` to allow such options to be |
| 50 |
used without an explicit value. :issue:`3084` :pr:`3152` |
| 51 |
- Hide ``Sentinel.UNSET`` values as ``None`` when using ``lookup_default()``. |
| 52 |
:issue:`3136` :pr:`3199` :pr:`3202` :pr:`3209` :pr:`3212` :pr:`3224` |
| 53 |
- Prevent ``_NamedTextIOWrapper`` from closing streams owned by ``StreamMixer``. |
| 54 |
:issue:`824` :issue:`2991` :issue:`2993` :issue:`3110` :pr:`3139` :pr:`3140` |
| 55 |
- Add comprehensive tests for ``CliRunner`` stream lifecycle, covering |
| 56 |
logging interaction, multi-threaded safety, and sequential invocation |
| 57 |
isolation. Add high-iteration stress tests behind a ``stress`` marker |
| 58 |
with a dedicated CI job. :pr:`3139` |
| 59 |
- Fix callable ``flag_value`` being instantiated when used as a default via |
| 60 |
``default=True``. :issue:`3121` :pr:`3201` :pr:`3213` :pr:`3225` |
| 61 |
|
| 62 |
Version 8.3.1 |
| 63 |
------------- |
| 64 |
|
| 65 |
Released 2025-11-15 |
| 66 |
|
| 67 |
- Don't discard pager arguments by correctly using ``subprocess.Popen``. :issue:`3039` |
| 68 |
:pr:`3055` |
| 69 |
- Replace ``Sentinel.UNSET`` default values by ``None`` as they're passed through |
| 70 |
the ``Context.invoke()`` method. :issue:`3066` :issue:`3065` :pr:`3068` |
| 71 |
- Fix conversion of ``Sentinel.UNSET`` happening too early, which caused incorrect |
| 72 |
behavior for multiple parameters using the same name. :issue:`3071` :pr:`3079` |
| 73 |
- Hide ``Sentinel.UNSET`` values as ``None`` when looking up for other parameters |
| 74 |
through the context inside parameter callbacks. :issue:`3136` :pr:`3137` |
| 75 |
- Fix rendering when ``prompt`` and ``confirm`` parameter ``prompt_suffix`` is |
| 76 |
empty. :issue:`3019` :pr:`3021` |
| 77 |
- When ``Sentinel.UNSET`` is found during parsing, it will skip calls to |
| 78 |
``type_cast_value``. :issue:`3069` :pr:`3090` |
| 79 |
|
| 80 |
Version 8.3.0 |
| 81 |
-------------- |
| 82 |
|
| 83 |
Released 2025-09-17 |
| 84 |
|
| 85 |
- **Improved flag option handling**: Reworked the relationship between ``flag_value`` |
| 86 |
and ``default`` parameters for better consistency: |
| 87 |
|
| 88 |
* The ``default`` parameter value is now preserved as-is and passed directly |
| 89 |
to CLI functions (no more unexpected transformations) |
| 90 |
* Exception: flag options with ``default=True`` maintain backward compatibility |
| 91 |
by defaulting to their ``flag_value`` |
| 92 |
* The ``default`` parameter can now be any type (``bool``, ``None``, etc.) |
| 93 |
* Fixes inconsistencies reported in: :issue:`1992` :issue:`2514` :issue:`2610` |
| 94 |
:issue:`3024` :pr:`3030` |
| 95 |
- Allow ``default`` to be set on ``Argument`` for ``nargs = -1``. :issue:`2164` |
| 96 |
:pr:`3030` |
| 97 |
- Show correct auto complete value for ``nargs`` option in combination with flag |
| 98 |
option :issue:`2813` |
| 99 |
- Fix handling of quoted and escaped parameters in Fish autocompletion. :issue:`2995` :pr:`3013` |
| 100 |
- Lazily import ``shutil``. :pr:`3023` |
| 101 |
- Properly forward exception information to resources registered with |
| 102 |
``click.core.Context.with_resource()``. :issue:`2447` :pr:`3058` |
| 103 |
- Fix regression related to EOF handling in ``CliRunner``. :issue:`2939` :pr:`2940` |
| 104 |
|
| 105 |
Version 8.2.2 |
| 106 |
------------- |
| 107 |
|
| 108 |
Released 2025-07-31 |
| 109 |
|
| 110 |
- Fix reconciliation of ``default``, ``flag_value`` and ``type`` parameters for |
| 111 |
flag options, as well as parsing and normalization of environment variables. |
| 112 |
:issue:`2952` :pr:`2956` |
| 113 |
- Fix typing issue in ``BadParameter`` and ``MissingParameter`` exceptions for the |
| 114 |
parameter ``param_hint`` that did not allow for a sequence of string where the |
| 115 |
underlying function ``_join_param_hints`` allows for it. :issue:`2777` :pr:`2990` |
| 116 |
- Use the value of ``Enum`` choices to render their default value in help |
| 117 |
screen. Refs :issue:`2911` :pr:`3004` |
| 118 |
- Fix completion for the Z shell (``zsh``) for completion items containing |
| 119 |
colons. :issue:`2703` :pr:`2846` |
| 120 |
- Don't include envvar in error hint when not configured. :issue:`2971` :pr:`2972` |
| 121 |
- Fix a rare race in ``click.testing.StreamMixer``'s finalization that manifested |
| 122 |
as a ``ValueError`` on close in a multi-threaded test session. |
| 123 |
:issue:`2993` :pr:`2991` |
| 124 |
|
| 125 |
Version 8.2.1 |
| 126 |
------------- |
| 127 |
|
| 128 |
Released 2025-05-20 |
| 129 |
|
| 130 |
- Fix flag value handling for flag options with a provided type. :issue:`2894` |
| 131 |
:issue:`2897` :pr:`2930` |
| 132 |
- Fix shell completion for nested groups. :issue:`2906` :pr:`2907` |
| 133 |
- Flush ``sys.stderr`` at the end of ``CliRunner.invoke``. :issue:`2682` |
| 134 |
- Fix EOF handling for stdin input in CliRunner. :issue:`2787` |
| 135 |
|
| 136 |
Version 8.2.0 |
| 137 |
------------- |
| 138 |
|
| 139 |
Released 2025-05-10 |
| 140 |
|
| 141 |
- Drop support for Python 3.7, 3.8, and 3.9. :pr:`2588` :pr:`2893` |
| 142 |
- Use modern packaging metadata with ``pyproject.toml`` instead of ``setup.cfg``. |
| 143 |
:pr:`2438` |
| 144 |
- Use ``flit_core`` instead of ``setuptools`` as build backend. :pr:`2543` |
| 145 |
- Deprecate the ``__version__`` attribute. Use feature detection, or |
| 146 |
``importlib.metadata.version("click")``, instead. :issue:`2598` |
| 147 |
- ``BaseCommand`` is deprecated. ``Command`` is the base class for all |
| 148 |
commands. :issue:`2589` |
| 149 |
- ``MultiCommand`` is deprecated. ``Group`` is the base class for all group |
| 150 |
commands. :issue:`2590` |
| 151 |
- The current parser and related classes and methods, are deprecated. |
| 152 |
:issue:`2205` |
| 153 |
|
| 154 |
- ``OptionParser`` and the ``parser`` module, which is a modified copy of |
| 155 |
``optparse`` in the standard library. |
| 156 |
- ``Context.protected_args`` is unneeded. ``Context.args`` contains any |
| 157 |
remaining arguments while parsing. |
| 158 |
- ``Parameter.add_to_parser`` (on both ``Argument`` and ``Option``) is |
| 159 |
unneeded. Parsing works directly without building a separate parser. |
| 160 |
- ``split_arg_string`` is moved from ``parser`` to ``shell_completion``. |
| 161 |
|
| 162 |
- Enable deferred evaluation of annotations with |
| 163 |
``from __future__ import annotations``. :pr:`2270` |
| 164 |
- When generating a command's name from a decorated function's name, the |
| 165 |
suffixes ``_command``, ``_cmd``, ``_group``, and ``_grp`` are removed. |
| 166 |
:issue:`2322` |
| 167 |
- Show the ``types.ParamType.name`` for ``types.Choice`` options within |
| 168 |
``--help`` message if ``show_choices=False`` is specified. |
| 169 |
:issue:`2356` |
| 170 |
- Do not display default values in prompts when ``Option.show_default`` is |
| 171 |
``False``. :pr:`2509` |
| 172 |
- Add ``get_help_extra`` method on ``Option`` to fetch the generated extra |
| 173 |
items used in ``get_help_record`` to render help text. :issue:`2516` |
| 174 |
:pr:`2517` |
| 175 |
- Keep stdout and stderr streams independent in ``CliRunner``. Always |
| 176 |
collect stderr output and never raise an exception. Add a new |
| 177 |
output stream to simulate what the user sees in its terminal. Removes |
| 178 |
the ``mix_stderr`` parameter in ``CliRunner``. :issue:`2522` :pr:`2523` |
| 179 |
- ``Option.show_envvar`` now also shows environment variable in error messages. |
| 180 |
:issue:`2695` :pr:`2696` |
| 181 |
- ``Context.close`` will be called on exit. This results in all |
| 182 |
``Context.call_on_close`` callbacks and context managers added via |
| 183 |
``Context.with_resource`` to be closed on exit as well. :pr:`2680` |
| 184 |
- Add ``ProgressBar(hidden: bool)`` to allow hiding the progressbar. :issue:`2609` |
| 185 |
- A ``UserWarning`` will be shown when multiple parameters attempt to use the |
| 186 |
same name. :issue:`2396` |
| 187 |
- When using ``Option.envvar`` with ``Option.flag_value``, the ``flag_value`` |
| 188 |
will always be used instead of the value of the environment variable. |
| 189 |
:issue:`2746` :pr:`2788` |
| 190 |
- Add ``Choice.get_invalid_choice_message`` method for customizing the |
| 191 |
invalid choice message. :issue:`2621` :pr:`2622` |
| 192 |
- If help is shown because ``no_args_is_help`` is enabled (defaults to ``True`` |
| 193 |
for groups, ``False`` for commands), the exit code is 2 instead of 0. |
| 194 |
:issue:`1489` :pr:`1489` |
| 195 |
- Contexts created during shell completion are closed properly, fixing |
| 196 |
a ``ResourceWarning`` when using ``click.File``. :issue:`2644` :pr:`2800` |
| 197 |
:pr:`2767` |
| 198 |
- ``click.edit(filename)`` now supports passing an iterable of filenames in |
| 199 |
case the editor supports editing multiple files at once. Its return type |
| 200 |
is now also typed: ``AnyStr`` if ``text`` is passed, otherwise ``None``. |
| 201 |
:issue:`2067` :pr:`2068` |
| 202 |
- Specialized typing of ``progressbar(length=...)`` as ``ProgressBar[int]``. |
| 203 |
:pr:`2630` |
| 204 |
- Improve ``echo_via_pager`` behaviour in face of errors. |
| 205 |
:issue:`2674` |
| 206 |
|
| 207 |
- Terminate the pager in case a generator passed to ``echo_via_pager`` |
| 208 |
raises an exception. |
| 209 |
- Ensure to always close the pipe to the pager process and wait for it |
| 210 |
to terminate. |
| 211 |
- ``echo_via_pager`` will not ignore ``KeyboardInterrupt`` anymore. This |
| 212 |
allows the user to search for future output of the generator when |
| 213 |
using less and then aborting the program using ctrl-c. |
| 214 |
|
| 215 |
- ``deprecated: bool | str`` can now be used on options and arguments. This |
| 216 |
previously was only available for ``Command``. The message can now also be |
| 217 |
customised by using a ``str`` instead of a ``bool``. :issue:`2263` :pr:`2271` |
| 218 |
|
| 219 |
- ``Command.deprecated`` formatting in ``--help`` changed from |
| 220 |
``(Deprecated) help`` to ``help (DEPRECATED)``. |
| 221 |
- Parameters cannot be required nor prompted or an error is raised. |
| 222 |
- A warning will be printed when something deprecated is used. |
| 223 |
|
| 224 |
- Add a ``catch_exceptions`` parameter to ``CliRunner``. If |
| 225 |
``catch_exceptions`` is not passed to ``CliRunner.invoke``, the value |
| 226 |
from ``CliRunner`` is used. :issue:`2817` :pr:`2818` |
| 227 |
- ``Option.flag_value`` will no longer have a default value set based on |
| 228 |
``Option.default`` if ``Option.is_flag`` is ``False``. This results in |
| 229 |
``Option.default`` not needing to implement `__bool__`. :pr:`2829` |
| 230 |
- Incorrect ``click.edit`` typing has been corrected. :pr:`2804` |
| 231 |
- ``Choice`` is now generic and supports any iterable value. |
| 232 |
This allows you to use enums and other non-``str`` values. :pr:`2796` |
| 233 |
:issue:`605` |
| 234 |
- Fix setup of help option's defaults when using a custom class on its |
| 235 |
decorator. Removes ``HelpOption``. :issue:`2832` :pr:`2840` |
| 236 |
|
| 237 |
Version 8.1.8 |
| 238 |
------------- |
| 239 |
|
| 240 |
Released 2024-12-19 |
| 241 |
|
| 242 |
- Fix an issue with type hints for ``click.open_file()``. :issue:`2717` |
| 243 |
- Fix issue where error message for invalid ``click.Path`` displays on |
| 244 |
multiple lines. :issue:`2697` |
| 245 |
- Fixed issue that prevented a default value of ``""`` from being displayed in |
| 246 |
the help for an option. :issue:`2500` |
| 247 |
- The test runner handles stripping color consistently on Windows. |
| 248 |
:issue:`2705` |
| 249 |
- Show correct value for flag default when using ``default_map``. |
| 250 |
:issue:`2632` |
| 251 |
- Fix ``click.echo(color=...)`` passing ``color`` to coloroma so it can be |
| 252 |
forced on Windows. :issue:`2606`. |
| 253 |
- More robust bash version check, fixing problem on Windows with git-bash. |
| 254 |
:issue:`2638` |
| 255 |
- Cache the help option generated by the ``help_option_names`` setting to |
| 256 |
respect its eagerness. :pr:`2811` |
| 257 |
- Replace uses of ``os.system`` with ``subprocess.Popen``. :issue:`1476` |
| 258 |
- Exceptions generated during a command will use the context's ``color`` |
| 259 |
setting when being displayed. :issue:`2193` |
| 260 |
- Error message when defining option with invalid name is more descriptive. |
| 261 |
:issue:`2452` |
| 262 |
- Refactor code generating default ``--help`` option to deduplicate code. |
| 263 |
:pr:`2563` |
| 264 |
- Test ``CLIRunner`` resets patched ``_compat.should_strip_ansi``. |
| 265 |
:issue:`2732` |
| 266 |
|
| 267 |
|
| 268 |
Version 8.1.7 |
| 269 |
------------- |
| 270 |
|
| 271 |
Released 2023-08-17 |
| 272 |
|
| 273 |
- Fix issue with regex flags in shell completion. :issue:`2581` |
| 274 |
- Bash version detection issues a warning instead of an error. :issue:`2574` |
| 275 |
- Fix issue with completion script for Fish shell. :issue:`2567` |
| 276 |
|
| 277 |
|
| 278 |
Version 8.1.6 |
| 279 |
------------- |
| 280 |
|
| 281 |
Released 2023-07-18 |
| 282 |
|
| 283 |
- Fix an issue with type hints for ``@click.group()``. :issue:`2558` |
| 284 |
|
| 285 |
|
| 286 |
Version 8.1.5 |
| 287 |
------------- |
| 288 |
|
| 289 |
Released 2023-07-13 |
| 290 |
|
| 291 |
- Fix an issue with type hints for ``@click.command()``, ``@click.option()``, and |
| 292 |
other decorators. Introduce typing tests. :issue:`2558` |
| 293 |
|
| 294 |
|
| 295 |
Version 8.1.4 |
| 296 |
------------- |
| 297 |
|
| 298 |
Released 2023-07-06 |
| 299 |
|
| 300 |
- Replace all ``typing.Dict`` occurrences to ``typing.MutableMapping`` for |
| 301 |
parameter hints. :issue:`2255` |
| 302 |
- Improve type hinting for decorators and give all generic types parameters. |
| 303 |
:issue:`2398` |
| 304 |
- Fix return value and type signature of `shell_completion.add_completion_class` |
| 305 |
function. :pr:`2421` |
| 306 |
- Bash version detection doesn't fail on Windows. :issue:`2461` |
| 307 |
- Completion works if there is a dot (``.``) in the program name. :issue:`2166` |
| 308 |
- Improve type annotations for pyright type checker. :issue:`2268` |
| 309 |
- Improve responsiveness of ``click.clear()``. :issue:`2284` |
| 310 |
- Improve command name detection when using Shiv or PEX. :issue:`2332` |
| 311 |
- Avoid showing empty lines if command help text is empty. :issue:`2368` |
| 312 |
- ZSH completion script works when loaded from ``fpath``. :issue:`2344`. |
| 313 |
- ``EOFError`` and ``KeyboardInterrupt`` tracebacks are not suppressed when |
| 314 |
``standalone_mode`` is disabled. :issue:`2380` |
| 315 |
- ``@group.command`` does not fail if the group was created with a custom |
| 316 |
``command_class``. :issue:`2416` |
| 317 |
- ``multiple=True`` is allowed for flag options again and does not require |
| 318 |
setting ``default=()``. :issue:`2246, 2292, 2295` |
| 319 |
- Make the decorators returned by ``@argument()`` and ``@option()`` reusable when the |
| 320 |
``cls`` parameter is used. :issue:`2294` |
| 321 |
- Don't fail when writing filenames to streams with strict errors. Replace invalid |
| 322 |
bytes with the replacement character (``�``). :issue:`2395` |
| 323 |
- Remove unnecessary attempt to detect MSYS2 environment. :issue:`2355` |
| 324 |
- Remove outdated and unnecessary detection of App Engine environment. :pr:`2554` |
| 325 |
- ``echo()`` does not fail when no streams are attached, such as with ``pythonw`` on |
| 326 |
Windows. :issue:`2415` |
| 327 |
- Argument with ``expose_value=False`` do not cause completion to fail. :issue:`2336` |
| 328 |
|
| 329 |
|
| 330 |
Version 8.1.3 |
| 331 |
------------- |
| 332 |
|
| 333 |
Released 2022-04-28 |
| 334 |
|
| 335 |
- Use verbose form of ``typing.Callable`` for ``@command`` and |
| 336 |
``@group``. :issue:`2255` |
| 337 |
- Show error when attempting to create an option with |
| 338 |
``multiple=True, is_flag=True``. Use ``count`` instead. |
| 339 |
:issue:`2246` |
| 340 |
|
| 341 |
|
| 342 |
Version 8.1.2 |
| 343 |
------------- |
| 344 |
|
| 345 |
Released 2022-03-31 |
| 346 |
|
| 347 |
- Fix error message for readable path check that was mixed up with the |
| 348 |
executable check. :pr:`2236` |
| 349 |
- Restore parameter order for ``Path``, placing the ``executable`` |
| 350 |
parameter at the end. It is recommended to use keyword arguments |
| 351 |
instead of positional arguments. :issue:`2235` |
| 352 |
|
| 353 |
|
| 354 |
Version 8.1.1 |
| 355 |
------------- |
| 356 |
|
| 357 |
Released 2022-03-30 |
| 358 |
|
| 359 |
- Fix an issue with decorator typing that caused type checking to |
| 360 |
report that a command was not callable. :issue:`2227` |
| 361 |
|
| 362 |
|
| 363 |
Version 8.1.0 |
| 364 |
------------- |
| 365 |
|
| 366 |
Released 2022-03-28 |
| 367 |
|
| 368 |
- Drop support for Python 3.6. :pr:`2129` |
| 369 |
- Remove previously deprecated code. :pr:`2130` |
| 370 |
|
| 371 |
- ``Group.resultcallback`` is renamed to ``result_callback``. |
| 372 |
- ``autocompletion`` parameter to ``Command`` is renamed to |
| 373 |
``shell_complete``. |
| 374 |
- ``get_terminal_size`` is removed, use |
| 375 |
``shutil.get_terminal_size`` instead. |
| 376 |
- ``get_os_args`` is removed, use ``sys.argv[1:]`` instead. |
| 377 |
|
| 378 |
- Rely on :pep:`538` and :pep:`540` to handle selecting UTF-8 encoding |
| 379 |
instead of ASCII. Click's locale encoding detection is removed. |
| 380 |
:issue:`2198` |
| 381 |
- Single options boolean flags with ``show_default=True`` only show |
| 382 |
the default if it is ``True``. :issue:`1971` |
| 383 |
- The ``command`` and ``group`` decorators can be applied with or |
| 384 |
without parentheses. :issue:`1359` |
| 385 |
- The ``Path`` type can check whether the target is executable. |
| 386 |
:issue:`1961` |
| 387 |
- ``Command.show_default`` overrides ``Context.show_default``, instead |
| 388 |
of the other way around. :issue:`1963` |
| 389 |
- Parameter decorators and ``@group`` handles ``cls=None`` the same as |
| 390 |
not passing ``cls``. ``@option`` handles ``help=None`` the same as |
| 391 |
not passing ``help``. :issue:`#1959` |
| 392 |
- A flag option with ``required=True`` requires that the flag is |
| 393 |
passed instead of choosing the implicit default value. :issue:`1978` |
| 394 |
- Indentation in help text passed to ``Option`` and ``Command`` is |
| 395 |
cleaned the same as using the ``@option`` and ``@command`` |
| 396 |
decorators does. A command's ``epilog`` and ``short_help`` are also |
| 397 |
processed. :issue:`1985` |
| 398 |
- Store unprocessed ``Command.help``, ``epilog`` and ``short_help`` |
| 399 |
strings. Processing is only done when formatting help text for |
| 400 |
output. :issue:`2149` |
| 401 |
- Allow empty str input for ``prompt()`` when |
| 402 |
``confirmation_prompt=True`` and ``default=""``. :issue:`2157` |
| 403 |
- Windows glob pattern expansion doesn't fail if a value is an invalid |
| 404 |
pattern. :issue:`2195` |
| 405 |
- It's possible to pass a list of ``params`` to ``@command``. Any |
| 406 |
params defined with decorators are appended to the passed params. |
| 407 |
:issue:`2131`. |
| 408 |
- ``@command`` decorator is annotated as returning the correct type if |
| 409 |
a ``cls`` argument is used. :issue:`2211` |
| 410 |
- A ``Group`` with ``invoke_without_command=True`` and ``chain=False`` |
| 411 |
will invoke its result callback with the group function's return |
| 412 |
value. :issue:`2124` |
| 413 |
- ``to_info_dict`` will not fail if a ``ParamType`` doesn't define a |
| 414 |
``name``. :issue:`2168` |
| 415 |
- Shell completion prioritizes option values with option prefixes over |
| 416 |
new options. :issue:`2040` |
| 417 |
- Options that get an environment variable value using |
| 418 |
``autoenvvar_prefix`` treat an empty value as ``None``, consistent |
| 419 |
with a direct ``envvar``. :issue:`2146` |
| 420 |
|
| 421 |
|
| 422 |
Version 8.0.4 |
| 423 |
------------- |
| 424 |
|
| 425 |
Released 2022-02-18 |
| 426 |
|
| 427 |
- ``open_file`` recognizes ``Path("-")`` as a standard stream, the |
| 428 |
same as the string ``"-"``. :issue:`2106` |
| 429 |
- The ``option`` and ``argument`` decorators preserve the type |
| 430 |
annotation of the decorated function. :pr:`2155` |
| 431 |
- A callable default value can customize its help text by overriding |
| 432 |
``__str__`` instead of always showing ``(dynamic)``. :issue:`2099` |
| 433 |
- Fix a typo in the Bash completion script that affected file and |
| 434 |
directory completion. If this script was generated by a previous |
| 435 |
version, it should be regenerated. :issue:`2163` |
| 436 |
- Fix typing for ``echo`` and ``secho`` file argument. |
| 437 |
:issue:`2174, 2185` |
| 438 |
|
| 439 |
|
| 440 |
Version 8.0.3 |
| 441 |
------------- |
| 442 |
|
| 443 |
Released 2021-10-10 |
| 444 |
|
| 445 |
- Fix issue with ``Path(resolve_path=True)`` type creating invalid |
| 446 |
paths. :issue:`2088` |
| 447 |
- Importing ``readline`` does not cause the ``confirm()`` prompt to |
| 448 |
disappear when pressing backspace. :issue:`2092` |
| 449 |
- Any default values injected by ``invoke()`` are cast to the |
| 450 |
corresponding parameter's type. :issue:`2089, 2090` |
| 451 |
|
| 452 |
|
| 453 |
Version 8.0.2 |
| 454 |
------------- |
| 455 |
|
| 456 |
Released 2021-10-08 |
| 457 |
|
| 458 |
- ``is_bool_flag`` is not set to ``True`` if ``is_flag`` is ``False``. |
| 459 |
:issue:`1925` |
| 460 |
- Bash version detection is locale independent. :issue:`1940` |
| 461 |
- Empty ``default`` value is not shown for ``multiple=True``. |
| 462 |
:issue:`1969` |
| 463 |
- Fix shell completion for arguments that start with a forward slash |
| 464 |
such as absolute file paths. :issue:`1929` |
| 465 |
- ``Path`` type with ``resolve_path=True`` resolves relative symlinks |
| 466 |
to be relative to the containing directory. :issue:`1921` |
| 467 |
- Completion does not skip Python's resource cleanup when exiting, |
| 468 |
avoiding some unexpected warning output. :issue:`1738, 2017` |
| 469 |
- Fix type annotation for ``type`` argument in ``prompt`` function. |
| 470 |
:issue:`2062` |
| 471 |
- Fix overline and italic styles, which were incorrectly added when |
| 472 |
adding underline. :pr:`2058` |
| 473 |
- An option with ``count=True`` will not show "[x>=0]" in help text. |
| 474 |
:issue:`2072` |
| 475 |
- Default values are not cast to the parameter type twice during |
| 476 |
processing. :issue:`2085` |
| 477 |
- Options with ``multiple`` and ``flag_value`` use the flag value |
| 478 |
instead of leaving an internal placeholder. :issue:`2001` |
| 479 |
|
| 480 |
|
| 481 |
Version 8.0.1 |
| 482 |
------------- |
| 483 |
|
| 484 |
Released 2021-05-19 |
| 485 |
|
| 486 |
- Mark top-level names as exported so type checking understand imports |
| 487 |
in user projects. :issue:`1879` |
| 488 |
- Annotate ``Context.obj`` as ``Any`` so type checking allows all |
| 489 |
operations on the arbitrary object. :issue:`1885` |
| 490 |
- Fix some types that weren't available in Python 3.6.0. :issue:`1882` |
| 491 |
- Fix type checking for iterating over ``ProgressBar`` object. |
| 492 |
:issue:`1892` |
| 493 |
- The ``importlib_metadata`` backport package is installed on Python < |
| 494 |
3.8. :issue:`1889` |
| 495 |
- Arguments with ``nargs=-1`` only use env var value if no command |
| 496 |
line values are given. :issue:`1903` |
| 497 |
- Flag options guess their type from ``flag_value`` if given, like |
| 498 |
regular options do from ``default``. :issue:`1886` |
| 499 |
- Added documentation that custom parameter types may be passed |
| 500 |
already valid values in addition to strings. :issue:`1898` |
| 501 |
- Resolving commands returns the name that was given, not |
| 502 |
``command.name``, fixing an unintended change to help text and |
| 503 |
``default_map`` lookups. When using patterns like ``AliasedGroup``, |
| 504 |
override ``resolve_command`` to change the name that is returned if |
| 505 |
needed. :issue:`1895` |
| 506 |
- If a default value is invalid, it does not prevent showing help |
| 507 |
text. :issue:`1889` |
| 508 |
- Pass ``windows_expand_args=False`` when calling the main command to |
| 509 |
disable pattern expansion on Windows. There is no way to escape |
| 510 |
patterns in CMD, so if the program needs to pass them on as-is then |
| 511 |
expansion must be disabled. :issue:`1901` |
| 512 |
|
| 513 |
|
| 514 |
Version 8.0.0 |
| 515 |
------------- |
| 516 |
|
| 517 |
Released 2021-05-11 |
| 518 |
|
| 519 |
- Drop support for Python 2 and 3.5. |
| 520 |
- Colorama is always installed on Windows in order to provide style |
| 521 |
and color support. :pr:`1784` |
| 522 |
- Adds a repr to Command, showing the command name for friendlier |
| 523 |
debugging. :issue:`1267`, :pr:`1295` |
| 524 |
- Add support for distinguishing the source of a command line |
| 525 |
parameter. :issue:`1264`, :pr:`1329` |
| 526 |
- Add an optional parameter to ``ProgressBar.update`` to set the |
| 527 |
``current_item``. :issue:`1226`, :pr:`1332` |
| 528 |
- ``version_option`` uses ``importlib.metadata`` (or the |
| 529 |
``importlib_metadata`` backport) instead of ``pkg_resources``. The |
| 530 |
version is detected based on the package name, not the entry point |
| 531 |
name. The Python package name must match the installed package |
| 532 |
name, or be passed with ``package_name=``. :issue:`1582` |
| 533 |
- If validation fails for a prompt with ``hide_input=True``, the value |
| 534 |
is not shown in the error message. :issue:`1460` |
| 535 |
- An ``IntRange`` or ``FloatRange`` option shows the accepted range in |
| 536 |
its help text. :issue:`1525`, :pr:`1303` |
| 537 |
- ``IntRange`` and ``FloatRange`` bounds can be open (``<``) instead |
| 538 |
of closed (``<=``) by setting ``min_open`` and ``max_open``. Error |
| 539 |
messages have changed to reflect this. :issue:`1100` |
| 540 |
- An option defined with duplicate flag names (``"--foo/--foo"``) |
| 541 |
raises a ``ValueError``. :issue:`1465` |
| 542 |
- ``echo()`` will not fail when using pytest's ``capsys`` fixture on |
| 543 |
Windows. :issue:`1590` |
| 544 |
- Resolving commands returns the canonical command name instead of the |
| 545 |
matched name. This makes behavior such as help text and |
| 546 |
``Context.invoked_subcommand`` consistent when using patterns like |
| 547 |
``AliasedGroup``. :issue:`1422` |
| 548 |
- The ``BOOL`` type accepts the values "on" and "off". :issue:`1629` |
| 549 |
- A ``Group`` with ``invoke_without_command=True`` will always invoke |
| 550 |
its result callback. :issue:`1178` |
| 551 |
- ``nargs == -1`` and ``nargs > 1`` is parsed and validated for |
| 552 |
values from environment variables and defaults. :issue:`729` |
| 553 |
- Detect the program name when executing a module or package with |
| 554 |
``python -m name``. :issue:`1603` |
| 555 |
- Include required parent arguments in help synopsis of subcommands. |
| 556 |
:issue:`1475` |
| 557 |
- Help for boolean flags with ``show_default=True`` shows the flag |
| 558 |
name instead of ``True`` or ``False``. :issue:`1538` |
| 559 |
- Non-string objects passed to ``style()`` and ``secho()`` will be |
| 560 |
converted to string. :pr:`1146` |
| 561 |
- ``edit(require_save=True)`` will detect saves for editors that exit |
| 562 |
very fast on filesystems with 1 second resolution. :pr:`1050` |
| 563 |
- New class attributes make it easier to use custom core objects |
| 564 |
throughout an entire application. :pr:`938` |
| 565 |
|
| 566 |
- ``Command.context_class`` controls the context created when |
| 567 |
running the command. |
| 568 |
- ``Context.invoke`` creates new contexts of the same type, so a |
| 569 |
custom type will persist to invoked subcommands. |
| 570 |
- ``Context.formatter_class`` controls the formatter used to |
| 571 |
generate help and usage. |
| 572 |
- ``Group.command_class`` changes the default type for |
| 573 |
subcommands with ``@group.command()``. |
| 574 |
- ``Group.group_class`` changes the default type for subgroups |
| 575 |
with ``@group.group()``. Setting it to ``type`` will create |
| 576 |
subgroups of the same type as the group itself. |
| 577 |
- Core objects use ``super()`` consistently for better support of |
| 578 |
subclassing. |
| 579 |
|
| 580 |
- Use ``Context.with_resource()`` to manage resources that would |
| 581 |
normally be used in a ``with`` statement, allowing them to be used |
| 582 |
across subcommands and callbacks, then cleaned up when the context |
| 583 |
ends. :pr:`1191` |
| 584 |
- The result object returned by the test runner's ``invoke()`` method |
| 585 |
has a ``return_value`` attribute with the value returned by the |
| 586 |
invoked command. :pr:`1312` |
| 587 |
- Required arguments with the ``Choice`` type show the choices in |
| 588 |
curly braces to indicate that one is required (``{a|b|c}``). |
| 589 |
:issue:`1272` |
| 590 |
- If only a name is passed to ``option()``, Click suggests renaming it |
| 591 |
to ``--name``. :pr:`1355` |
| 592 |
- A context's ``show_default`` parameter defaults to the value from |
| 593 |
the parent context. :issue:`1565` |
| 594 |
- ``click.style()`` can output 256 and RGB color codes. Most modern |
| 595 |
terminals support these codes. :pr:`1429` |
| 596 |
- When using ``CliRunner.invoke()``, the replaced ``stdin`` file has |
| 597 |
``name`` and ``mode`` attributes. This lets ``File`` options with |
| 598 |
the ``-`` value match non-testing behavior. :issue:`1064` |
| 599 |
- When creating a ``Group``, allow passing a list of commands instead |
| 600 |
of a dict. :issue:`1339` |
| 601 |
- When a long option name isn't valid, use ``difflib`` to make better |
| 602 |
suggestions for possible corrections. :issue:`1446` |
| 603 |
- Core objects have a ``to_info_dict()`` method. This gathers |
| 604 |
information about the object's structure that could be useful for a |
| 605 |
tool generating user-facing documentation. To get the structure of |
| 606 |
an entire CLI, use ``Context(cli).to_info_dict()``. :issue:`461` |
| 607 |
- Redesign the shell completion system. :issue:`1484`, :pr:`1622` |
| 608 |
|
| 609 |
- Support Bash >= 4.4, Zsh, and Fish, with the ability for |
| 610 |
extensions to add support for other shells. |
| 611 |
- Allow commands, groups, parameters, and types to override their |
| 612 |
completions suggestions. |
| 613 |
- Groups complete the names commands were registered with, which |
| 614 |
can differ from the name they were created with. |
| 615 |
- The ``autocompletion`` parameter for options and arguments is |
| 616 |
renamed to ``shell_complete``. The function must take |
| 617 |
``ctx, param, incomplete``, must do matching rather than return |
| 618 |
all values, and must return a list of strings or a list of |
| 619 |
``CompletionItem``. The old name and behavior is deprecated and |
| 620 |
will be removed in 8.1. |
| 621 |
- The env var values used to start completion have changed order. |
| 622 |
The shell now comes first, such as ``{shell}_source`` rather |
| 623 |
than ``source_{shell}``, and is always required. |
| 624 |
|
| 625 |
- Completion correctly parses command line strings with incomplete |
| 626 |
quoting or escape sequences. :issue:`1708` |
| 627 |
- Extra context settings (``obj=...``, etc.) are passed on to the |
| 628 |
completion system. :issue:`942` |
| 629 |
- Include ``--help`` option in completion. :pr:`1504` |
| 630 |
- ``ParameterSource`` is an ``enum.Enum`` subclass. :issue:`1530` |
| 631 |
- Boolean and UUID types strip surrounding space before converting. |
| 632 |
:issue:`1605` |
| 633 |
- Adjusted error message from parameter type validation to be more |
| 634 |
consistent. Quotes are used to distinguish the invalid value. |
| 635 |
:issue:`1605` |
| 636 |
- The default value for a parameter with ``nargs`` > 1 and |
| 637 |
``multiple=True`` must be a list of tuples. :issue:`1649` |
| 638 |
- When getting the value for a parameter, the default is tried in the |
| 639 |
same section as other sources to ensure consistent processing. |
| 640 |
:issue:`1649` |
| 641 |
- All parameter types accept a value that is already the correct type. |
| 642 |
:issue:`1649` |
| 643 |
- For shell completion, an argument is considered incomplete if its |
| 644 |
value did not come from the command line args. :issue:`1649` |
| 645 |
- Added ``ParameterSource.PROMPT`` to track parameter values that were |
| 646 |
prompted for. :issue:`1649` |
| 647 |
- Options with ``nargs`` > 1 no longer raise an error if a default is |
| 648 |
not given. Parameters with ``nargs`` > 1 default to ``None``, and |
| 649 |
parameters with ``multiple=True`` or ``nargs=-1`` default to an |
| 650 |
empty tuple. :issue:`472` |
| 651 |
- Handle empty env vars as though the option were not passed. This |
| 652 |
extends the change introduced in 7.1 to be consistent in more cases. |
| 653 |
:issue:`1285` |
| 654 |
- ``Parameter.get_default()`` checks ``Context.default_map`` to |
| 655 |
handle overrides consistently in help text, ``invoke()``, and |
| 656 |
prompts. :issue:`1548` |
| 657 |
- Add ``prompt_required`` param to ``Option``. When set to ``False``, |
| 658 |
the user will only be prompted for an input if no value was passed. |
| 659 |
:issue:`736` |
| 660 |
- Providing the value to an option can be made optional through |
| 661 |
``is_flag=False``, and the value can instead be prompted for or |
| 662 |
passed in as a default value. |
| 663 |
:issue:`549, 736, 764, 921, 1015, 1618` |
| 664 |
- Fix formatting when ``Command.options_metavar`` is empty. :pr:`1551` |
| 665 |
- Revert adding space between option help text that wraps. |
| 666 |
:issue:`1831` |
| 667 |
- The default value passed to ``prompt`` will be cast to the correct |
| 668 |
type like an input value would be. :pr:`1517` |
| 669 |
- Automatically generated short help messages will stop at the first |
| 670 |
ending of a phrase or double linebreak. :issue:`1082` |
| 671 |
- Skip progress bar render steps for efficiency with very fast |
| 672 |
iterators by setting ``update_min_steps``. :issue:`676` |
| 673 |
- Respect ``case_sensitive=False`` when doing shell completion for |
| 674 |
``Choice`` :issue:`1692` |
| 675 |
- Use ``mkstemp()`` instead of ``mktemp()`` in pager implementation. |
| 676 |
:issue:`1752` |
| 677 |
- If ``Option.show_default`` is a string, it is displayed even if |
| 678 |
``default`` is ``None``. :issue:`1732` |
| 679 |
- ``click.get_terminal_size()`` is deprecated and will be removed in |
| 680 |
8.1. Use :func:`shutil.get_terminal_size` instead. :issue:`1736` |
| 681 |
- Control the location of the temporary directory created by |
| 682 |
``CLIRunner.isolated_filesystem`` by passing ``temp_dir``. A custom |
| 683 |
directory will not be removed automatically. :issue:`395` |
| 684 |
- ``click.confirm()`` will prompt until input is given if called with |
| 685 |
``default=None``. :issue:`1381` |
| 686 |
- Option prompts validate the value with the option's callback in |
| 687 |
addition to its type. :issue:`457` |
| 688 |
- ``confirmation_prompt`` can be set to a custom string. :issue:`723` |
| 689 |
- Allow styled output in Jupyter on Windows. :issue:`1271` |
| 690 |
- ``style()`` supports the ``strikethrough``, ``italic``, and |
| 691 |
``overline`` styles. :issue:`805, 1821` |
| 692 |
- Multiline marker is removed from short help text. :issue:`1597` |
| 693 |
- Restore progress bar behavior of echoing only the label if the file |
| 694 |
is not a TTY. :issue:`1138` |
| 695 |
- Progress bar output is shown even if execution time is less than 0.5 |
| 696 |
seconds. :issue:`1648` |
| 697 |
- Progress bar ``item_show_func`` shows the current item, not the |
| 698 |
previous item. :issue:`1353` |
| 699 |
- The ``Path`` param type can be passed ``path_type=pathlib.Path`` to |
| 700 |
return a path object instead of a string. :issue:`405` |
| 701 |
- ``TypeError`` is raised when parameter with ``multiple=True`` or |
| 702 |
``nargs > 1`` has non-iterable default. :issue:`1749` |
| 703 |
- Add a ``pass_meta_key`` decorator for passing a key from |
| 704 |
``Context.meta``. This is useful for extensions using ``meta`` to |
| 705 |
store information. :issue:`1739` |
| 706 |
- ``Path`` ``resolve_path`` resolves symlinks on Windows Python < 3.8. |
| 707 |
:issue:`1813` |
| 708 |
- Command deprecation notice appears at the start of the help text, as |
| 709 |
well as in the short help. The notice is not in all caps. |
| 710 |
:issue:`1791` |
| 711 |
- When taking arguments from ``sys.argv`` on Windows, glob patterns, |
| 712 |
user dir, and env vars are expanded. :issue:`1096` |
| 713 |
- Marked messages shown by the CLI with ``gettext()`` to allow |
| 714 |
applications to translate Click's built-in strings. :issue:`303` |
| 715 |
- Writing invalid characters to ``stderr`` when using the test runner |
| 716 |
does not raise a ``UnicodeEncodeError``. :issue:`848` |
| 717 |
- Fix an issue where ``readline`` would clear the entire ``prompt()`` |
| 718 |
line instead of only the input when pressing backspace. :issue:`665` |
| 719 |
- Add all kwargs passed to ``Context.invoke()`` to ``ctx.params``. |
| 720 |
Fixes an inconsistency when nesting ``Context.forward()`` calls. |
| 721 |
:issue:`1568` |
| 722 |
- The ``MultiCommand.resultcallback`` decorator is renamed to |
| 723 |
``result_callback``. The old name is deprecated. :issue:`1160` |
| 724 |
- Fix issues with ``CliRunner`` output when using ``echo_stdin=True``. |
| 725 |
:issue:`1101` |
| 726 |
- Fix a bug of ``click.utils.make_default_short_help`` for which the |
| 727 |
returned string could be as long as ``max_width + 3``. :issue:`1849` |
| 728 |
- When defining a parameter, ``default`` is validated with |
| 729 |
``multiple`` and ``nargs``. More validation is done for values being |
| 730 |
processed as well. :issue:`1806` |
| 731 |
- ``HelpFormatter.write_text`` uses the full line width when wrapping |
| 732 |
text. :issue:`1871` |
| 733 |
|
| 734 |
|
| 735 |
Version 7.1.2 |
| 736 |
------------- |
| 737 |
|
| 738 |
Released 2020-04-27 |
| 739 |
|
| 740 |
- Revert applying shell quoting to commands for ``echo_with_pager`` |
| 741 |
and ``edit``. This was intended to allows spaces in commands, but |
| 742 |
caused issues if the string was actually a command and arguments, or |
| 743 |
on Windows. Instead, the string must be quoted manually as it should |
| 744 |
appear on the command line. :issue:`1514` |
| 745 |
|
| 746 |
|
| 747 |
Version 7.1.1 |
| 748 |
------------- |
| 749 |
|
| 750 |
Released 2020-03-09 |
| 751 |
|
| 752 |
- Fix ``ClickException`` output going to stdout instead of stderr. |
| 753 |
:issue:`1495` |
| 754 |
|
| 755 |
|
| 756 |
Version 7.1 |
| 757 |
----------- |
| 758 |
|
| 759 |
Released 2020-03-09 |
| 760 |
|
| 761 |
- Fix PyPI package name, "click" is lowercase again. |
| 762 |
- Fix link in ``unicode_literals`` error message. :pr:`1151` |
| 763 |
- Add support for colored output on UNIX Jupyter notebooks. |
| 764 |
:issue:`1185` |
| 765 |
- Operations that strip ANSI controls will strip the cursor hide/show |
| 766 |
sequences. :issue:`1216` |
| 767 |
- Remove unused compat shim for ``bytes``. :pr:`1195` |
| 768 |
- Expand testing around termui, especially getchar on Windows. |
| 769 |
:issue:`1116` |
| 770 |
- Fix output on Windows Python 2.7 built with MSVC 14. :pr:`1342` |
| 771 |
- Fix ``OSError`` when running in MSYS2. :issue:`1338` |
| 772 |
- Fix ``OSError`` when redirecting to ``NUL`` stream on Windows. |
| 773 |
:issue:`1065` |
| 774 |
- Fix memory leak when parsing Unicode arguments on Windows. |
| 775 |
:issue:`1136` |
| 776 |
- Fix error in new AppEngine environments. :issue:`1462` |
| 777 |
- Always return one of the passed choices for ``click.Choice`` |
| 778 |
:issue:`1277`, :pr:`1318` |
| 779 |
- Add ``no_args_is_help`` option to ``click.Command``, defaults to |
| 780 |
False :pr:`1167` |
| 781 |
- Add ``show_default`` parameter to ``Context`` to enable showing |
| 782 |
defaults globally. :issue:`1018` |
| 783 |
- Handle ``env MYPATH=''`` as though the option were not passed. |
| 784 |
:issue:`1196` |
| 785 |
- It is once again possible to call ``next(bar)`` on an active |
| 786 |
progress bar instance. :issue:`1125` |
| 787 |
- ``open_file`` with ``atomic=True`` retains permissions of existing |
| 788 |
files and respects the current umask for new files. :issue:`1376` |
| 789 |
- When using the test ``CliRunner`` with ``mix_stderr=False``, if |
| 790 |
``result.stderr`` is empty it will not raise a ``ValueError``. |
| 791 |
:issue:`1193` |
| 792 |
- Remove the unused ``mix_stderr`` parameter from |
| 793 |
``CliRunner.invoke``. :issue:`1435` |
| 794 |
- Fix ``TypeError`` raised when using bool flags and specifying |
| 795 |
``type=bool``. :issue:`1287` |
| 796 |
- Newlines in option help text are replaced with spaces before |
| 797 |
re-wrapping to avoid uneven line breaks. :issue:`834` |
| 798 |
- ``MissingParameter`` exceptions are printable in the Python |
| 799 |
interpreter. :issue:`1139` |
| 800 |
- Fix how default values for file-type options are shown during |
| 801 |
prompts. :issue:`914` |
| 802 |
- Fix environment variable automatic generation for commands |
| 803 |
containing ``-``. :issue:`1253` |
| 804 |
- Option help text replaces newlines with spaces when rewrapping, but |
| 805 |
preserves paragraph breaks, fixing multiline formatting. |
| 806 |
:issue:`834, 1066, 1397` |
| 807 |
- Option help text that is wrapped adds an extra newline at the end to |
| 808 |
distinguish it from the next option. :issue:`1075` |
| 809 |
- Consider ``sensible-editor`` when determining the editor to use for |
| 810 |
``click.edit()``. :pr:`1469` |
| 811 |
- Arguments to system calls such as the executable path passed to |
| 812 |
``click.edit`` can contains spaces. :pr:`1470` |
| 813 |
- Add ZSH completion autoloading and error handling. :issue:`1348` |
| 814 |
- Add a repr to ``Command``, ``Group``, ``Option``, and ``Argument``, |
| 815 |
showing the name for friendlier debugging. :issue:`1267` |
| 816 |
- Completion doesn't consider option names if a value starts with |
| 817 |
``-`` after the ``--`` separator. :issue:`1247` |
| 818 |
- ZSH completion escapes special characters in values. :pr:`1418` |
| 819 |
- Add completion support for Fish shell. :pr:`1423` |
| 820 |
- Decoding bytes option values falls back to UTF-8 in more cases. |
| 821 |
:pr:`1468` |
| 822 |
- Make the warning about old 2-arg parameter callbacks a deprecation |
| 823 |
warning, to be removed in 8.0. This has been a warning since Click |
| 824 |
2.0. :pr:`1492` |
| 825 |
- Adjust error messages to standardize the types of quotes used so |
| 826 |
they match error messages from Python. |
| 827 |
|
| 828 |
|
| 829 |
Version 7.0 |
| 830 |
----------- |
| 831 |
|
| 832 |
Released 2018-09-25 |
| 833 |
|
| 834 |
- Drop support for Python 2.6 and 3.3. :pr:`967, 976` |
| 835 |
- Wrap ``click.Choice``'s missing message. :issue:`202`, :pr:`1000` |
| 836 |
- Add native ZSH autocompletion support. :issue:`323`, :pr:`865` |
| 837 |
- Document that ANSI color info isn't parsed from bytearrays in Python |
| 838 |
2. :issue:`334` |
| 839 |
- Document byte-stripping behavior of ``CliRunner``. :issue:`334`, |
| 840 |
:pr:`1010` |
| 841 |
- Usage errors now hint at the ``--help`` option. :issue:`393`, |
| 842 |
:pr:`557` |
| 843 |
- Implement streaming pager. :issue:`409`, :pr:`889` |
| 844 |
- Extract bar formatting to its own method. :pr:`414` |
| 845 |
- Add ``DateTime`` type for converting input in given date time |
| 846 |
formats. :pr:`423` |
| 847 |
- ``secho``'s first argument can now be ``None``, like in ``echo``. |
| 848 |
:pr:`424` |
| 849 |
- Fixes a ``ZeroDivisionError`` in ``ProgressBar.make_step``, when the |
| 850 |
arg passed to the first call of ``ProgressBar.update`` is 0. |
| 851 |
:issue:`447`, :pr:`1012` |
| 852 |
- Show progressbar only if total execution time is visible. :pr:`487` |
| 853 |
- Added the ability to hide commands and options from help. :pr:`500` |
| 854 |
- Document that options can be ``required=True``. :issue:`514`, |
| 855 |
:pr:`1022` |
| 856 |
- Non-standalone calls to ``Context.exit`` return the exit code, |
| 857 |
rather than calling ``sys.exit``. :issue:`667`, :pr:`533, 1098` |
| 858 |
- ``click.getchar()`` returns Unicode in Python 3 on Windows, |
| 859 |
consistent with other platforms. :issue:`537, 821, 822, 1088`, |
| 860 |
:pr:`1108` |
| 861 |
- Added ``FloatRange`` type. :pr:`538, 553` |
| 862 |
- Added support for bash completion of ``type=click.Choice`` for |
| 863 |
``Options`` and ``Arguments``. :issue:`535`, :pr:`681` |
| 864 |
- Only allow one positional arg for ``Argument`` parameter |
| 865 |
declaration. :issue:`568, 574`, :pr:`1014` |
| 866 |
- Add ``case_sensitive=False`` as an option to Choice. :issue:`569` |
| 867 |
- ``click.getchar()`` correctly raises ``KeyboardInterrupt`` on "^C" |
| 868 |
and ``EOFError`` on "^D" on Linux. :issue:`583`, :pr:`1115` |
| 869 |
- Fix encoding issue with ``click.getchar(echo=True)`` on Linux. |
| 870 |
:pr:`1115` |
| 871 |
- ``param_hint`` in errors now derived from param itself. |
| 872 |
:issue:`598, 704`, :pr:`709` |
| 873 |
- Add a test that ensures that when an argument is formatted into a |
| 874 |
usage error, its metavar is used, not its name. :pr:`612` |
| 875 |
- Allow setting ``prog_name`` as extra in ``CliRunner.invoke``. |
| 876 |
:issue:`616`, :pr:`999` |
| 877 |
- Help text taken from docstrings truncates at the ``\f`` form feed |
| 878 |
character, useful for hiding Sphinx-style parameter documentation. |
| 879 |
:pr:`629, 1091` |
| 880 |
- ``launch`` now works properly under Cygwin. :pr:`650` |
| 881 |
- Update progress after iteration. :issue:`651`, :pr:`706` |
| 882 |
- ``CliRunner.invoke`` now may receive ``args`` as a string |
| 883 |
representing a Unix shell command. :pr:`664` |
| 884 |
- Make ``Argument.make_metavar()`` default to type metavar. :pr:`675` |
| 885 |
- Add documentation for ``ignore_unknown_options``. :pr:`684` |
| 886 |
- Add bright colors support for ``click.style`` and fix the reset |
| 887 |
option for parameters ``fg`` and ``bg``. :issue:`703`, :pr:`809` |
| 888 |
- Add ``show_envvar`` for showing environment variables in help. |
| 889 |
:pr:`710` |
| 890 |
- Avoid ``BrokenPipeError`` during interpreter shutdown when stdout or |
| 891 |
stderr is a closed pipe. :issue:`712`, :pr:`1106` |
| 892 |
- Document customizing option names. :issue:`725`, :pr:`1016` |
| 893 |
- Disable ``sys._getframes()`` on Python interpreters that don't |
| 894 |
support it. :pr:`728` |
| 895 |
- Fix bug in test runner when calling ``sys.exit`` with ``None``. |
| 896 |
:pr:`739` |
| 897 |
- Clarify documentation on command line options. :issue:`741`, |
| 898 |
:pr:`1003` |
| 899 |
- Fix crash on Windows console. :issue:`744` |
| 900 |
- Fix bug that caused bash completion to give improper completions on |
| 901 |
chained commands. :issue:`754`, :pr:`774` |
| 902 |
- Added support for dynamic bash completion from a user-supplied |
| 903 |
callback. :pr:`755` |
| 904 |
- Added support for bash completions containing spaces. :pr:`773` |
| 905 |
- Allow autocompletion function to determine whether or not to return |
| 906 |
completions that start with the incomplete argument. :issue:`790`, |
| 907 |
:pr:`806` |
| 908 |
- Fix option naming routine to match documentation and be |
| 909 |
deterministic. :issue:`793`, :pr:`794` |
| 910 |
- Fix path validation bug. :issue:`795`, :pr:`1020` |
| 911 |
- Add test and documentation for ``Option`` naming: functionality. |
| 912 |
:pr:`799` |
| 913 |
- Update doc to match arg name for ``path_type``. :pr:`801` |
| 914 |
- Raw strings added so correct escaping occurs. :pr:`807` |
| 915 |
- Fix 16k character limit of ``click.echo`` on Windows. :issue:`816`, |
| 916 |
:pr:`819` |
| 917 |
- Overcome 64k character limit when writing to binary stream on |
| 918 |
Windows 7. :issue:`825`, :pr:`830` |
| 919 |
- Add bool conversion for "t" and "f". :pr:`842` |
| 920 |
- ``NoSuchOption`` errors take ``ctx`` so that ``--help`` hint gets |
| 921 |
printed in error output. :pr:`860` |
| 922 |
- Fixed the behavior of Click error messages with regards to Unicode |
| 923 |
on 2.x and 3.x. Message is now always Unicode and the str and |
| 924 |
Unicode special methods work as you expect on that platform. |
| 925 |
:issue:`862` |
| 926 |
- Progress bar now uses stderr by default. :pr:`863` |
| 927 |
- Add support for auto-completion documentation. :issue:`866`, |
| 928 |
:pr:`869` |
| 929 |
- Allow ``CliRunner`` to separate stdout and stderr. :pr:`868` |
| 930 |
- Fix variable precedence. :issue:`873`, :pr:`874` |
| 931 |
- Fix invalid escape sequences. :pr:`877` |
| 932 |
- Fix ``ResourceWarning`` that occurs during some tests. :pr:`878` |
| 933 |
- When detecting a misconfigured locale, don't fail if the ``locale`` |
| 934 |
command fails. :pr:`880` |
| 935 |
- Add ``case_sensitive=False`` as an option to ``Choice`` types. |
| 936 |
:pr:`887` |
| 937 |
- Force stdout/stderr writable. This works around issues with badly |
| 938 |
patched standard streams like those from Jupyter. :pr:`918` |
| 939 |
- Fix completion of subcommand options after last argument |
| 940 |
:issue:`919`, :pr:`930` |
| 941 |
- ``_AtomicFile`` now uses the ``realpath`` of the original filename |
| 942 |
so that changing the working directory does not affect it. :pr:`920` |
| 943 |
- Fix incorrect completions when defaults are present :issue:`925`, |
| 944 |
:pr:`930` |
| 945 |
- Add copy option attrs so that custom classes can be re-used. |
| 946 |
:issue:`926`, :pr:`994` |
| 947 |
- "x" and "a" file modes now use stdout when file is ``"-"``. |
| 948 |
:pr:`929` |
| 949 |
- Fix missing comma in ``__all__`` list. :pr:`935` |
| 950 |
- Clarify how parameters are named. :issue:`949`, :pr:`1009` |
| 951 |
- Stdout is now automatically set to non blocking. :pr:`954` |
| 952 |
- Do not set options twice. :pr:`962` |
| 953 |
- Move ``fcntl`` import. :pr:`965` |
| 954 |
- Fix Google App Engine ``ImportError``. :pr:`995` |
| 955 |
- Better handling of help text for dynamic default option values. |
| 956 |
:pr:`996` |
| 957 |
- Fix ``get_winter_size()`` so it correctly returns ``(0,0)``. |
| 958 |
:pr:`997` |
| 959 |
- Add test case checking for custom param type. :pr:`1001` |
| 960 |
- Allow short width to address cmd formatting. :pr:`1002` |
| 961 |
- Add details about Python version support. :pr:`1004` |
| 962 |
- Added deprecation flag to commands. :pr:`1005` |
| 963 |
- Fixed issues where ``fd`` was undefined. :pr:`1007` |
| 964 |
- Fix formatting for short help. :pr:`1008` |
| 965 |
- Document how ``auto_envvar_prefix`` works with command groups. |
| 966 |
:pr:`1011` |
| 967 |
- Don't add newlines by default for progress bars. :pr:`1013` |
| 968 |
- Use Python sorting order for ZSH completions. :issue:`1047`, |
| 969 |
:pr:`1059` |
| 970 |
- Document that parameter names are converted to lowercase by default. |
| 971 |
:pr:`1055` |
| 972 |
- Subcommands that are named by the function now automatically have |
| 973 |
the underscore replaced with a dash. If you register a function |
| 974 |
named ``my_command`` it becomes ``my-command`` in the command line |
| 975 |
interface. |
| 976 |
- Hide hidden commands and options from completion. :issue:`1058`, |
| 977 |
:pr:`1061` |
| 978 |
- Fix absolute import blocking Click from being vendored into a |
| 979 |
project on Windows. :issue:`1068`, :pr:`1069` |
| 980 |
- Fix issue where a lowercase ``auto_envvar_prefix`` would not be |
| 981 |
converted to uppercase. :pr:`1105` |
| 982 |
|
| 983 |
|
| 984 |
Version 6.7 |
| 985 |
----------- |
| 986 |
|
| 987 |
Released 2017-01-06 |
| 988 |
|
| 989 |
- Make ``click.progressbar`` work with ``codecs.open`` files. |
| 990 |
:pr:`637` |
| 991 |
- Fix bug in bash completion with nested subcommands. :pr:`639` |
| 992 |
- Fix test runner not saving caller env correctly. :pr:`644` |
| 993 |
- Fix handling of SIGPIPE. :pr:`62` |
| 994 |
- Deal with broken Windows environments such as Google App Engine's. |
| 995 |
:issue:`711` |
| 996 |
|
| 997 |
|
| 998 |
Version 6.6 |
| 999 |
----------- |
| 1000 |
|
| 1001 |
Released 2016-04-04 |
| 1002 |
|
| 1003 |
- Fix bug in ``click.Path`` where it would crash when passed a ``-``. |
| 1004 |
:issue:`551` |
| 1005 |
|
| 1006 |
|
| 1007 |
Version 6.4 |
| 1008 |
----------- |
| 1009 |
|
| 1010 |
Released 2016-03-24 |
| 1011 |
|
| 1012 |
- Fix bug in bash completion where click would discard one or more |
| 1013 |
trailing arguments. :issue:`471` |
| 1014 |
|
| 1015 |
|
| 1016 |
Version 6.3 |
| 1017 |
----------- |
| 1018 |
|
| 1019 |
Released 2016-02-22 |
| 1020 |
|
| 1021 |
- Fix argument checks for interpreter invoke with ``-m`` and ``-c`` on |
| 1022 |
Windows. |
| 1023 |
- Fixed a bug that cased locale detection to error out on Python 3. |
| 1024 |
|
| 1025 |
|
| 1026 |
Version 6.2 |
| 1027 |
----------- |
| 1028 |
|
| 1029 |
Released 2015-11-27 |
| 1030 |
|
| 1031 |
- Correct fix for hidden progress bars. |
| 1032 |
|
| 1033 |
|
| 1034 |
Version 6.1 |
| 1035 |
----------- |
| 1036 |
|
| 1037 |
Released 2015-11-27 |
| 1038 |
|
| 1039 |
- Resolved an issue with invisible progress bars no longer rendering. |
| 1040 |
- Disable chain commands with subcommands as they were inherently |
| 1041 |
broken. |
| 1042 |
- Fix ``MissingParameter`` not working without parameters passed. |
| 1043 |
|
| 1044 |
|
| 1045 |
Version 6.0 |
| 1046 |
----------- |
| 1047 |
|
| 1048 |
Released 2015-11-24, codename "pow pow" |
| 1049 |
|
| 1050 |
- Optimized the progressbar rendering to not render when it did not |
| 1051 |
actually change. |
| 1052 |
- Explicitly disallow ``nargs=-1`` with a set default. |
| 1053 |
- The context is now closed before it's popped from the stack. |
| 1054 |
- Added support for short aliases for the false flag on toggles. |
| 1055 |
- Click will now attempt to aid you with debugging locale errors |
| 1056 |
better by listing with the help of the OS what locales are |
| 1057 |
available. |
| 1058 |
- Click used to return byte strings on Python 2 in some unit-testing |
| 1059 |
situations. This has been fixed to correctly return unicode strings |
| 1060 |
now. |
| 1061 |
- For Windows users on Python 2, Click will now handle Unicode more |
| 1062 |
correctly handle Unicode coming in from the system. This also has |
| 1063 |
the disappointing side effect that filenames will now be always |
| 1064 |
unicode by default in the ``Path`` type which means that this can |
| 1065 |
introduce small bugs for code not aware of this. |
| 1066 |
- Added a ``type`` parameter to ``Path`` to force a specific string |
| 1067 |
type on the value. |
| 1068 |
- For users running Python on Windows the ``echo`` and ``prompt`` |
| 1069 |
functions now work with full unicode functionality in the Python |
| 1070 |
windows console by emulating an output stream. This also applies to |
| 1071 |
getting the virtual output and input streams via |
| 1072 |
``click.get_text_stream(...)``. |
| 1073 |
- Unittests now always force a certain virtual terminal width. |
| 1074 |
- Added support for allowing dashes to indicate standard streams to |
| 1075 |
the ``Path`` type. |
| 1076 |
- Multi commands in chain mode no longer propagate arguments left over |
| 1077 |
from parsing to the callbacks. It's also now disallowed through an |
| 1078 |
exception when optional arguments are attached to multi commands if |
| 1079 |
chain mode is enabled. |
| 1080 |
- Relaxed restriction that disallowed chained commands to have other |
| 1081 |
chained commands as child commands. |
| 1082 |
- Arguments with positive nargs can now have defaults implemented. |
| 1083 |
Previously this configuration would often result in slightly |
| 1084 |
unexpected values be returned. |
| 1085 |
|
| 1086 |
|
| 1087 |
Version 5.1 |
| 1088 |
----------- |
| 1089 |
|
| 1090 |
Released 2015-08-17 |
| 1091 |
|
| 1092 |
- Fix a bug in ``pass_obj`` that would accidentally pass the context |
| 1093 |
too. |
| 1094 |
|
| 1095 |
|
| 1096 |
Version 5.0 |
| 1097 |
----------- |
| 1098 |
|
| 1099 |
Released 2015-08-16, codename "tok tok" |
| 1100 |
|
| 1101 |
- Removed various deprecated functionality. |
| 1102 |
- Atomic files now only accept the ``w`` mode. |
| 1103 |
- Change the usage part of help output for very long commands to wrap |
| 1104 |
their arguments onto the next line, indented by 4 spaces. |
| 1105 |
- Fix a bug where return code and error messages were incorrect when |
| 1106 |
using ``CliRunner``. |
| 1107 |
- Added ``get_current_context``. |
| 1108 |
- Added a ``meta`` dictionary to the context which is shared across |
| 1109 |
the linked list of contexts to allow click utilities to place state |
| 1110 |
there. |
| 1111 |
- Introduced ``Context.scope``. |
| 1112 |
- The ``echo`` function is now threadsafe: It calls the ``write`` |
| 1113 |
method of the underlying object only once. |
| 1114 |
- ``prompt(hide_input=True)`` now prints a newline on ``^C``. |
| 1115 |
- Click will now warn if users are using ``unicode_literals``. |
| 1116 |
- Click will now ignore the ``PAGER`` environment variable if it is |
| 1117 |
empty or contains only whitespace. |
| 1118 |
- The ``click-contrib`` GitHub organization was created. |
| 1119 |
|
| 1120 |
|
| 1121 |
Version 4.1 |
| 1122 |
----------- |
| 1123 |
|
| 1124 |
Released 2015-07-14 |
| 1125 |
|
| 1126 |
- Fix a bug where error messages would include a trailing ``None`` |
| 1127 |
string. |
| 1128 |
- Fix a bug where Click would crash on docstrings with trailing |
| 1129 |
newlines. |
| 1130 |
- Support streams with encoding set to ``None`` on Python 3 by barfing |
| 1131 |
with a better error. |
| 1132 |
- Handle ^C in less-pager properly. |
| 1133 |
- Handle return value of ``None`` from ``sys.getfilesystemencoding`` |
| 1134 |
- Fix crash when writing to unicode files with ``click.echo``. |
| 1135 |
- Fix type inference with multiple options. |
| 1136 |
|
| 1137 |
|
| 1138 |
Version 4.0 |
| 1139 |
----------- |
| 1140 |
|
| 1141 |
Released 2015-03-31, codename "zoom zoom" |
| 1142 |
|
| 1143 |
- Added ``color`` parameters to lots of interfaces that directly or |
| 1144 |
indirectly call into echoing. This previously was always |
| 1145 |
autodetection (with the exception of the ``echo_via_pager`` |
| 1146 |
function). Now you can forcefully enable or disable it, overriding |
| 1147 |
the auto detection of Click. |
| 1148 |
- Added an ``UNPROCESSED`` type which does not perform any type |
| 1149 |
changes which simplifies text handling on 2.x / 3.x in some special |
| 1150 |
advanced usecases. |
| 1151 |
- Added ``NoSuchOption`` and ``BadOptionUsage`` exceptions for more |
| 1152 |
generic handling of errors. |
| 1153 |
- Added support for handling of unprocessed options which can be |
| 1154 |
useful in situations where arguments are forwarded to underlying |
| 1155 |
tools. |
| 1156 |
- Added ``max_content_width`` parameter to the context which can be |
| 1157 |
used to change the maximum width of help output. By default Click |
| 1158 |
will not format content for more than 80 characters width. |
| 1159 |
- Added support for writing prompts to stderr. |
| 1160 |
- Fix a bug when showing the default for multiple arguments. |
| 1161 |
- Added support for custom subclasses to ``option`` and ``argument``. |
| 1162 |
- Fix bug in ``clear()`` on Windows when colorama is installed. |
| 1163 |
- Reject ``nargs=-1`` for options properly. Options cannot be |
| 1164 |
variadic. |
| 1165 |
- Fixed an issue with bash completion not working properly for |
| 1166 |
commands with non ASCII characters or dashes. |
| 1167 |
- Added a way to manually update the progressbar. |
| 1168 |
- Changed the formatting of missing arguments. Previously the internal |
| 1169 |
argument name was shown in error messages, now the metavar is shown |
| 1170 |
if passed. In case an automated metavar is selected, it's stripped |
| 1171 |
of extra formatting first. |
| 1172 |
|
| 1173 |
|
| 1174 |
Version 3.3 |
| 1175 |
----------- |
| 1176 |
|
| 1177 |
Released 2014-09-08 |
| 1178 |
|
| 1179 |
- Fixed an issue with error reporting on Python 3 for invalid |
| 1180 |
forwarding of commands. |
| 1181 |
|
| 1182 |
|
| 1183 |
Version 3.2 |
| 1184 |
----------- |
| 1185 |
|
| 1186 |
Released 2014-08-22 |
| 1187 |
|
| 1188 |
- Added missing ``err`` parameter forwarding to the ``secho`` |
| 1189 |
function. |
| 1190 |
- Fixed default parameters not being handled properly by the context |
| 1191 |
invoke method. This is a backwards incompatible change if the |
| 1192 |
function was used improperly. |
| 1193 |
- Removed the ``invoked_subcommands`` attribute largely. It is not |
| 1194 |
possible to provide it to work error free due to how the parsing |
| 1195 |
works so this API has been deprecated. |
| 1196 |
- Restored the functionality of ``invoked_subcommand`` which was |
| 1197 |
broken as a regression in 3.1. |
| 1198 |
|
| 1199 |
|
| 1200 |
Version 3.1 |
| 1201 |
----------- |
| 1202 |
|
| 1203 |
Released 2014-08-13 |
| 1204 |
|
| 1205 |
- Fixed a regression that caused contexts of subcommands to be created |
| 1206 |
before the parent command was invoked which was a regression from |
| 1207 |
earlier Click versions. |
| 1208 |
|
| 1209 |
|
| 1210 |
Version 3.0 |
| 1211 |
----------- |
| 1212 |
|
| 1213 |
Released 2014-08-12, codename "clonk clonk" |
| 1214 |
|
| 1215 |
- Formatter now no longer attempts to accommodate for terminals |
| 1216 |
smaller than 50 characters. If that happens it just assumes a |
| 1217 |
minimal width. |
| 1218 |
- Added a way to not swallow exceptions in the test system. |
| 1219 |
- Added better support for colors with pagers and ways to override the |
| 1220 |
autodetection. |
| 1221 |
- The CLI runner's result object now has a traceback attached. |
| 1222 |
- Improved automatic short help detection to work better with dots |
| 1223 |
that do not terminate sentences. |
| 1224 |
- When defining options without actual valid option strings now, |
| 1225 |
Click will give an error message instead of silently passing. This |
| 1226 |
should catch situations where users wanted to created arguments |
| 1227 |
instead of options. |
| 1228 |
- Restructured Click internally to support vendoring. |
| 1229 |
- Added support for multi command chaining. |
| 1230 |
- Added support for defaults on options with ``multiple`` and options |
| 1231 |
and arguments with ``nargs != 1``. |
| 1232 |
- Label passed to ``progressbar`` is no longer rendered with |
| 1233 |
whitespace stripped. |
| 1234 |
- Added a way to disable the standalone mode of the ``main`` method on |
| 1235 |
a Click command to be able to handle errors better. |
| 1236 |
- Added support for returning values from command callbacks. |
| 1237 |
- Added simplifications for printing to stderr from ``echo``. |
| 1238 |
- Added result callbacks for groups. |
| 1239 |
- Entering a context multiple times defers the cleanup until the last |
| 1240 |
exit occurs. |
| 1241 |
- Added ``open_file``. |
| 1242 |
|
| 1243 |
|
| 1244 |
Version 2.6 |
| 1245 |
----------- |
| 1246 |
|
| 1247 |
Released 2014-08-11 |
| 1248 |
|
| 1249 |
- Fixed an issue where the wrapped streams on Python 3 would be |
| 1250 |
reporting incorrect values for seekable. |
| 1251 |
|
| 1252 |
|
| 1253 |
Version 2.5 |
| 1254 |
----------- |
| 1255 |
|
| 1256 |
Released 2014-07-28 |
| 1257 |
|
| 1258 |
- Fixed a bug with text wrapping on Python 3. |
| 1259 |
|
| 1260 |
|
| 1261 |
Version 2.4 |
| 1262 |
----------- |
| 1263 |
|
| 1264 |
Released 2014-07-04 |
| 1265 |
|
| 1266 |
- Corrected a bug in the change of the help option in 2.3. |
| 1267 |
|
| 1268 |
|
| 1269 |
Version 2.3 |
| 1270 |
----------- |
| 1271 |
|
| 1272 |
Released 2014-07-03 |
| 1273 |
|
| 1274 |
- Fixed an incorrectly formatted help record for count options. |
| 1275 |
- Add support for ansi code stripping on Windows if colorama is not |
| 1276 |
available. |
| 1277 |
- Restored the Click 1.0 handling of the help parameter for certain |
| 1278 |
edge cases. |
| 1279 |
|
| 1280 |
|
| 1281 |
Version 2.2 |
| 1282 |
----------- |
| 1283 |
|
| 1284 |
Released 2014-06-26 |
| 1285 |
|
| 1286 |
- Fixed tty detection on PyPy. |
| 1287 |
- Fixed an issue that progress bars were not rendered when the context |
| 1288 |
manager was entered. |
| 1289 |
|
| 1290 |
|
| 1291 |
Version 2.1 |
| 1292 |
----------- |
| 1293 |
|
| 1294 |
Released 2014-06-14 |
| 1295 |
|
| 1296 |
- Fixed the :func:`launch` function on windows. |
| 1297 |
- Improved the colorama support on windows to try hard to not screw up |
| 1298 |
the console if the application is interrupted. |
| 1299 |
- Fixed windows terminals incorrectly being reported to be 80 |
| 1300 |
characters wide instead of 79 |
| 1301 |
- Use colorama win32 bindings if available to get the correct |
| 1302 |
dimensions of a windows terminal. |
| 1303 |
- Fixed an issue with custom function types on Python 3. |
| 1304 |
- Fixed an issue with unknown options being incorrectly reported in |
| 1305 |
error messages. |
| 1306 |
|
| 1307 |
|
| 1308 |
Version 2.0 |
| 1309 |
----------- |
| 1310 |
|
| 1311 |
Released 2014-06-06, codename "tap tap tap" |
| 1312 |
|
| 1313 |
- Added support for opening stdin/stdout on Windows in binary mode |
| 1314 |
correctly. |
| 1315 |
- Added support for atomic writes to files by going through a |
| 1316 |
temporary file. |
| 1317 |
- Introduced :exc:`BadParameter` which can be used to easily perform |
| 1318 |
custom validation with the same error messages as in the type |
| 1319 |
system. |
| 1320 |
- Added :func:`progressbar`; a function to show progress bars. |
| 1321 |
- Added :func:`get_app_dir`; a function to calculate the home folder |
| 1322 |
for configs. |
| 1323 |
- Added transparent handling for ANSI codes into the :func:`echo` |
| 1324 |
function through ``colorama``. |
| 1325 |
- Added :func:`clear` function. |
| 1326 |
- Breaking change: parameter callbacks now get the parameter object |
| 1327 |
passed as second argument. There is legacy support for old callbacks |
| 1328 |
which will warn but still execute the script. |
| 1329 |
- Added :func:`style`, :func:`unstyle` and :func:`secho` for ANSI |
| 1330 |
styles. |
| 1331 |
- Added an :func:`edit` function that invokes the default editor. |
| 1332 |
- Added an :func:`launch` function that launches browsers and |
| 1333 |
applications. |
| 1334 |
- Nargs of -1 for arguments can now be forced to be a single item |
| 1335 |
through the required flag. It defaults to not required. |
| 1336 |
- Setting a default for arguments now implicitly makes it non |
| 1337 |
required. |
| 1338 |
- Changed "yN" / "Yn" to "y/N" and "Y/n" in confirmation prompts. |
| 1339 |
- Added basic support for bash completion. |
| 1340 |
- Added :func:`getchar` to fetch a single character from the terminal. |
| 1341 |
- Errors now go to stderr as intended. |
| 1342 |
- Fixed various issues with more exotic parameter formats like |
| 1343 |
DOS/Windows style arguments. |
| 1344 |
- Added :func:`pause` which works similar to the Windows ``pause`` cmd |
| 1345 |
built-in but becomes an automatic noop if the application is not run |
| 1346 |
through a terminal. |
| 1347 |
- Added a bit of extra information about missing choice parameters. |
| 1348 |
- Changed how the help function is implemented to allow global |
| 1349 |
overriding of the help option. |
| 1350 |
- Added support for token normalization to implement case insensitive |
| 1351 |
handling. |
| 1352 |
- Added support for providing defaults for context settings. |
| 1353 |
|
| 1354 |
|
| 1355 |
Version 1.1 |
| 1356 |
----------- |
| 1357 |
|
| 1358 |
Released 2014-05-23 |
| 1359 |
|
| 1360 |
- Fixed a bug that caused text files in Python 2 to not accept native |
| 1361 |
strings. |
| 1362 |
|
| 1363 |
|
| 1364 |
Version 1.0 |
| 1365 |
----------- |
| 1366 |
|
| 1367 |
Released 2014-05-21 |
| 1368 |
|
| 1369 |
- Initial release. |