Message 365926 - Python tracker
Also, as I mentioned, you don't need to modify all objects tp_traverse, only it's type.tp_traverse slot. For instance, all python objects know how to traverse stuff because they share the same tp_traverse: https://github.com/python/cpython/blob/master/Objects/typeobject.c#L1082 So unless I am missing something, if you want to affect all heap types you just need to modify one tp_traverse in one place: the superclass.