{"action":"created","issue":{"url":"https://api.github.com/repos/blaze/dask/issues/847","labels_url":"https://api.github.com/repos/blaze/dask/issues/847/labels{/name}","comments_url":"https://api.github.com/repos/blaze/dask/issues/847/comments","events_url":"https://api.github.com/repos/blaze/dask/issues/847/events","html_url":"https://github.com/blaze/dask/issues/847","id":118939251,"number":847,"title":"Replace dill with cloudpickle","user":{"login":"mrocklin","id":306380,"avatar_url":"https://avatars.githubusercontent.com/u/306380?v=3","gravatar_id":"","url":"https://api.github.com/users/mrocklin","html_url":"https://github.com/mrocklin","followers_url":"https://api.github.com/users/mrocklin/followers","following_url":"https://api.github.com/users/mrocklin/following{/other_user}","gists_url":"https://api.github.com/users/mrocklin/gists{/gist_id}","starred_url":"https://api.github.com/users/mrocklin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mrocklin/subscriptions","organizations_url":"https://api.github.com/users/mrocklin/orgs","repos_url":"https://api.github.com/users/mrocklin/repos","events_url":"https://api.github.com/users/mrocklin/events{/privacy}","received_events_url":"https://api.github.com/users/mrocklin/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":7,"created_at":"2015-11-25T23:07:27Z","updated_at":"2016-01-05T18:46:18Z","closed_at":"2016-01-05T18:46:18Z","body":"Should we make this switch?  Cloudpickle handles a few pragmatic cases that dill does not, notably closures that include globals, e.g.\r\n\r\n```python\r\n>>> import numpy as np\r\n>>> def f(x):\r\n...     return np.sin(x) + np.cos(x)   # closed over np, a global\r\n```\r\n\r\nThis  can be switched with the experimental `dill.settings['recurse'] = True` setting, but I've found that this causes some very strange behavior (functions like `int` are sometimes lost.)\r\n\r\n I've switched to `cloudpickle` in `distributed` and have so far been satisfied with the change."},"comment":{"url":"https://api.github.com/repos/blaze/dask/issues/comments/169093966","html_url":"https://github.com/blaze/dask/issues/847#issuecomment-169093966","issue_url":"https://api.github.com/repos/blaze/dask/issues/847","id":169093966,"user":{"login":"mrocklin","id":306380,"avatar_url":"https://avatars.githubusercontent.com/u/306380?v=3","gravatar_id":"","url":"https://api.github.com/users/mrocklin","html_url":"https://github.com/mrocklin","followers_url":"https://api.github.com/users/mrocklin/followers","following_url":"https://api.github.com/users/mrocklin/following{/other_user}","gists_url":"https://api.github.com/users/mrocklin/gists{/gist_id}","starred_url":"https://api.github.com/users/mrocklin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mrocklin/subscriptions","organizations_url":"https://api.github.com/users/mrocklin/orgs","repos_url":"https://api.github.com/users/mrocklin/repos","events_url":"https://api.github.com/users/mrocklin/events{/privacy}","received_events_url":"https://api.github.com/users/mrocklin/received_events","type":"User","site_admin":false},"created_at":"2016-01-05T18:46:18Z","updated_at":"2016-01-05T18:46:18Z","body":"This happened.  Closing"}}