I actually have no idea what the bug is, but the handling of object_seen looks "obviously wrong" to me. It will never be the case that we hit fallback_scope = None because that currently requires w_mod is self.w_basicobject and object_seen. object_seen = w_mod is self.w_object. By substitution that means w_mod is self.w_basicobject and w_mod is self.w_object which is trivially false.
The fix I propose here makes intuitive sense to me, but I haven't event attempted to run this code.
I actually have no idea what the bug is, but the handling of
object_seen
looks "obviously wrong" to me. It will never be the case that we hitfallback_scope = None
because that currently requiresw_mod is self.w_basicobject
andobject_seen
.object_seen = w_mod is self.w_object
. By substitution that meansw_mod is self.w_basicobject and w_mod is self.w_object
which is trivially false.The fix I propose here makes intuitive sense to me, but I haven't event attempted to run this code.