Releases: jcrist/msgspec
Releases · jcrist/msgspec
Version 0.21.1
- Fix
ValidationErrorandDecodeErrorraised indec_hookbeing incorrectly wrapped in anotherValidationError(#1013). - Fix a potential
NULLdereference instructmeta_get_module_ns(#1016). - Fix a reference leak in
ms_passes_big_int_constraints(#1017). - Fix missing
ref_templateparameter inmsgspec.json.schematype stub (#1002). - Clarify
order='deterministic'encoder docstrings (#1011). - Add a porting guide for users migrating from orjson (#1007).
Version 0.21.0
- Fix a segfault on Python 3.13+ that could occur when creating structs that contained a
__dict__, instead of only using__slots__(#960). - Improve type annotations for
msgspec.UNSET(#975). - Fix hashing of decoded tuples on Python 3.14 (#980).
- Add
ref_templatearg tomsgspec.json.schema(#983). - Add missing
libmlinkage to some architectures (#993). - Fix memory leak when decoding sets (#991).
- Add
uniqueItemsannotation toset/frozensetJSON schemas (#984). - BREAKING: Call
__post_init__frommsgspec.structs.replace/copy.replace(#1000).
Version 0.20.0
- Support Python 3.14, including freethreaded mode (#852, #877).
- Expose the
StructMetametaclass (#890, #927, #928, #940, #945). - Add
msgspec.inspect.is_structandmsgspec.inspect.is_struct_typefunctions for checking whether an object is amsgspec.Struct-like instance or class (#950). - Support Windows
arm64builds (#943). - Enable ThinLTO on macOS
aarch64builds (#937). - Fix leaks of
re.Patternobjects when usingpatternconstraints ofmsgspec.Meta(#899). - Fixed
memoryviewsupport formsgspec.msgpack(#836). - Fix crash when
typing.TypedDictcontains incorrect metadata (#853, #947). - Add
setuptools-scmas a build dependency instead of vendoringversioneer(#905). - Remove support for legacy packaging builds (#907).
- Improved the developer experience by adding the
justcommand runner and Dev Container support (#918).
Version 0.19.0
- Improve JSON encoding performance by up to 40% (#647).
- Ensure
tupleandfrozensetdefault values are treated identically whether specified by value ordefault_factory(#653). - Fix memory leak of
match_argsinStructConfigobject (#684). - Fix memory leak in
Raw.copy()(#709). - Update
decodesignatures for PEP 688 (#740). - Generate
__replace__method onStructtypes, for use withcopy.replace(#747). - Fix incorrect decoding of certain > 64 bit integers (#751).
- Call
__post_init__when converting from an object to a Struct (#752). - BREAKING: Expand buffer when
encode_intois passed a buffer smaller thanoffset(#753). - Support
Rawobjects as inputs toconvert(#754). - Error nicely when a dataclass type (instead of an instance) is passed to
encode(#755). - Drop support for Python 3.8 (#756, #763).
- Add support for Python 3.13 (#711).
- Remove deprecated
from_builtins(#761). - Support encoding any
Enumtype whose.valueis a supported type (#757). - Don't fail eagerly when processing generic types with unsupported
__parameters__(#772). - Use
eval_type_backportto backport type annotations to Python 3.9 (#773).
Version 0.18.6
- Support coercing integral floats to ints when
strict=False(#619). - Preserve leading
_when renaming fields to camel or pascal case (#620). - Support zero-copy decoding binary fields to a
memoryview(#624). - Fix a bug when inheriting from the same
Genericbase class multiple times (#626). - Add an
orderoption to all encoders for enforcing deterministic/sorted ordering when encoding. This can help provide a more consistent or human readable output (#627). - Support inheriting from any slots-class when defining a new
Structtype withgc=False(#635). - Automatically infer the input field naming convention when converting non-dict mappings or arbitrary objects to
Structtypes inmsgspec.convert(#636).
Version 0.18.5
- Support unhashable
Annotatedmetadata inmsgspec.inspect.type_info(#566). - Fix bug preventing decoding dataclasses/attrs types with default values and
slots=True, frozen=True(#569). - Support passing parametrized generic struct types to
msgspec.structs.fields(#571). - Validate
strconstraints on dict keys when decoding msgpack (#577). - Support
UUIDsubclasses as inputs tomsgspec.convert(#592). - Call
__eq__from generated__ne__if user defines manual__eq__method on aStructtype (#593). - Include the
Structtype in the generated hash (#595). - Add a
cache_hashstruct option (#596). - Fix a bug around caching of dataclass type info when dealing with subclasses of dataclasses (#599).
- Add
msgspec.structs.force_setattr(#600). - Support custom dict key types in JSON encoder and decoder (#602).
- Include
dictkey constraints in generated JSON schema via thepropertyNamesfield (#604). - Add a
schema_hookfor generating JSON schemas for custom types (#605). - Add support for Python 3.12's
typealiases (#606).
Version 0.18.4
- Resolve an issue leading to periodic segfaults when importing
msgspecon CPython 3.12 (#561)