Fix debug repr for objects on 3.x