Add VariableTracker subclasses that mirror CPython's descriptor protocol, replacing the previous approach of collapsing C-level descriptors into GetAttrVariable.
Each descriptor type now has its own VT with a tp_descr_get_impl method that mirrors the corresponding CPython tp_descr_get slot:
Non-data descriptors:
- WrapperDescriptorVariable / MethodWrapperVariable
- MethodDescriptorVariable / BoundBuiltinMethodVariable
- ClassMethodDescriptorVariable
- StaticMethodVariable, ClassMethodVariable
- UserFunctionVariable (func_descr_get)
Data descriptors:
- MemberDescriptorVariable, GetSetDescriptorVariable, PropertyVariable
UDOV and UDCV attribute lookup now route through these VTs. Descriptor VT sources use MRO dict walk (via get_source_by_walking_mro) so guards watch the descriptor in the class dict rather than the result of the descriptor protocol.
Authored with Claude.
cc voznesenskym penguinwu EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng wenzhe-nrv jiayisunx kadeng chauhang amjames Lucaskabela jataylo azahed98
[ghstack-poisoned]