Msgspec

Latest version: v0.18.6

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

Scan your dependencies

Page 4 of 6

0.10.1

- Ignore attributes with leading underscores (`"_"`) when encoding `dataclasses` (234)

0.10.0

- Add ``forbid_unknown_fields`` configuration option to `Struct` types (210)
- **BREAKING**: Encode all `enum` types by value, rather than name (211)
- Fix a bug in the JSON encoder when base64 encoding binary objects (217)
- Add support for encoding/decoding `dataclasses` (218)
- Add support for encoding/decoding `datetime.date` objects (221)
- Add support for encoding/decoding `uuid.UUID` objects (222)
- **BREAKING**: support encoding/decoding `datetime.datetime` values without timezones by default (224).
- Add a ``tz`` [constraint](https://jcristharif.com/msgspec/constraints.html#datetime-constraints) to require aware or naive datetime/time objects when decoding (224).
- Add support for encoding/decoding `datetime.time` objects (225)
- Add a `msgspec.json.format` utility for efficiently pretty-printing already encoded JSON documents (226).
- Support decoding JSON from strings instead of just bytes-like objects (229)

0.9.1

- Enable Python 3.11 builds (205)
- Support greater than microsecond resolution when parsing JSON timestamps (201)
- Work around a limitation in mypy for typed decoders (191)

0.9.0

- Support for [constraints](https://jcristharif.com/msgspec/constraints.html) during validation. For example, this allows ensuring a field is an integer >= 0. (#176)
- New utilities for generating [JSON Schema](https://jcristharif.com/msgspec/jsonschema.html) from type definitions (#181)
- Support for pretty printing using [rich](https://rich.readthedocs.io/en/stable/pretty.html) (#183)
- Improve integer encoding performance (170)
- Builtin support for renaming fields using kebab-case (175)
- Support for passing a mapping when renaming fields (185)

0.8.0

- Support integer tag values when using [tagged unions](https://jcristharif.com/msgspec/structs.html#tagged-unions) (135).
- Support decoding into `typing.TypedDict` types (142).
- Support encoding/decoding `typing.NamedTuple` types (161).
- Test against CPython 3.11 prelease builds (146).
- Add `ValidationError` (a subclass of `DecodeError`) to allow differentiating between errors due to a message not matching the schema from those due to the message being invalid JSON (155).
- Support encoding subclasses of `list`/`dict` (160).
- Fix a bug preventing decoding custom types wrapped in a `typing.Optional` (162).

0.7.1

- Further reduce the size of packaged wheels (130).
- Add `weakref` support for `Struct` types through a new ``weakref`` configuration option (131).
- Fix a couple unlikely (but possible) bugs in the deallocation routine for Struct types (131).

Page 4 of 6

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.