Msgspec

Latest version: v0.18.6

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

Scan your dependencies

Page 1 of 6

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 `Generic` base class multiple times (626).
- Add an `order` option 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 `Struct` type with `gc=False` (635).
- Automatically infer the input field naming convention when converting non-dict mappings or arbitrary objects to `Struct` types in `msgspec.convert` (636).

0.18.5

- Support unhashable `Annotated` metadata in `msgspec.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 `str` constraints on dict keys when decoding msgpack (577).
- Support `UUID` subclasses as inputs to `msgspec.convert` (592).
- Call `__eq__` from generated `__ne__` if user defines manual `__eq__` method on a `Struct` type (593).
- Include the `Struct` type in the generated hash (595).
- Add a `cache_hash` struct 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 `dict` key constraints in generated JSON schema via the `propertyNames` field (604).
- Add a `schema_hook` for generating JSON schemas for custom types (605).
- Add support for Python 3.12's `type` aliases (606).

0.18.4

- Resolve an issue leading to periodic segfaults when importing ``msgspec`` on CPython 3.12 (561)

0.18.3

- Improve type annotation for `Struct.__rich_repr__` (557)
- Add pre-built wheels for Python 3.12 (558)

0.18.2

- Support `Enum._missing_` [hooks](https://docs.python.org/3/library/enum.html#enum.Enum._missing_) for handling unknown enum values (532).
- Fix JSON encoding of `datetime.datetime` objects with `zoneinfo.ZoneInfo` timezone components (534).
- Add support for `attrs` [validators](https://www.attrs.org/en/stable/examples.html#validators>) (538).
- Relax datetime/time parsing format to allow some RFC3339 extensions from ISO8601 (539).

0.18.1

- Support custom `builtin_types` in `msgspec.to_builtins` (517).
- Try `getattr` before `getitem` when converting with `from_attributes=True` (519).
- More efficient module state access in top-level functions (521).

Page 1 of 6

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.