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 brett.cannon
Recipients benjamin.peterson, brett.cannon, pitrou
Date 2013-06-21.13:55:48
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1371822949.07.0.28180155675.issue18275@psf.upfronthosting.co.za>
In-reply-to
Content
So I have a use case for this actually. =)

http://bugs.python.org/issue17621 is about trying to finally add a lazy mixin to importlib so people stop asking for it. I have a version already written externally at https://code.google.com/p/importers/source/browse/importers/lazy.py. Part of the trick of making it work is having a way to drop the lazy mixin from the loader MRO for all future uses (which is important for reloads) is to assign __loader__ to super(Mixin, self). The problem is that if you use isinstance on that loader with any of the ABCs in importlib.abc it will always come back false no matter whether the interface is actually implemented or not.

While I consider it a marginal thing for people to do (importlib.abc is for making sure people implement the right methods and providing default implementations, not for interface checking), I'm sure someone will do it and I would like one less possible warning in any future docs about this lazy mixin regarding isinstance checks.
History
Date User Action Args
2013-06-21 13:55:49brett.cannonsetrecipients: + brett.cannon, pitrou, benjamin.peterson
2013-06-21 13:55:49brett.cannonsetmessageid: <1371822949.07.0.28180155675.issue18275@psf.upfronthosting.co.za>
2013-06-21 13:55:49brett.cannonlinkissue18275 messages
2013-06-21 13:55:48brett.cannoncreate