Skip to content

v0.14.0

Choose a tag to compare

@janluke janluke released this 09 May 00:48
· 234 commits to master since this release

New features and enhancements

  • You can show a "Positional arguments" help section by passing a non-empty help description for at least one of the arguments of a command/group. #113
  • cloup.Group now extends cloup.Command and, as a consequence, supports option groups and constraints. #113
  • GroupedOption is now an alias of cloup.Option.
  • Add the new params Click argument to @command and @group signatures. This argument is supported only for click >= 8.1.0. See
    pallets/click#2203.

Breaking changes

This release introduces some breaking changes, but nothing relevant for most users. You'll need to make changes if you've imported and used Cloup mixins directly, for example in order to add support for option groups and constraints to Group (now you can just use cloup.Group).

  • BaseCommand was removed. This shouldn't cause any issue to anybody.
  • cloup.Group extends cloup.Command, similarly as click.Group extends click.Command.
  • OptionGroupMixin.format_options was renamed to format_params. This means you can't just mix it with click.Command to print help sections for option groups, you have to override format_help and call format_params.
  • The new format_params doesn't call super().format_commands as format_options did: that's what Click does and Cloup (reluctantly) did. Now, instead, cloup.Command calls format_params in format_help and then, for multi-commands, calls format_commands directly.
  • ConstraintMixin.format_help was removed. This means you can't just mix it with a click.Command to make it print the "Constraints" help section, you need to call format_constraints explicitly in your command format_help.

On the website: https://cloup.readthedocs.io/en/v0.14.0/pages/changelog.html#v0-14-0-2022-05-09
All commits: v0.13.1...v0.14.0