Skip to content

v1.2.0

Compare
Choose a tag to compare
@BrianPugh BrianPugh released this 20 Dec 22:17
· 700 commits to main since this release
33d64e3

Features

  • App now takes an optional parameter default_parameter: Parameter that allows the configuration of what values a default Parameter uses. Parameters now have a resolution order for determining configuration values. Basically it goes (highest-to-lowest priority)annotated parameter -> parenting app default -> parenting-parenting app default -> .... by @BrianPugh in #33
  • New classmethod Parameter.combine which can construct a new, single, Parameter from multiple Parameters.
  • New classmethod Parameter.default which is similar to Parameter(), but it will override all parenting Parameters.
  • App and Parameter's repr strings have been greatly simplified to only include non-default supplied parameters.

Bug Fixes

  • conditionally import typing_extensions by @BrianPugh in #34
  • use importlib.metadata to check distribution version. by @BrianPugh in #36
  • Handle mutable signature parameter defaults. by @BrianPugh in #37

Breaking Changes

This release technically contains some breaking changes, but realistically no-one should be impacts.

  • Removed MultipleParameterAnnotationError; we now handle multiple Parameter resolution. Specifically, for mutliple Parameter in an Annotated, they are evaluated left->right (right-most has highest precedence/priority).
  • All of Parameter's defaults are now None. No change in default functionality.

Full Changelog: v1.1.1...v1.2.0