v8.4.0
- Breaking: Remove the historical
from click_extra.version import prebake_*compatibility imports; the pre-baking helpers are only importable fromclick_extra.prebake. - Breaking: Remove the leaked
annotationsandwarningsentries from the package's public API: both were star-import artifacts, not Click, Cloup or Click Extra API. - Breaking: Move
args_cleanup,format_cli_prompt,PROMPTandINDENTfromclick_extra.testingtoclick_extra.execution; all butPROMPTstay importable from their historical home. - Breaking: Remove the dead
CarapaceCompletion.is_empty()method and the deprecated alert parser'scurrent_depth(). - Add a
--treeflag to the default option set: it prints the whole hierarchy of nested subcommands as a tree (names, aliases, operand metavars and one-line descriptions), then exits. The newclick_extra.treemodule exposesrender_command_tree(),TreeOptionand@tree_option. - Add a
--treemode toclick-extra wrap: prints the subcommand tree of any foreign Click CLI without running it, with the same target resolution as--show-paramsand--man. - Help screens and the
--treeview now style subcommand aliases with thealiastheme slot and their parenthetical punctuation withalias_secondary; aliases used to take thesubcommandslot and the punctuation stayed plain. - Table formats able to express styles natively (
html,unsafehtml,mediawiki,textile,jiraand the fourlatex*variants) now translate the ANSI codes carried by cells and headers to the format's own styling markup instead of stripping them. - An explicit
--colorno longer injects raw ANSI codes into the markup formats supporting native styling; the raw passthrough escape hatch remains for the formats without. - Add
split_ansi()andrender_ansi()plus theansi_to_html(),ansi_to_jira(),ansi_to_latex()andansi_to_textile()converters toclick_extra.styling. - Add
run_cli(args)toclick_extra.execution: asubprocess.runwork-alike that logs the invocation as a copy-pasteable prompt line and streams the child's output to the logger as it is produced; a per-calllabeltags each streamed record. format_cli_promptnow styles each token family with the theme slot it holds elsewhere in a CLI's output; the binary-path renderer behind it is public ashighlight_bin_name(program).- Add the
Durationparameter type toclick_extra.types: parses a friendly duration (7 days,12h), an ISO 8601 duration (P7D) or an RFC 3339 timestamp into adatetime.timedelta; zero, empty and future values parse toNone. - One
--sort-bycan now serve subcommands rendering heterogeneous tables:SortByOptionaccepts bare column IDs resolved per table,print_table()andrender_table()headers acceptColumnSpecinstances and(label, column_id)pairs, andcolumn_sort_key()is public. An explicitdefault=()declares no default sort. - Add the
isolated_app_dirfixture toclick_extra.pytest: repointsclick.get_app_dir-based configuration discovery at a fresh per-test directory, so in-process CLI invocations never read the host's real configuration folder. - Add
install_interrupt_handler(ctx)andterminate_live_processes()toclick_extra.execution: the first Ctrl+C nowSIGTERMs every subprocess spawned throughrun_cli. - Log records emitted while a
Spinneranimates on the same stream are now printed throughSpinner.echo(), on their own line above the animation, instead of garbling the in-progress frame. Addsactive_spinner()toclick_extra.spinner. - Add
temporary_env()toclick_extra.envvar: a context manager applying environment variable changes for the duration of a block, then restoring every touched variable. - Expose
generator_tag()inclick_extra.parameters: the provenance tag stamped into generated man pages and Carapace completion specs. - Unify the palettes materializing the 16 ANSI colors as concrete RGB:
StyleCSS output, contrast math and the first 16 slots of the indexed palette now share the palette the documentation renders terminal sessions with. select_rowaccepts anyMapping, not justdict, so read-only row shapes project without a copy.test-suitenow runs its target binaries throughrun_cli: each invocation is disclosed as a themed prompt line and its output streams live toDEBUGlogs.print_table()now honors a--colorforced on a parent group: the raw-ANSI escape hatch used to be ignored when the color option was not declared on the very command printing the table.--color/--no-colornow reach output produced from background threads:StreamHandlerconsults the process-wideinvocation_color()instead ofclick.echo's thread-local context lookup.Formatterno longer mutates a record'slevelnamein place: a record formatted several times no longer accumulates styling or glued labels.Style.from_ansi()now parses the parameter-less reset escape (\x1b[m) and ignores all selective reset codes (22-29,39,49,55), not just the full0reset.ConfigOption.excluded_paramsnow resolves the CLI's--helpoption ID from Click at runtime instead of assuming it is namedhelp; the option keeps being excluded from configuration files if Click ever renames it.ExtraOption.handle_parse_resultnow pre-records the parameter source of every option, not just eager ones, so non-eager callbacks and types keep introspecting their provenance on Click8.4.0.- The
--jobssequential-execution warning now fires only for an explicitauto/maxrequest; the option's own default logs it at info level. test-suiteno longer crashes on non-UTF-8 binary output: undecodable bytes are escaped into the captured stream, and the subprocess inheritsPYTHONIOENCODING=utf8.- A
test-suitecase skipped byonly_platformsnow reports the platforms it requires; the message used to name the current platform. regex_fullmatch_line_by_linenow reports a regular line mismatch instead of crashing with anIndexErrorwhen the regex and the checked content do not have the same number of lines.- Add a binaries page to the documentation: a searchable, sortable catalog of every released standalone executable with download links, VirusTotal analyses and a detection trend chart.
- Coverage now uploads to Codecov from one runner per OS and Python version, on released Click and Cloup only; the Test Analytics upload and its
junit.xmlartifact are dropped.
Full changelog: v8.3.0...v8.4.0