This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author eric.snow
Recipients Claudiu.Popa, belopolsky, christian.heimes, eric.snow, ethan.furman, ionelmc, jedwards, llllllllll, r.david.murray, terry.reedy
Date 2015-04-19.18:01:27
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
In-reply-to <>
Note that (in my mind, unfortunately) the pickle module looks up several
dunder methods on instances.  That isn't quite the same thing since the
issue is about callable not triggering the descriptor protocol.  However it
is closely related.  I point this out because this similar behavior of
pickle is a source of mysterious, hard to understand bugs in many of the
same corner cases.  Thus I'm -1 on changing the behavior of callable.

From what I understand, the motivation here is in the case of proxies that
dynamically determine their capability and raise AttributeError
accordingly.  If that is the case then consider prior art such as MagicMock
or other existing proxy types on PyPI.

Also consider if there is a proxy-specific approach that can resolve the
matter.  I've long thought there is room in the stdlib for a "proxy" module
that holds proxy-related helpers and classes.

Finally, instead of changing callable, why not use a metaclass that does
the right thing?  I believe MagicMock does something along those lines.
Date User Action Args
2015-04-19 18:01:27eric.snowsetrecipients: + eric.snow, terry.reedy, belopolsky, christian.heimes, ionelmc, r.david.murray, Claudiu.Popa, ethan.furman, llllllllll, jedwards
2015-04-19 18:01:27eric.snowlinkissue23990 messages
2015-04-19 18:01:27eric.snowcreate