Skip to content

v5.4.0

Choose a tag to compare

@BrianPugh BrianPugh released this 08 Nov 14:37
· 18 commits to main since this release
1cfe669

Features

  • App.argfile_prefix reads CLI arguments from files, like argparse's fromfile_prefix_chars. With App(argfile_prefix="@"), a token like @run.args is replaced by the file's lines (one argument per line), and files may reference other files. @yash-bitla #1043

Bug Fixes

Meta Apps & Combined Short Flags

  • An unknown combined short flag is reported whole instead of blaming a meta-app option. #1040
  • A meta option inside a combined short token takes all of its values. #1042
  • Combined short flags with an = value (e.g. -vn=bob) no longer misbind in meta apps. #1041

Other

  • An app run with python -m mypkg is named after the module in help and usage-strings, matching argparse. @Rahul-cs50 #1053
  • Pydantic URL types (HttpUrl, AnyUrl, ...) and other custom-schema types are parsed as a single value instead of recursing forever. #1048
  • A CoercionError raised by convert() (e.g. inside a custom converter) can be printed instead of raising AssertionError. @gal-a #1047
  • Shell-completion generation skips Parameter(parse=False) arguments, so an injected dependency whose type is only imported under TYPE_CHECKING no longer raises NameError. @damvolkov #1045

Maintenance

  • The release workflow uses pypi-publish v1.14.3 (addresses a compromised Sigstore CA), and Dependabot now keeps GitHub Actions up to date. #1054
  • Dependency and GitHub Actions bumps. #1049, #1050, #1051, #1055, #1056, #1057, #1058

New Contributors

Full Changelog: v5.3.3...v5.4.0