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 ronaldoussoren
Recipients barry, brett.cannon, eric.snow, gvanrossum, ncoghlan, ronaldoussoren
Date 2019-01-27.21:49:48
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1548625789.1.0.360766457827.issue35806@roundup.psfhosted.org>
In-reply-to
Content
Note that I will have to special case namespaces like typing.re anyway in my code, being a namespace that does not correspond to a "real" module whose code I can analyse.

#35791 was mostly about 3th-party code like apipkg that are "real" modules, but for some reason effectively erase there __spec__ attribute. In those cases find_spec could return valid value.

As I mentioned in the other issue I have a simple workaround for this, and that's something I'll have to keep around for a while anyway. 

I'm not convinced at this point that anything needs to be changed, as long as the documentation is clear on the requirement that modules should have a __spec__ attribute (which makes it easier to convince 3th-party authors to update their code). 

Special cases like typing.re will always be special, and adding __spec__ to them won't change a lot there (the only vaguely useful attribute in the ModuleSpec for typing.re would be "name" and "parent") and IMHO would be needless code churn.
History
Date User Action Args
2019-01-27 21:49:50ronaldoussorensetrecipients: + ronaldoussoren, gvanrossum, barry, brett.cannon, ncoghlan, eric.snow
2019-01-27 21:49:49ronaldoussorensetmessageid: <1548625789.1.0.360766457827.issue35806@roundup.psfhosted.org>
2019-01-27 21:49:49ronaldoussorenlinkissue35806 messages
2019-01-27 21:49:48ronaldoussorencreate