Open PeterJCLaw opened 4 months ago
Just as a small addition: I feel like this is a general issue with descriptors and I'm not really sure we can fix that for the general case. Since the names of the descriptor are not really the name that the signature should have...
As we found out on #2003, in Python 3.13+
functools.partial
is now a descriptor. In turn this means thatInterpreter
(which uses a mix of access to real objects and code analysis) fails to resolve a suitable name for partially applied functions and ends up using the__repr__
instead.The specific issue is that
DirectObjectAccess.py__name__
is confused by the result of itsinspect.ismethoddescriptor
check.See also discussion on #2003, from which this is broken out.