Skip to content

v0.5.0 - Major Rewrite, Nothing Should Break

Compare
Choose a tag to compare
@NowanIlfideme NowanIlfideme released this 06 Dec 02:01
· 147 commits to main since this release
e6f4d93

If this release breaks your code, please create an issue here.

This rewrites pydantic_yaml to be based on the YamlModelMixin class. YamlModel is still available, but is now just a subclass of YamlModelMixin and BaseModel. This gives a lot more flexibility to the user. 😄

This also adds some pretty neat basic type classes:

  • YamlStr and YamlInt are base classes for YAML-enabled string and int subclasses.
  • YamlStrEnum and YamlIntEnum are enum superclasses that remove a lot of the strange edge cases with YAML serialization (and custom enum types).

This release deprecates YamlEnum, though users will just be nagged to switch to YamlStrEnum for now until the next major release (or until I remember, whichever comes later).

The release has been tested against old tests, which have also been slightly improved. However, since the tests weren't extremely extensive, I assume this may break something for some users.

What's Changed

Full Changelog: v0.4.3...v0.5.0