{"action":"created","issue":{"url":"https://api.github.com/repos/joblib/joblib/issues/351","repository_url":"https://api.github.com/repos/joblib/joblib","labels_url":"https://api.github.com/repos/joblib/joblib/issues/351/labels{/name}","comments_url":"https://api.github.com/repos/joblib/joblib/issues/351/comments","events_url":"https://api.github.com/repos/joblib/joblib/issues/351/events","html_url":"https://github.com/joblib/joblib/pull/351","id":154250123,"number":351,"title":"[MRG]  persistence in/from file objects","user":{"login":"aabadie","id":1375137,"avatar_url":"https://avatars.githubusercontent.com/u/1375137?v=3","gravatar_id":"","url":"https://api.github.com/users/aabadie","html_url":"https://github.com/aabadie","followers_url":"https://api.github.com/users/aabadie/followers","following_url":"https://api.github.com/users/aabadie/following{/other_user}","gists_url":"https://api.github.com/users/aabadie/gists{/gist_id}","starred_url":"https://api.github.com/users/aabadie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aabadie/subscriptions","organizations_url":"https://api.github.com/users/aabadie/orgs","repos_url":"https://api.github.com/users/aabadie/repos","events_url":"https://api.github.com/users/aabadie/events{/privacy}","received_events_url":"https://api.github.com/users/aabadie/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/joblib/joblib/labels/Enhancement","name":"Enhancement","color":"fbca04"},{"url":"https://api.github.com/repos/joblib/joblib/labels/in%20progress","name":"in progress","color":"ededed"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/joblib/joblib/milestones/9","html_url":"https://github.com/joblib/joblib/milestones/0.10","labels_url":"https://api.github.com/repos/joblib/joblib/milestones/9/labels","id":1821009,"number":9,"title":"0.10","description":null,"creator":{"login":"ogrisel","id":89061,"avatar_url":"https://avatars.githubusercontent.com/u/89061?v=3","gravatar_id":"","url":"https://api.github.com/users/ogrisel","html_url":"https://github.com/ogrisel","followers_url":"https://api.github.com/users/ogrisel/followers","following_url":"https://api.github.com/users/ogrisel/following{/other_user}","gists_url":"https://api.github.com/users/ogrisel/gists{/gist_id}","starred_url":"https://api.github.com/users/ogrisel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ogrisel/subscriptions","organizations_url":"https://api.github.com/users/ogrisel/orgs","repos_url":"https://api.github.com/users/ogrisel/repos","events_url":"https://api.github.com/users/ogrisel/events{/privacy}","received_events_url":"https://api.github.com/users/ogrisel/received_events","type":"User","site_admin":false},"open_issues":1,"closed_issues":6,"state":"open","created_at":"2016-06-10T22:35:19Z","updated_at":"2016-06-22T15:03:48Z","due_on":null,"closed_at":null},"comments":23,"created_at":"2016-05-11T13:56:43Z","updated_at":"2016-06-29T14:11:00Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/joblib/joblib/pulls/351","html_url":"https://github.com/joblib/joblib/pull/351","diff_url":"https://github.com/joblib/joblib/pull/351.diff","patch_url":"https://github.com/joblib/joblib/pull/351.patch"},"body":"This PR should fix #341 and fix #312.\r\n\r\nExamples of new usage:\r\n```python\r\nimport joblib\r\ndata = \"some data to persist\"\r\n# persist to/from a raw file\r\nwith open('/tmp/test.pkl', 'wb') as f:\r\n    joblib.dump(data, f)\r\n\r\nwith open('/tmp/test.pkl', 'rb') as f:\r\n    print(joblib.load(f))\r\n\r\n# compressors are also supported:\r\nimport gzip\r\nwith gzip.GzipFile('/tmp/test.pkl.gz', 'wb') as f:\r\n    joblib.dump(data, f)\r\n\r\nwith gzip.GzipFile('/tmp/test.pkl.gz', 'rb') as f:\r\n    print(joblib.load(f))\r\n\r\n# auto detection of compression also works:\r\nwith open('/tmp/test.pkl.gz', 'rb') as f:\r\n    print(joblib.load(f))\r\n\r\n# it's also possible to pickle in a buffer in memory using io.BytesIO:\r\nimport io\r\nbuf = io.BytesIO()\r\njoblib.dump(data, buf)\r\njoblib.load(buf)\r\n```\r\n\r\nTest functions are still missing."},"comment":{"url":"https://api.github.com/repos/joblib/joblib/issues/comments/229367746","html_url":"https://github.com/joblib/joblib/pull/351#issuecomment-229367746","issue_url":"https://api.github.com/repos/joblib/joblib/issues/351","id":229367746,"user":{"login":"lesteve","id":1680079,"avatar_url":"https://avatars.githubusercontent.com/u/1680079?v=3","gravatar_id":"","url":"https://api.github.com/users/lesteve","html_url":"https://github.com/lesteve","followers_url":"https://api.github.com/users/lesteve/followers","following_url":"https://api.github.com/users/lesteve/following{/other_user}","gists_url":"https://api.github.com/users/lesteve/gists{/gist_id}","starred_url":"https://api.github.com/users/lesteve/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lesteve/subscriptions","organizations_url":"https://api.github.com/users/lesteve/orgs","repos_url":"https://api.github.com/users/lesteve/repos","events_url":"https://api.github.com/users/lesteve/events{/privacy}","received_events_url":"https://api.github.com/users/lesteve/received_events","type":"User","site_admin":false},"created_at":"2016-06-29T14:11:00Z","updated_at":"2016-06-29T14:11:00Z","body":"> So I guess we can keep it as it is in this PR (returns nothing).\r\n\r\nLet's do it like this in this PR. It'd be good to try to make the joblib.dump return type consistent whether it takes a filename or a file object though in a further PR.\r\n"}}
{"actor":{"display_login":"lesteve"}}