Message270457
I can try to add the RuntimeWarning soon. Obviously we want the warning when executing a submodule like “package.module”. It also seems reasonable to warn when executing a top-level module that has already been imported. I presume we want these to go into the next 3.5 release. What about 2.7?
I guess we don’t want a warning when executing “package.__main__”, even if the parent package is already imported. So I also need to check if sys.modules[...].__path__ exists.
Another thing that I wonder about: What if the message “Error finding spec for . . .” was changed to “Error getting import information for . . .”? I am only just starting to understand that “finding spec” may mean this (I think the documentation has improved since I last tried to understand it). |
|
Date |
User |
Action |
Args |
2016-07-15 02:17:17 | martin.panter | set | recipients:
+ martin.panter, brett.cannon, ncoghlan, eric.snow, wolma |
2016-07-15 02:17:17 | martin.panter | set | messageid: <1468549037.0.0.402311407787.issue27487@psf.upfronthosting.co.za> |
2016-07-15 02:17:16 | martin.panter | link | issue27487 messages |
2016-07-15 02:17:15 | martin.panter | create | |
|