[mypyc] Fix dict iteration memory safety on free-threaded builds (#21617)
`PyDict_Next()` returns a borrowed reference, so we need to add critical sections around the calls to ensure memory safety. I used coding agent assist.
J
Jukka Lehtosalo committed
27d7a353b1bf54060657857fe72d2bb12ce7d480
Parent: 0da2bbd
Committed by GitHub <noreply@github.com>
on 6/15/2026, 6:04:44 PM