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 gvanrossum
Recipients barry, brett.cannon, eric.snow, gvanrossum, ncoghlan, ronaldoussoren
Date 2019-01-22.17:39:23
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1548178763.84.0.106120607437.issue35806@roundup.psfhosted.org>
In-reply-to
Content
It's been a somewhat well-known idiom for modules to replace themselves in sys.modules with an object that implements some special behaviors (e.g. dynamic loading). This "just works" and AFAIK people have been doing this for ages. Typically such classes just implement enough machinery so that "import foo; print(foo.bar)" works -- everything else (__file__, __doc__ etc.) is optional.

So I think tools should be robust when they inspect sys.modules and not crash or whine loudly when they find something that's missing a few advanced attributes.

That said, if there's something *useful* we could put in the special attributes for e.g. typing.io, I'm not against it. But I don't think this is a bug.
History
Date User Action Args
2019-01-22 17:39:24gvanrossumsetrecipients: + gvanrossum, barry, brett.cannon, ronaldoussoren, ncoghlan, eric.snow
2019-01-22 17:39:23gvanrossumsetmessageid: <1548178763.84.0.106120607437.issue35806@roundup.psfhosted.org>
2019-01-22 17:39:23gvanrossumlinkissue35806 messages
2019-01-22 17:39:23gvanrossumcreate