msgspec icon indicating copy to clipboard operation
msgspec copied to clipboard

Fix crash when TypedDict contains incorrect metadata

Open JelleZijlstra opened this issue 6 months ago • 0 comments

Fixes at least some of the failures reported in: https://github.com/jcrist/msgspec/pull/852#issuecomment-2910261218

These were exposed by a bug in 3.14b1 where TypedDict reported incorrect __annotations__ but correct __required_keys__. msgspec would crash in this case. The bug is reproducible on earlier Python versions by manually manipulating attributes on a TypedDict class.

It's a pretty marginal bug but I would argue the extension should be robust to this sort of edge case.

JelleZijlstra avatar May 26 '25 17:05 JelleZijlstra