{"action":"created","issue":{"url":"https://api.github.com/repos/mcmtroffaes/pathlib2/issues/7","labels_url":"https://api.github.com/repos/mcmtroffaes/pathlib2/issues/7/labels{/name}","comments_url":"https://api.github.com/repos/mcmtroffaes/pathlib2/issues/7/comments","events_url":"https://api.github.com/repos/mcmtroffaes/pathlib2/issues/7/events","html_url":"https://github.com/mcmtroffaes/pathlib2/pull/7","id":115177117,"number":7,"title":"fix for Python Numpy 1.10 fromfile()","user":{"login":"scienceopen","id":7458697,"avatar_url":"https://avatars.githubusercontent.com/u/7458697?v=3","gravatar_id":"","url":"https://api.github.com/users/scienceopen","html_url":"https://github.com/scienceopen","followers_url":"https://api.github.com/users/scienceopen/followers","following_url":"https://api.github.com/users/scienceopen/following{/other_user}","gists_url":"https://api.github.com/users/scienceopen/gists{/gist_id}","starred_url":"https://api.github.com/users/scienceopen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/scienceopen/subscriptions","organizations_url":"https://api.github.com/users/scienceopen/orgs","repos_url":"https://api.github.com/users/scienceopen/repos","events_url":"https://api.github.com/users/scienceopen/events{/privacy}","received_events_url":"https://api.github.com/users/scienceopen/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-11-04T23:53:42Z","updated_at":"2015-11-06T13:24:35Z","closed_at":"2015-11-05T09:48:43Z","pull_request":{"url":"https://api.github.com/repos/mcmtroffaes/pathlib2/pulls/7","html_url":"https://github.com/mcmtroffaes/pathlib2/pull/7","diff_url":"https://github.com/mcmtroffaes/pathlib2/pull/7.diff","patch_url":"https://github.com/mcmtroffaes/pathlib2/pull/7.patch"},"body":"numpy.fromfile() is a critically important function for loading raw binary data in a very fast manner.\r\n\r\nPython 2.x with Numpy 1.10 requires NOT to have io.BufferedReader. This patch makes pathlib2 return a traditional file handle for the .open() method on Python 2.x. \r\n\r\nAstropy had to do this too, see lines 387-414 of \r\nhttps://github.com/astropy/astropy/blob/master/astropy/io/fits/util.py\r\n\r\nThis is not a problem for Python 3.4-3.5 with Numpy 1.10, so I left as is.\r\n\r\nAfter future testing I realize this causes an issue with encoding/writing files. Perhaps you have more experience in this area, I didn't want to layer on hacks.\r\n\r\nPerhaps for now I will just put in my own user code a if PY2: then open() etc. instead of messing with pathlib2, as Python<3.4 is an edge case for me."},"comment":{"url":"https://api.github.com/repos/mcmtroffaes/pathlib2/issues/comments/154408100","html_url":"https://github.com/mcmtroffaes/pathlib2/pull/7#issuecomment-154408100","issue_url":"https://api.github.com/repos/mcmtroffaes/pathlib2/issues/7","id":154408100,"user":{"login":"mcmtroffaes","id":158568,"avatar_url":"https://avatars.githubusercontent.com/u/158568?v=3","gravatar_id":"","url":"https://api.github.com/users/mcmtroffaes","html_url":"https://github.com/mcmtroffaes","followers_url":"https://api.github.com/users/mcmtroffaes/followers","following_url":"https://api.github.com/users/mcmtroffaes/following{/other_user}","gists_url":"https://api.github.com/users/mcmtroffaes/gists{/gist_id}","starred_url":"https://api.github.com/users/mcmtroffaes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mcmtroffaes/subscriptions","organizations_url":"https://api.github.com/users/mcmtroffaes/orgs","repos_url":"https://api.github.com/users/mcmtroffaes/repos","events_url":"https://api.github.com/users/mcmtroffaes/events{/privacy}","received_events_url":"https://api.github.com/users/mcmtroffaes/received_events","type":"User","site_admin":false},"created_at":"2015-11-06T13:24:34Z","updated_at":"2015-11-06T13:24:34Z","body":"The pull request referenced above now has a fix for the problem."}}