Skip to content

v7.18.0

Choose a tag to compare

@kdeldycke kdeldycke released this 29 May 20:17
Immutable release. Only release title and notes can be modified.
  • Add a --man option to the default set of @extra_command and @extra_group (via default_extra_params()): it prints the command's man page (roff) to stdout and exits. Also available as the @man_option decorator for plain Click CLIs.
  • Add an --accessible option to the default set of @extra_command and @extra_group (via default_extra_params()). Enabling it, or setting the ACCESSIBLE environment variable, is equivalent to --no-color --table-format plain: it strips ANSI codes and renders tables without Unicode box-drawing characters, for screen readers. An explicit --color or --table-format (on the command line or in a configuration file) keeps precedence. Also available as the @accessible_option decorator and the AccessibleOption class.
  • Add a man subcommand to the click-extra CLI: click-extra man SCRIPT [SUBCOMMAND]... renders the man page (roff) of any external Click CLI without running it, resolving the target like show-params (console_scripts entry point, module:function notation, .py file, or module name). Both subcommands now also load .py file targets, which previously raised an unhandled error.
  • Generate man pages programmatically with the new click_extra.man_page module: render_manpage() for a single command, render_manpages() for the whole command tree (one page per subcommand), and write_manpages() to write .1 files (handy from a Debian override_dh_installman rule). Pages follow the man-pages(7) layout, discover subcommands dynamically, honor Click's \b no-rewrap marker and SOURCE_DATE_EPOCH for reproducible builds, and mirror Cloup option groups as .SS subsections (ungrouped options fall under an Other options heading).
  • Add a pre-configured -0/--zero-exit option flag, exposed as the @zero_exit_option decorator and the ZeroExitOption class. It stores the user's intent in ctx.meta under the new ZERO_EXIT key but does not alter the exit code itself: downstream code reads it to decide whether to suppress its non-zero "problems found" status.
  • Consolidate the --time, --jobs and -0/--zero-exit options into a single click_extra.execution module. The click_extra.jobs and click_extra.timer submodules are removed: their decorators and classes (timer_option, jobs_option, TimerOption, JobsOption, CPU_COUNT, DEFAULT_JOBS) remain importable from the click_extra root. The --show-params table now reports these options under click_extra.execution.
  • Honor the standard POSIXLY_CORRECT environment variable. When it is present in the environment (regardless of value), ExtraContext forces allow_interspersed_args to False, so every Click Extra command and group stops parsing options at the first positional argument, matching GNU getopt-based tools.
  • Add the run_config_validation() function and the ValidationReport dataclass to click_extra.config (both re-exported from the package root). They run the CLI-parameter strict check, the typed schema build, and every registered ConfigValidator in a single pass, returning the typed schema instance, the extracted extension sub-trees, and the list of ValidationErrors. collect_all=True gathers every error; collect_all=False stops at the first. Both --validate-config and normal --config loading now delegate to this primitive.
  • Unify configuration-loading errors under the single ValidationError type. Unknown CLI-parameter keys (strict=True) and unknown schema fields (schema_strict=True) previously surfaced as an uncaught ValueError traceback during --config loading; they now stop the run with a critical-level log and exit code 1, the same failure mode as extension-validator errors. Code that caught ValueError from config loading should catch the SystemExit from the exit (or use --validate-config / run_config_validation() to inspect errors without exiting).
  • Fix schema_strict=True wrongly rejecting the contents of a configuration field marked as an extension point with EXTENSION_METADATA_KEY when the field's Python type is not a mapping. The dataclass adapter now honors the marker the same way the outer strict check does, so the marked sub-tree is kept intact instead of being flattened and reported as unknown keys.

Full changelog: v7.17.2...v7.18.0


🛡️ VirusTotal scans

Binary Detections Analysis
click-extra-7.18.0-linux-arm64.bin 0 / 63 View scan
click-extra-7.18.0-linux-x64.bin 0 / 64 View scan
click-extra-7.18.0-macos-arm64.bin 2 / 60 View scan
click-extra-7.18.0-macos-x64.bin 0 / 61 View scan
click-extra-7.18.0-windows-arm64.exe 2 / 69 View scan
click-extra-7.18.0-windows-x64.exe 8 / 71 View scan