v8.1.0
- Breaking: Rename the
test-plansubcommand totest-suite, its--plan-file/--plan-envvaroptions to--suite-file/--suite-envvar, its[tool.<cli>.test-plan]config section to[tool.<cli>.test-suite], theclick_extra.test_planmodule toclick_extra.test_suite, and theTestPlanConfig/parse_test_plan/run_test_plan/DEFAULT_TEST_PLANAPI toTestSuiteConfig/parse_test_suite/run_test_suite/DEFAULT_TEST_SUITE. TheCLITestCaseclass and the[[cases]]file structure keep their names. - Breaking: Replace the test-suite config's
inlinefield with a nativecasesarray under[tool.<cli>.test-suite.cases](or setfileto a suite path). Adds thecasesfield toTestSuiteConfigand thecases_from_datahelper. - Breaking:
ClickExtraConfig,TestSuiteConfig, andPrebakeConfigare no longer re-exported from the top-levelclick_extranamespace; import them fromclick_extra.config. - Add a Carapace completion exporter: the
click_extra.carapacemodule serializes a Click command tree to carapace-spec YAML for native shell completion, behind a newcarapaceextra. Theto_carapace_spec,dump_carapace_spec,write_carapace_specandinstall_carapace_specAPI answersclick#3188. - Add a
--carapacemode to thewrapcommand:click-extra wrap --carapace SCRIPTprints the target CLI's spec, and--installwrites it into Carapace's user spec directory. Mutually exclusive with--manand--show-params. - The
wrapcommand now accepts a local project directory, reading its console-script entry point frompyproject.tomlorsetup.cfgso a checked-out project can be wrapped without installing it first. - Add the
@sort_by_optiondecorator for the--sort-bytable option, composing with option groups and constraints; it acceptsColumnSpecdefinitions and acolumns=registry so one column tuple drives both--columnsand--sort-by. Closesclick-extra#1777. - Decorators built by
decorator_factorycarry proper signatures: their option class's constructor surfaces inhelp(), the REPL and autodoc, and overloaded type hints let basedpyright, pyright and mypy infer the produced command or decorated callback. Closesclick-extra#1781. @version_optionaccepts an explicit version string as its first positional argument (@version_option("1.2.3")), for drop-in compatibility with Click.- A test-suite file may now be in any list-capable config format detected from its extension: TOML and JSON (built-in), plus YAML, JSON5, JSONC and Hjson (with their extras). Adds the
load_test_suitehelper andSUITE_FORMATSconstant. - Accept a bare integer
timeoutin a test-suite case, coercing it to a float instead of rejecting it. - Default the test-suite config file to
./tests/cli-test-suite.toml, which parses with the built-intomlliband so needs no optional extra. - Add an
allextra that pulls in every optional feature at once. - Centralize config format reading, serialization, and detection in
click_extra.configwith the newserialize_content,read_file, andformat_from_pathhelpers, joining the existingparse_content. - Add
iter_subcommandsandmake_resilient_contexttoclick_extra.parametersfor enumerating a group's visible subcommands and building a parse-free introspection context. - Add the
CONFIG_PATH_METADATA_KEYandNORMALIZE_KEYS_METADATA_KEYnamed constants for the schema field-metadata keys, alongside the existingEXTENSION_METADATA_KEY. - Man pages now render optional-value options like
--coloras--color[=auto|always|never]and drop the spurious value metavar on repeatable count options like-v/--verbose. - When introspection (
--man,--show-params,--carapace) cannot find a Click command in the resolved module, the error now explains that an entry point importing its command lazily must be addressed withmodule:functionnotation. - Unify the "missing optional dependency" error messages behind a shared
missing_extra_messagehelper, pointing at the canonicalpip install click-extra[<extra>]install target. - Restrict pytest collection to the
testsfolder and switch toimportlibimport mode, fixingimport file mismatcherrors when building from a packaged source tree alongside an installed copy. Closesclick-extra#1779. - Show the same configuration across all eight supported formats (TOML, YAML, JSON, JSON5, JSONC, Hjson, INI, XML) in a tabbed block in the configuration docs.
- Silence ambiguous cross-reference warnings in the Sphinx documentation build for the
ColumnSpec,ConfigFormat,ConfigValidatorandLogLevelclasses re-exported at the package root.
Full changelog: v8.0.1...v8.1.0
🛡️ VirusTotal scans
| Binary | Detections | Analysis |
|---|---|---|
click-extra-8.1.0-linux-arm64.bin |
0 / 61 | View scan |
click-extra-8.1.0-linux-x64.bin |
1 / 62 | View scan |
click-extra-8.1.0-macos-arm64.bin |
1 / 60 | View scan |
click-extra-8.1.0-macos-x64.bin |
1 / 60 | View scan |
click-extra-8.1.0-windows-arm64.exe |
2 / 68 | View scan |
click-extra-8.1.0-windows-x64.exe |
14 / 67 | View scan |