Skip to content

v9.1.0

Latest

Choose a tag to compare

@kdeldycke kdeldycke released this 03 Sep 09:28
Immutable release. Only release title and notes can be modified.

Note

9.1.0 is available on 🐍 PyPI and 🐙 GitHub.

  • Add --record to click-extra screenshot, running the command under a pseudo-terminal and writing an animated SVG of every screen it draws, paced by --rows, --hold, --blank and --speed, and backed by the new record_and_render().
  • Draw the invocation above a capture as a shell prompt; --prompt overrides or hides it, and --closing-prompt draws the prompt the shell returns to once the command exits.
  • Draw a terminal cursor on a capture with --cursor and --blink, or render_svg(cursor=…), blinking or steady, in the --preset terminal's own shape.
  • Open a recorded animation by typing its command line out, with --typing, --submit and the new type_line().
  • Add :screenshot-cursor:, :screenshot-blink:, :screenshot-prompt:, :screenshot-typing:, :screenshot-submit: and :screenshot-closing-prompt: to the click:run directive.
  • Animated captures now take hold="auto" (and :screenshot-hold: auto), pausing the loop on the final screen for as long as its line count asks; a :screenshot-record: block defaults to it.
  • --validate-config now accepts every location --config accepts: a folder, a glob pattern, or an http/https URL, on top of a file path.
  • Read *.jwcc configuration files with the JSON5 parser, which already accepts the comments and trailing commas JWCC adds to JSON.
  • Group the default options into Configuration, Output, Logging and Introspection sections, drawn after a command's own options in every render.
  • Add ExtraOptionGroup, an option group drawn after the ones Click Extra injects, ordered among them by its priority.
  • Align the columns of every option group by default, with align_option_groups now set to True.
  • Render the --config and --validate-config values as a LOCATION metavar, replacing CONFIG_PATH and FILE.
  • Show the --config default as the folder it searches, instead of the glob of every format the install enables. Pass show_file_patterns=True to keep advertising them.
  • Render the --table-format value as a FORMAT metavar, replacing the list of its fifty accepted values on the help screen.
  • Add a choices key to each option of the --help-format json export, and list the accepted values under an option whose metavar hides them in the man and markdown renders.
  • Match a configuration key against a parameter name whatever its case, so Foo-Bar and FOO_BAR both reach the foo_bar parameter. Adds canonical_param_name().
  • Report an unmatched argfile declaration under the name Click would derive from it, so --Unknown-Option is named unknown_option.
  • Disable the SQLITE configuration format on a Python whose sqlite3 bindings are missing, like FreeBSD's, instead of breaking every CLI at import time.
  • Fix record_command mangling a multi-byte glyph split across two pty reads into a replacement character.
  • Fix a drawn prompt dropping the quotes around an argument or environment value holding a space, so a captured command line pastes back as the command it pictures.
  • Fix a capture inheriting TERM_PROGRAM from the terminal it is taken from, which drew an emoji-bearing table wider on one machine than another.
  • Fix recorded screens dropping every line the command ended with \r\n, the form a pseudo-terminal substitutes for each newline.
  • Fix a printed CLI trace raising on a captured character the output encoding refuses, which failed the run instead of the command under test.
  • Fix a failing invocation leaving --no-color pinned process-wide, which stripped color from every later command run in the same process.
  • Stop {env_info} resolving the host's name, which stalled every --verbosity DEBUG run for as long as the machine's reverse DNS took to answer.
  • Fix an argument declared with a plain click.argument(help=...) drawing a blank Positional arguments entry on the help screen, while every other render carried its text.
  • Fix a deprecated command showing Cloup's (Deprecated) prefix and dropping the reason string: it now carries Click's own (DEPRECATED: reason) marker in every render.
  • Fix a MulticallGroup and a VersionOption failing to copy on Python 3.10 with Click 8.4, which raised ValueError: <object object> is not a valid Sentinel.
  • Paint the (DEPRECATED) label with the deprecated theme slot in --tree and the --params help column, as the help screen already does.
  • Fix --help-format carapace describing an option that computes its own help, like -v and -q, with an empty string.
  • List a subcommand's aliases in the man page, the Markdown document and the JSON export, which named only its primary spelling. Each JSON entry gains an aliases array.
  • Carry an argument's help into the completion spec, under the documentation block Carapace reserves for operands.
  • Mark a hidden option with Carapace's & modifier and a required one with !, which the spec carried as indistinguishable from listed and optional ones.
  • Paint each value of a choice operand in --tree with the choice theme slot, the way the help screen paints it.
  • Draw a required {green|ripe} choice metavar on the help screen the way the optional [green|ripe] form is already drawn.
  • Reorganize the documentation sidebar into eight topical sections, grouping the documentation tooling together and splitting Development into Contributing, API reference and Project.
  • Split the configuration documentation into five pages, and move the python:* and matrix Sphinx directives to a page of their own.
  • Fix the dead API documentation links to the capture, theme, Carapace and --help-format pages.
  • Fix the documentation cross-references that did not jump to their section when a page is read on GitHub.
  • Repoint the install page at GitHub's current artifact attestations guide.
  • Document how to search a platformdirs folder layout, by passing a computed pattern to --config's default.
  • Lead the wrap documentation with the --params introspection example, its terminal capture and the uvx one-liner that produces it.
  • Pin --no-prefix on the git diff screenshot, so the picture no longer depends on the diff.noprefix setting of whoever builds the documentation.

Full changelog: v9.0.0...v9.1.0