jcrist · GitHub

added 11 commits

June 5, 2023 23:15
This renames `msgspec.from_builtins` to `msgspec.convert`, keeping
around a deprecated version of `from_builtins` that warns and forwards
its arguments to `convert`.
Since `from_builtins` now supports inputs from non-builtin types, the
old name no longer makes sense.
This renames the `str_values` kwarg in `from_values` to `strict` (and
inverts the default). This is preparation for adding `strict=False`
support to all builtin decoders, enabling opt-in behavior to more
flexible parsing.
This is a better keyword name (and also happens to match the one used by
pydantic V2). This isn't a breaking change since this feature has yet to
be released.
If we need to support converting to the original attribute names, we can
add another config option later. Using the renamed names provides better
uniformity across the library.
This also adds support for coercing str subclasses to any str-like
value.

@jcrist

@jcrist

jcrist deleted the msgspec-convert branch

June 7, 2023 03:01

Merged

Read the original on github.com ↗