trunk/117c5e7e1e419f59715c79116722433cd9fe96d3: Anchor a property descriptor's guard source at the type (#197585)
- PyTorch: 1416 events in the last 90 days
- PyTorch: 1398th Release in the last 90 days
- Previous: earlier the same day · trunk/2bb2a9c522e7f944bf98c02c9b85fd959fa0bf0b: [MPS] Add heaviside (#195265)
What happened
object_generic_getattr computes one instance-anchored source and hands it to _resolve_descriptor_get for every kind of descriptor. That anchor is wrong for a property : the descriptor lives on the type, and PropertyVariable derives its fget source from it, so the guard reads L['obj'].attr.fget -- which evaluates the getter and then asks the resulting value for .fget : AttributeError: 'int' object has no attribute 'f…
Summary assembled by rule from the sources below