Message334437
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. |
|
Date |
User |
Action |
Args |
2019-01-27 21:49:50 | ronaldoussoren | set | recipients:
+ ronaldoussoren, gvanrossum, barry, brett.cannon, ncoghlan, eric.snow |
2019-01-27 21:49:49 | ronaldoussoren | set | messageid: <1548625789.1.0.360766457827.issue35806@roundup.psfhosted.org> |
2019-01-27 21:49:49 | ronaldoussoren | link | issue35806 messages |
2019-01-27 21:49:48 | ronaldoussoren | create | |
|