Davin Potts added the comment:
In some (but not necessarily all) circumstances, the multiprocessing module is
now (in 2.7 and 3.x) able to detect the "infinite spawning" behavior described
due to unsafe importing of the main module on Windows. The resulting error
message looks like this:
RuntimeError:
An attempt has been made to start a new process before the
current process has finished its bootstrapping phase.
This probably means that you are not using fork to start your
child processes and you have forgotten to use the proper idiom
in the main module:
if __name__ == '__main__':
freeze_support()
...
The "freeze_support()" line can be omitted if the program
is not going to be frozen to produce an executable.
Hopefully this behavior and the resulting message will both alert developers
when such a problem is introduced in a project and communicate to them what the
problem is. Giant blinking red letters aside, hopefully this pragmatic
solution will do a better job of educating and helping developers notice and
deal with such issues.
In the combinatoric explosion of possibilities that combine nosetest-binaries
with PyDev with other useful dev tools, if this error message is being
suppressed or otherwise not shared with the end user of those tools, that would
warrant opening an issue with that tool.
----------
nosy: +davin
resolution: -> fixed
stage: -> resolved
status: open -> closed
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue11240>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com