SIGN IN SIGN UP

[mypyc] Make some dict primitives thread-safe on free-threading builds (#21616)

Use thread-safe `PyDict_GetItemRef` instead of
`PyDict_GetItemWithError`. Also fix an unrelated memory leak in a
setdefault primitive.

I used coding agent assist.
J
Jukka Lehtosalo committed
0da2bbdb9e90f264738e24fa7881c27d97d8bf65
Parent: 8b6642d
Committed by GitHub <noreply@github.com> on 6/15/2026, 6:04:28 PM