SIGN IN SIGN UP

Fix: del obj[key] on a reflected indexer crashed the process (#149)

* Fix: del obj[key] on a reflected indexer crashed the process

CPython calls mp_ass_subscript with a null value for del, which mp_ass_subscript_impl forwarded into PyTuple_SetItem and threw across the native boundary. Handle deletion first: IDictionary<K,V>.Remove / IList<T>.RemoveAt through the binder (KeyError on a missing dictionary key), TypeError for every other type and for arrays.

* Resolve the item deleter lazily on the first del

Most types are never deleted from, so the interface walk that finds IDictionary<K,V>.Remove or IList<T>.RemoveAt now runs on the first del instead of at class creation.

* Bump version to 2.0.66
J
Jhonathan Abreu committed
56b3b6e72cf1f0c00bee0ebc77b8c3edcd2764f2
Parent: 9fc7ff1
Committed by GitHub <noreply@github.com> on 9/3/2026, 6:34:41 PM