Message207271
You'd also need to update the new multiprocessing code - it currently expects "__main__.__spec__ == None" for all the run-from-a-path-or-stdin cases.
The -m switch and running __main__ from a supplied sys.path entry (the "dir" entry in your table) are both already handled by the runpy changes in issue 19700.
The remaining cases where __main__.__spec__ is currently None:
- interactive prompt
- -c switch
- running from stdin
- running directly from a source or bytecode file
To be honest, I'm not sure it actually makes sense to try to manufacture a pseudo-spec for those cases. A main script may not be importable as a module (e.g. a hyphen in its name, or no .py suffix), and you *definitely* can't import a file that doesn't exist on disk (REPL, stdin, -c). |
|
Date |
User |
Action |
Args |
2014-01-04 07:45:39 | ncoghlan | set | recipients:
+ ncoghlan, brett.cannon, Arfrever, eric.snow |
2014-01-04 07:45:39 | ncoghlan | set | messageid: <1388821539.9.0.0528782308143.issue19697@psf.upfronthosting.co.za> |
2014-01-04 07:45:39 | ncoghlan | link | issue19697 messages |
2014-01-04 07:45:39 | ncoghlan | create | |
|