This is a feature release, which includes new features and removes previously deprecated features. The 8.1.x branch is now the supported bugfix branch, the 8.0.x branch will become a tag marking the end of support for that branch. We encourage everyone to upgrade, and to use a tool such as pip-tools to pin all dependencies and control upgrades.
Follow our blog, Twitter, or GitHub to see future announcements.
This represents a significant amount of work, and there are quite a few changes. Be sure to carefully read the changelog, and use tools such as pip-compile and Dependabot to pin your dependencies and control your updates.
Fix an issue with decorator typing that caused type checking to
report that a command was not callable. :issue:2227
Version 8.1.0
Released 2022-03-28
Drop support for Python 3.6. :pr:2129
Remove previously deprecated code. :pr:2130
Group.resultcallback is renamed to result_callback.
autocompletion parameter to Command is renamed to
shell_complete.
get_terminal_size is removed, use
shutil.get_terminal_size instead.
get_os_args is removed, use sys.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
Single options boolean flags with show_default=True only show
the default if it is True. :issue:1971
The command and group decorators can be applied with or
without parentheses. :issue:1359
The Path type can check whether the target is executable.
:issue:1961
Command.show_default overrides Context.show_default, instead
of the other way around. :issue:1963
Parameter decorators and @group handles cls=None the same as
not passing cls. @option handles help=None the same as
not passing help. :issue:[#1959](https://github.com/pallets/click/issues/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 and Command is
cleaned the same as using the @option and @command
decorators does. A command's epilog and short_help are also
processed. :issue:1985
Store unprocessed Command.help, epilog and short_help
strings. Processing is only done when formatting help text for
output. :issue:2149
Allow empty str input for prompt() when
confirmation_prompt=True and default="". :issue:2157
Windows glob pattern expansion doesn't fail if a value is an invalid
... (truncated)
Commits
a41e349 Merge pull request #2234 from pallets/release-8.1.1
Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
Bumps click from 7.1.2 to 8.1.1.
Release notes
Sourced from click's releases.
Changelog
Sourced from click's changelog.
... (truncated)
Commits
a41e349
Merge pull request #2234 from pallets/release-8.1.13c301eb
release version 8.1.1d5741a2
Merge pull request #2233 from henryiii/henryiii/fix/commandtypee234cf9
fix(types): decorator typing failsfb7c6db
start version 8.1.1e4aceee
Merge pull request #2224 from pallets/release-8.1.0f8d811e
release version 8.1.020c88f0
Merge pull request #2223 from pallets/env-var8d7f03d
treat empty auto_envvar as Noneef11be6
Merge pull request #2041 from spanglerco/shell-completion-option-valuesDependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting
@dependabot rebase
.Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)