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 ncoghlan
Recipients Arfrever, brett.cannon, eric.snow, ncoghlan
Date 2014-01-04.07:45:39
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1388821539.9.0.0528782308143.issue19697@psf.upfronthosting.co.za>
In-reply-to
Content
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).
History
Date User Action Args
2014-01-04 07:45:39ncoghlansetrecipients: + ncoghlan, brett.cannon, Arfrever, eric.snow
2014-01-04 07:45:39ncoghlansetmessageid: <1388821539.9.0.0528782308143.issue19697@psf.upfronthosting.co.za>
2014-01-04 07:45:39ncoghlanlinkissue19697 messages
2014-01-04 07:45:39ncoghlancreate