Skip to content

Releases: jcrist/msgspec

Version 0.4.0

08 Feb 17:12
Compare
Choose a tag to compare

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 in msgspec.Struct to frozen to better match python conventions
  • Renamed EncodingError to EncodeError/DecodingError to DecodeError 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

23 Jul 15:15
Compare
Choose a tag to compare
  • Faster float encoding and decoding
  • General micro-optimizations for write/read hot path. Most visible for large messages.

Version 0.3.1

13 Jul 03:48
7e24703
Compare
Choose a tag to compare
  • Use a freelist for small structs to improve struct allocation time.
  • Small perf improvement for struct serialization

Version 0.3.0

07 Jul 07:04
Compare
Choose a tag to compare
  • 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 MessagePack array objects rather than map objects.
  • Several performance improvements. On average 50% faster encoding and 30% faster decoding.

Version 0.2.0

25 Feb 20:41
Compare
Choose a tag to compare
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

23 Feb 14:50
Compare
Choose a tag to compare
Run workflow on release [ci skip]