- Deprecate
msgspec.from_builtins
in favor ofmsgspec.convert
. The newconvert
function provides a superset of the functionality available in the oldfrom_builtins
function. See the converters docs for more information (#431). - Add a
from_attributes
argument tomsgspec.convert
for allowing conversion between object types with matching attribute names. One use case for this is converting ORM objects toStruct
ordataclasses
types (#419). - Support passing generic
Mapping
objects as inputs tomsgspec.convert
. These may be coerced todict
/Struct
/dataclasses
/attrs
types (#427). - Add a new
strict
keyword argument to alldecode
functions,Decoder
classes, as well asmsgspec.convert
. This defaults toTrue
, setting it to false enables a wider set of coercion rules (e.g. coercing astr
input to anint
). See "Strict" vs "Lax" Mode for more information (#434). - Allow any of msgspec's supported types as inputs to
msgspec.convert
(#431, #418). - Passthrough input unchanged when coercing to
typing.Any
type inmsgspec.convert
(#435). - Support parametrizing
Decoder
types at runtime (#415). - Support encoding subclasses of
UUID
(#429).