click v8.1.0 Release Notes
-
๐ Released 2022-03-28
- ๐ Drop support for Python 3.6. :pr:
2129
๐ Remove previously deprecated code. :pr:
2130
-
Group.resultcallback
is renamed toresult_callback
. -
autocompletion
parameter toCommand
is renamed toshell_complete
. -
get_terminal_size
is removed, useshutil.get_terminal_size
instead. -
get_os_args
is removed, usesys.argv[1:]
instead.
-
Rely on :pep:
538
and :pep:540
to handle selecting UTF-8 encoding instead of ASCII. Click's locale encoding detection is removed. :issue:2198
0๏ธโฃ Single options boolean flags with
show_default=True
only show the default if it isTrue
. :issue:1971
The
command
andgroup
decorators can be applied with or without parentheses. :issue:1359
The
Path
type can check whether the target is executable. :issue:1961
0๏ธโฃ
Command.show_default
overridesContext.show_default
, instead of the other way around. :issue:1963
Parameter decorators and
@group
handlescls=None
the same as not passingcls
.@option
handleshelp=None
the same as not passinghelp
. :issue:#1959
A flag option with
required=True
requires that the flag is passed instead of choosing the implicit default value. :issue:1978
Indentation in help text passed to
Option
andCommand
is cleaned the same as using the@option
and@command
decorators does. A command'sepilog
andshort_help
are also processed. :issue:1985
Store unprocessed
Command.help
,epilog
andshort_help
strings. Processing is only done when formatting help text for output. :issue:2149
Allow empty str input for
prompt()
whenconfirmation_prompt=True
anddefault=""
. :issue:2157
๐ Windows glob pattern expansion doesn't fail if a value is an invalid pattern. :issue:
2195
It's possible to pass a list of
params
to@command
. Any params defined with decorators are appended to the passed params. :issue:2131
.@command
decorator is annotated as returning the correct type if acls
argument is used. :issue:2211
A
Group
withinvoke_without_command=True
andchain=False
will invoke its result callback with the group function's return value. :issue:2124
to_info_dict
will not fail if aParamType
doesn't define aname
. :issue:2168
๐ Shell completion prioritizes option values with option prefixes over new options. :issue:
2040
Options that get an environment variable value using
autoenvvar_prefix
treat an empty value asNone
, consistent with a directenvvar
. :issue:2146
- ๐ Drop support for Python 3.6. :pr: