[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 ncogh...@gmail.com 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 rep...@bugs.python.org

[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 p.f.mo...@gmail.com: 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

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

2009-03-02 Thread Armin Ronacher
Armin Ronacher armin.ronac...@active-4.com 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__

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

2009-03-02 Thread Armin Ronacher
Armin Ronacher armin.ronac...@active-4.com 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

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

2009-03-02 Thread Paul Moore
Paul Moore p.f.mo...@gmail.com 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 Nick Coghlan
Nick Coghlan ncogh...@gmail.com 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