{"action":"created","issue":{"url":"https://api.github.com/repos/Blosc/python-blosc/issues/149","repository_url":"https://api.github.com/repos/Blosc/python-blosc","labels_url":"https://api.github.com/repos/Blosc/python-blosc/issues/149/labels{/name}","comments_url":"https://api.github.com/repos/Blosc/python-blosc/issues/149/comments","events_url":"https://api.github.com/repos/Blosc/python-blosc/issues/149/events","html_url":"https://github.com/Blosc/python-blosc/pull/149","id":371873138,"node_id":"MDExOlB1bGxSZXF1ZXN0MjI0MjIwODc4","number":149,"title":"Including kwargs to the unpack_array API","user":{"login":"simnyatsanga","id":5268965,"node_id":"MDQ6VXNlcjUyNjg5NjU=","avatar_url":"https://avatars1.githubusercontent.com/u/5268965?v=4","gravatar_id":"","url":"https://api.github.com/users/simnyatsanga","html_url":"https://github.com/simnyatsanga","followers_url":"https://api.github.com/users/simnyatsanga/followers","following_url":"https://api.github.com/users/simnyatsanga/following{/other_user}","gists_url":"https://api.github.com/users/simnyatsanga/gists{/gist_id}","starred_url":"https://api.github.com/users/simnyatsanga/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/simnyatsanga/subscriptions","organizations_url":"https://api.github.com/users/simnyatsanga/orgs","repos_url":"https://api.github.com/users/simnyatsanga/repos","events_url":"https://api.github.com/users/simnyatsanga/events{/privacy}","received_events_url":"https://api.github.com/users/simnyatsanga/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2018-10-19T09:17:13Z","updated_at":"2018-10-20T05:01:47Z","closed_at":null,"author_association":"NONE","pull_request":{"url":"https://api.github.com/repos/Blosc/python-blosc/pulls/149","html_url":"https://github.com/Blosc/python-blosc/pull/149","diff_url":"https://github.com/Blosc/python-blosc/pull/149.diff","patch_url":"https://github.com/Blosc/python-blosc/pull/149.patch"},"body":"This PR includes `**kwargs` options to the `unpack_array` API so that they can be used by the `pickle.loads` API: https://docs.python.org/3/library/pickle.html#pickle.loads.\r\n\r\nThis, for example, will allow users to pass an `encoding` option inorder to unpickle data in Python3.x that was pickled in Python2.x"},"comment":{"url":"https://api.github.com/repos/Blosc/python-blosc/issues/comments/431549118","html_url":"https://github.com/Blosc/python-blosc/pull/149#issuecomment-431549118","issue_url":"https://api.github.com/repos/Blosc/python-blosc/issues/149","id":431549118,"node_id":"MDEyOklzc3VlQ29tbWVudDQzMTU0OTExOA==","user":{"login":"simnyatsanga","id":5268965,"node_id":"MDQ6VXNlcjUyNjg5NjU=","avatar_url":"https://avatars1.githubusercontent.com/u/5268965?v=4","gravatar_id":"","url":"https://api.github.com/users/simnyatsanga","html_url":"https://github.com/simnyatsanga","followers_url":"https://api.github.com/users/simnyatsanga/followers","following_url":"https://api.github.com/users/simnyatsanga/following{/other_user}","gists_url":"https://api.github.com/users/simnyatsanga/gists{/gist_id}","starred_url":"https://api.github.com/users/simnyatsanga/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/simnyatsanga/subscriptions","organizations_url":"https://api.github.com/users/simnyatsanga/orgs","repos_url":"https://api.github.com/users/simnyatsanga/repos","events_url":"https://api.github.com/users/simnyatsanga/events{/privacy}","received_events_url":"https://api.github.com/users/simnyatsanga/received_events","type":"User","site_admin":false},"created_at":"2018-10-20T05:01:47Z","updated_at":"2018-10-20T05:01:47Z","author_association":"NONE","body":"> Looks like the tests are failing again?\r\n\r\n@esc We added an explicit test case with data that was pickled in Py2.7, then we try to unpickle it in Py3.x. We noticed that the Py2.7 data is read in as a byte string in Py3.x so we first unpickle the string using the `bytes` codec resulting in a Numpy array of `byte` elements, then we decode each element via UTF-8 to get the original unicode elements. This is done here: https://github.com/Blosc/python-blosc/pull/149/files#diff-1eb7bd44760146bc4b6114436a4a8aaaR758. \r\n\r\nIt looks like that specific test case is failing specifically for Py3.3.6 here:\r\n```\r\n======================================================================\r\nERROR: test_unpack_array_with_unicode_characters_from_py27 (blosc.test.TestCodec)\r\n----------------------------------------------------------------------\r\nTraceback (most recent call last):\r\n  File \"/home/travis/virtualenv/python3.3.6/lib/python3.3/site-packages/blosc/test.py\", line 270, in test_unpack_array_with_unicode_characters_from_py27\r\n    np.testing.assert_array_equal(out_array, blosc.unpack_array(self.PY_27_INPUT, encoding='bytes'))\r\n  File \"/home/travis/virtualenv/python3.3.6/lib/python3.3/site-packages/blosc/toplevel.py\", line 757, in unpack_array\r\n    array = pickle.loads(pickled_array, **kwargs)\r\nLookupError: unknown encoding: bytes\r\n```\r\nSo I'm trying to figure out why Py3.3.6 doesn't have the `bytes` codec in it's codecs `Lookup`. Any ideas would also be helpful :)"}}
{"actor":{"display_login":"simnyatsanga"}}