Skip to content

v3.3.1

Choose a tag to compare

@BrianPugh BrianPugh released this 21 Jan 02:35
863648b

Breaking Changes / Bug Fixes

The breaking changes are minimal and probably negatively impacts 0 users, but are listed here for completeness.

  • Cyclopts now properly resolves aliases (and similar) for attrs and pydantic.

  • The cyclopts.field_info.FieldInfo no longer is a subclass of inspect.Parameter; it is now an independent class that mimics many of inspect.Parameter attributes. The class's __init__ now takes names: tuple[str, ...] instead of a single name: str. This is because certain-dataclass-like objects (namely, pydantic) allows for multiple python-variables to be mapped to the same attribute. The class still maintains a name: str property that returns the first element of the names attribute. This single name is used whenever an arbitrary choice for selecting a field's name needs to be used.

    It was never intended for users to directly instantiate this class, and the name property makes it backwards compatible for those accessing the object. Probably noone actually accesses FieldInfo objects outside of Cyclopts' internals.

  • In some situations, an ArgumentOrderError could be erroneously raised when an UnknownOptionError would have been more appropriate. In those situations, an UnknownOptionError is now raised.

Full Changelog: v3.3.0...v3.3.1