Multiprocess Plugin fails under Windows 7
A fat-free DIY Python plugin management toolkit.
Brought to you by:
tibonihoo
The Multiprocess plugins don't work under Windows 7 with Python 3.4.2 and 3.4.4. The error message is copied below. The unit tests fail with the same/similar error found through application code.
Other test are also failing, this is one of 5.
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "c:\python34\Lib\multiprocessing\spawn.py", line 106, in spawn_main
exitcode = _main(fd)
File "c:\python34\Lib\multiprocessing\spawn.py", line 116, in _main
self = pickle.load(from_parent)
ImportError: No module named 'yapsy_loaded_plugin_Simple_Multiprocess_Plugin_0'
Anonymous
Juste a heads up, this looks bad indeed, but I don't have a windows 7 at my disposal right now, so unless some contributor can help, this will have to wait until I find one.
This problem is fixed with the following commit:
https://sourceforge.net/p/yapsy/code/ci/abbdb0c4b86220b39230c8182358117495bbc00a/
The root cause was that on Windows the child process doesn't share any memory with the parent process and typically forget what has been imported with imp. in the PluginManager.
As a consequence, to make it work the plugin candidate's module has to be imported a second time in the child process. Not terribly elegant but seems to work and make sense.
This was fixed in Yapsy 1.12 release.