Msgspec

Latest version: v0.19.0

Safety actively analyzes 714860 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 6 of 6

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 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

0.3.2

- Faster float encoding and decoding
- General micro-optimizations for write/read hot path. Most visible for large messages.

0.3.1

- Use a freelist for small structs to improve struct allocation time.
- Small perf improvement for struct serialization

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 MessagePack `array` objects rather than `map` objects.
- Several performance improvements. On average 50% faster encoding and 30% faster decoding.

0.2.0

0.1.0

Page 6 of 6

© 2025 Safety CLI Cybersecurity Inc. All Rights Reserved.