|
1 | 1 | # Changelog |
2 | 2 |
|
3 | | -## Unreleased |
4 | | - |
5 | | -- Publish CPython 3.15 wheels, including freethreaded builds ({pr}`1152`). |
6 | | -- Raise `ValidationError` instead of `SystemError` when `convert` receives an |
7 | | - out-of-range `int` for a `float` target ({pr}`1162`). |
8 | | -- Fix overriding an inherited field alias back to the field's own name |
9 | | - ({pr}`1133`). |
10 | | -- Report `raw` rather than the misleading `any` as the expected type when a |
11 | | - non-`Raw` value is given for a `Raw` field in `convert`, and therefore in |
12 | | - `yaml.decode` and `toml.decode` ({pr}`1169`). |
13 | | -- Fix an empty expected-type name in validation errors for a required `Raw` |
14 | | - field in a `TypedDict`, or a `Raw` field with a `default_factory` on a |
15 | | - `dataclass` or an `attrs` class ({pr}`1176`). |
16 | | -- Fix a reference leak in `msgspec.to_builtins`, and therefore in |
17 | | - `yaml.encode`, for `array_like=True` structs ({pr}`1177`). |
18 | | -- Fix `minItems` in the JSON schema for `array_like=True` structs whose fields |
19 | | - are all optional ({pr}`1124`). |
20 | | -- Correct the error messages for out-of-range `Meta` length bounds |
21 | | - ({pr}`1172`). |
22 | | -- Preserve JSON Schema metadata and string constraints in `propertyNames` for |
23 | | - annotated dictionary key types ({issue}`866`). |
24 | | -- Report the leading argument of the `encode` and `decode` functions and |
25 | | - methods as positional-only in `inspect.signature` and the rendered docs, |
26 | | - matching runtime behavior ({pr}`1116`). |
27 | | -- Many type stub improvements and fixes ({pr}`1116`, {pr}`1163`, {pr}`1173`, |
28 | | - {pr}`1179`). |
29 | | -- Fix `NameError` when creating a `Struct` with an unquoted forward |
30 | | - reference on Python 3.14 ({issue}`1165`). |
31 | | - |
32 | | -## Version 0.22.0 (2026-08-11) |
| 3 | +## Version 0.22.0 (2026-09-29) |
33 | 4 |
|
34 | 5 | - Add `frozendict` support on Python 3.15+ ({pr}`1052`, {pr}`1105`). |
35 | 6 | - Support passing a callable as `decimal_format` to `msgspec.json.Encoder` and |
36 | 7 | `msgspec.msgpack.Encoder` for custom `Decimal` encoding ({pr}`978`). |
37 | 8 | - Support `Literal[True]` and `Literal[False]` types ({pr}`1004`). |
| 9 | +- Publish CPython 3.15 wheels, including freethreaded builds ({pr}`1152`). |
38 | 10 | - Publish Linux `riscv64` wheels ({pr}`987`). |
39 | 11 | - Support the PyEmscripten (Pyodide) platform ({pr}`1083`). |
40 | 12 | - Fix handling of PEP 695 type parameter syntax (`class Foo[T]`) and of |
41 | 13 | `types.GenericAlias` instances in type annotations ({pr}`962`). |
| 14 | +- Fix `NameError` when creating a `Struct` with an unquoted forward |
| 15 | + reference on Python 3.14 ({issue}`1165`). |
42 | 16 | - Fix a crash on incorrect `typing.ClassVar` annotations ({pr}`1097`). |
43 | 17 | - Fix an `AttributeError` when converting to a `Struct` type defined in a |
44 | 18 | namespace without a `__name__` ({pr}`1072`). |
| 19 | +- Fix overriding an inherited field alias back to the field's own name |
| 20 | + ({pr}`1133`). |
| 21 | +- Raise `ValidationError` instead of `SystemError` when `convert` receives an |
| 22 | + out-of-range `int` for a `float` target ({pr}`1162`). |
| 23 | +- Report `raw` rather than the misleading `any` as the expected type when a |
| 24 | + non-`Raw` value is given for a `Raw` field in `convert`, and therefore in |
| 25 | + `yaml.decode` and `toml.decode` ({pr}`1169`). |
| 26 | +- Fix an empty expected-type name in validation errors for a required `Raw` |
| 27 | + field in a `TypedDict`, or a `Raw` field with a `default_factory` on a |
| 28 | + `dataclass` or an `attrs` class ({pr}`1176`). |
| 29 | +- Correct the error messages for out-of-range `Meta` length bounds |
| 30 | + ({pr}`1172`). |
45 | 31 | - Fix a reference leak when decoding msgpack `Ext` payloads ({pr}`1109`). |
| 32 | +- Fix backing type declaration of `Ext.code` ({pr}`1135`). |
| 33 | +- Fix a reference leak in `msgspec.to_builtins`, and therefore in |
| 34 | + `yaml.encode`, for `array_like=True` structs ({pr}`1177`). |
46 | 35 | - Fix reference leaks in `typenode_collect_literal`, `Meta.__rich_repr__`, |
47 | 36 | `ms_decode_bigint`, and `Encoder.__init__` ({pr}`1021`, {pr}`1022`, |
48 | 37 | {pr}`1023`, {pr}`1040`). |
49 | 38 | - Fix `msgspec.inspect.type_info` and `msgspec.json.schema` crashing on mixed-type `Literal`s such as `Literal[1, None]` ({pr}`1080`). |
50 | 39 | - Place `null` last in the `anyOf` generated for optional unions in JSON |
51 | 40 | schemas ({pr}`1028`). |
| 41 | +- Fix `minItems` in the JSON schema for `array_like=True` structs whose fields |
| 42 | + are all optional ({pr}`1124`). |
| 43 | +- Use `[]` or `""` rather than a Python `set` or `bytearray` object as the |
| 44 | + JSON schema `default` for `Struct` fields with a `set` or `bytearray` |
| 45 | + `default_factory` ({pr}`1183`). |
| 46 | +- Preserve JSON Schema metadata and string constraints in `propertyNames` for |
| 47 | + annotated dictionary key types ({issue}`866`). |
52 | 48 | - Fix `msgspec.json.encode` raising `TypeError` for a `dict` keyed by a plain |
53 | 49 | `enum.Enum` with `str` values ({pr}`1118`). |
54 | 50 | - Fix missing GC traversal and clearing of some module state members ({pr}`1060`). |
55 | 51 | - Ensure an exception is always set on allocation failures ({pr}`1044`). |
56 | 52 | - Fix compilation warnings on Python 3.15 ({pr}`1077`). |
| 53 | +- Report the leading argument of the `encode` and `decode` functions and |
| 54 | + methods as positional-only in `inspect.signature` and the rendered docs, |
| 55 | + matching runtime behavior ({pr}`1116`). |
57 | 56 | - Add overloads to the `Meta` type stub, so type checkers reject mixing `gt` |
58 | 57 | with `ge` or `lt` with `le` ({pr}`700`). |
59 | 58 | - Many type stub improvements and fixes ({pr}`1014`, {pr}`1043`, {pr}`1053`, |
60 | 59 | {pr}`1055`, {pr}`1057`, {pr}`1062`, {pr}`1063`, {pr}`1064`, {pr}`1065`, |
61 | | - {pr}`1074`, {pr}`1093`, {pr}`1114`). |
| 60 | + {pr}`1074`, {pr}`1093`, {pr}`1114`, {pr}`1116`, {pr}`1163`, {pr}`1173`, |
| 61 | + {pr}`1179`). |
62 | 62 | - Document the differences between `msgspec.structs.asdict`/`astuple` and |
63 | 63 | `msgspec.to_builtins` ({pr}`1025`). |
64 | 64 | - Document that `omit_defaults` ignores fields with a custom |
65 | 65 | `default_factory` ({pr}`1076`). |
66 | 66 | - Fix the `msgspec.json.decode` docstring to say `dec_hook` should raise |
67 | 67 | `NotImplementedError` for unsupported types, not `TypeError` ({issue}`774`). |
68 | | -- Fix backing type declaration of `Ext.code` ({pr}`1135`). |
69 | 68 | - msgspec moved to the [msgspec GitHub organization](https://github.com/msgspec/msgspec); |
70 | 69 | documentation now lives at [msgspec.dev](https://msgspec.dev) (repository |
71 | 70 | references updated in {pr}`1045`). |
|
0 commit comments