[issue5405] There is no way of determining which ABCs a class is registered against

2020-11-16 Thread Irit Katriel
Change by Irit Katriel : -- type: behavior -> enhancement versions: +Python 3.10, Python 3.9 -Python 2.7, Python 3.1 ___ Python tracker ___ _

[issue5405] There is no way of determining which ABCs a class is registered against

2011-05-23 Thread Nick Coghlan
Nick Coghlan added the comment: This topic came up again on python-ideas: http://mail.python.org/pipermail/python-ideas/2011-May/010293.html -- stage: -> needs patch ___ Python tracker

[issue5405] There is no way of determining which ABCs a class is registered against

2009-03-02 Thread Nick Coghlan
Nick Coghlan added the comment: While a complete solution isn't possible, at least supporting querying of explicit registrations would be an improvement over the status quo (since an implicit registration can always be turned into an explicit one, but a registration can't always be turned into i

[issue5405] There is no way of determining which ABCs a class is registered against

2009-03-02 Thread Paul Moore
Paul Moore added the comment: Good point! So a documentation patch, to the effect that there is no way of determining which ABCs a given class is an instance of, would be an appropriate resolution, I guess. ___ Python tracker

[issue5405] There is no way of determining which ABCs a class is registered against

2009-03-02 Thread Armin Ronacher
Armin Ronacher added the comment: I suppose it would be a good idea to fix part of that problem in Sphinx (and probably also in pydoc) by adding something like ":implements: MutableMapping" in the docstring. So that this is explicitly added to the docstring and conforming tools can use this doc

[issue5405] There is no way of determining which ABCs a class is registered against

2009-03-02 Thread Armin Ronacher
Armin Ronacher added the comment: I don't think this can be solved. Not only do registered classes not show up (which could be fixed by providing something like inspect.getfakemro) but ABCs can also perform duck-type checks. For example a class with an __iter__ method is an instance of collect

[issue5405] There is no way of determining which ABCs a class is registered against

2009-03-02 Thread Paul Moore
New submission from Paul Moore : There is no way to determine the list of classes for which issubclass(C, x) is true. The MRO of the class is fine for normal inheritance, but for ABCs it is possible to register classes which don't inherit from the ABC, so that you have a situation where issubclas