Releases: jcrist/msgspec
Releases · jcrist/msgspec
Version 0.4.0
This is a major release with several large changes:
- Moved MessagePack support to the
msgspec.msgpack
submodule - New JSON support available in
msgspec.json
- Improved error message generation to provide full path to the mistyped values
- Renamed the
immutable
kwarg inmsgspec.Struct
tofrozen
to better match python conventions - Renamed
EncodingError
toEncodeError
/DecodingError
toDecodeError
to better match python conventions - Improved
pyright
support, allowing more errors to be statically caught by their type checker - Adds support for Python 3.10 pattern matching on
msgspec.Struct
types - Adds support for decoding into
typing.Union
types (with a few restrictions) - General performance improvements across all encoders/decoders
Version 0.3.2
- Faster float encoding and decoding
- General micro-optimizations for write/read hot path. Most visible for large messages.
Version 0.3.1
- Use a freelist for small structs to improve struct allocation time.
- Small perf improvement for struct serialization
Version 0.3.0
- Add
Encoder.encode_into
api, for encoding into an existing buffer without copying - Add support for encoding/decoding MessagePack extensions
- Add support for encoding/decoding
datetime
objects - Add support for encoding/decoding custom objects without relying on MessagePack extensions
- Add support for marking
Struct
types as hashable - Add support for serializing
Struct
types as MessagePackarray
objects rather thanmap
objects. - Several performance improvements. On average 50% faster encoding and 30% faster decoding.
Version 0.2.0
Add `default` callback to `encode`/`Encoder` Adds a `default` callback kwarg to `Encoder` constructor and `encode` function. This takes a callable that's called for all unsupported types to optionally convert them into supported types (or error if unsupported). This is useful for lazily coercing possibly unsupported types into a supported representation. Also fixes a bug in the `Encoder` dealloc, and moves the `type` kwarg to `msgspec.decode` to a keyword-only kwarg.
Version 0.1.0
Run workflow on release [ci skip]