-
-
Notifications
You must be signed in to change notification settings - Fork 175
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
doit auto crashes with python 3.8 on MacOS #372
Comments
This seems specific to MacOS. No problem inside a tmp$ docker run --rm -ti python:3 /bin/bash
root@ea1181c1d2ae:/# pip install doit
Collecting doit
Downloading doit-0.33.1-py3-none-any.whl (84 kB)
|████████████████████████████████| 84 kB 2.3 MB/s
Collecting pyinotify; sys_platform == "linux"
Downloading pyinotify-0.9.6.tar.gz (60 kB)
|████████████████████████████████| 60 kB 4.4 MB/s
Collecting cloudpickle
Downloading cloudpickle-1.6.0-py3-none-any.whl (23 kB)
Building wheels for collected packages: pyinotify
Building wheel for pyinotify (setup.py) ... done
Created wheel for pyinotify: filename=pyinotify-0.9.6-py3-none-any.whl size=25339 sha256=a44970bc035a3a09e43ae6d288d555faa55855e002916cd196dfe4d87ece31ce
Stored in directory: /root/.cache/pip/wheels/9d/a0/4b/1a80814e4ad0b035c07831ea1b06b691046198492bbc5769b6
Successfully built pyinotify
Installing collected packages: pyinotify, cloudpickle, doit
Successfully installed cloudpickle-1.6.0 doit-0.33.1 pyinotify-0.9.6
root@ea1181c1d2ae:/# python --version
Python 3.8.5
root@ea1181c1d2ae:/# cat > dodo.py <<- EOM
def task_hello():
"""hello"""
def python_hello(targets):
with open(targets[0], "a") as output:
output.write("Python says Hello World!!!\n")
return {
'actions': [python_hello],
'targets': ["hello.txt"],
}
EOM
root@ea1181c1d2ae:/# doit
. hello
root@ea1181c1d2ae:/# doit auto
. hello
^Croot@ea1181c1d2ae:/# |
Based on #368. It seems |
Python 3.8 for macOS changed the behavior of multiprocessing, and it now defaults to spawning new processes and communicating with pickles. This looks like doit is trying to run the action with multiprocessing and passes a file object to it, which is not pickleable. |
Indeed, replacing |
great. Now I am curious to know if works because it is better at handling pickled objects, or because it did not change the default to use spawning. |
Uhhmmm. It says that using |
Yes, but it can be fixed by manually setting it back to |
Perhaps unsurprisingly, it appears there are some related issues with python 3.9 on OSX:
|
As discussed on the recent scipy thread, the aging/non-existent libraries that support the Proposed over there was moving At a deeper level: having a generic watcher is useful, and having a robust, yet optional, cross-platform solution is still very attractive. It looks like |
Describe the bug
Considering the following
dodo.py
file :doit auto
works with python 3.7 :but crashes with python 3.8 :
Environment
The text was updated successfully, but these errors were encountered: