{"action":"created","comment":{"url":"https://api.github.com/repos/numpy/numpy/pulls/comments/221868352","pull_request_review_id":160618768,"id":221868352,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIyMTg2ODM1Mg==","diff_hunk":"@@ -7,12 +7,16 @@\n     import collections.abc as collections_abc\n except ImportError:\n     import collections as collections_abc\n-import pickle\n import warnings\n import textwrap\n from os import path\n import pytest\n \n+if sys.version_info[:2] in ((3, 7), (3, 6)):\n+    import pickle5 as pickle\n+else:\n+    import pickle","path":"numpy/core/tests/test_records.py","position":13,"original_position":13,"commit_id":"a5faa9253a34ded1635086090e397d4878929d87","original_commit_id":"a5faa9253a34ded1635086090e397d4878929d87","user":{"login":"ogrisel","id":89061,"node_id":"MDQ6VXNlcjg5MDYx","avatar_url":"https://avatars0.githubusercontent.com/u/89061?v=4","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},"body":"Same comment here: pickle5 should never be a mandatory test dependency.","created_at":"2018-10-02T08:45:30Z","updated_at":"2018-10-02T08:45:30Z","html_url":"https://github.com/numpy/numpy/pull/12011#discussion_r221868352","pull_request_url":"https://api.github.com/repos/numpy/numpy/pulls/12011","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/numpy/numpy/pulls/comments/221868352"},"html":{"href":"https://github.com/numpy/numpy/pull/12011#discussion_r221868352"},"pull_request":{"href":"https://api.github.com/repos/numpy/numpy/pulls/12011"}}},"pull_request":{"url":"https://api.github.com/repos/numpy/numpy/pulls/12011","id":217320593,"node_id":"MDExOlB1bGxSZXF1ZXN0MjE3MzIwNTkz","html_url":"https://github.com/numpy/numpy/pull/12011","diff_url":"https://github.com/numpy/numpy/pull/12011.diff","patch_url":"https://github.com/numpy/numpy/pull/12011.patch","issue_url":"https://api.github.com/repos/numpy/numpy/issues/12011","number":12011,"state":"open","locked":false,"title":"WIP: implementation of array_reduce_ex","user":{"login":"pierreglaser","id":18555600,"node_id":"MDQ6VXNlcjE4NTU1NjAw","avatar_url":"https://avatars3.githubusercontent.com/u/18555600?v=4","gravatar_id":"","url":"https://api.github.com/users/pierreglaser","html_url":"https://github.com/pierreglaser","followers_url":"https://api.github.com/users/pierreglaser/followers","following_url":"https://api.github.com/users/pierreglaser/following{/other_user}","gists_url":"https://api.github.com/users/pierreglaser/gists{/gist_id}","starred_url":"https://api.github.com/users/pierreglaser/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pierreglaser/subscriptions","organizations_url":"https://api.github.com/users/pierreglaser/orgs","repos_url":"https://api.github.com/users/pierreglaser/repos","events_url":"https://api.github.com/users/pierreglaser/events{/privacy}","received_events_url":"https://api.github.com/users/pierreglaser/received_events","type":"User","site_admin":false},"body":"Follow up on #11161. \r\nIn order to enable no-copy pickling as mentioned in the [PEP 574 proposal](https://www.python.org/dev/peps/pep-0574),\r\nnumpy arrays need to have:\r\n* a `__reduce_ex__` method, returning metadata and a buffer on their internal data\r\n* a method that reconstructs an array from a buffer, a `dtype`  and a `shape` \r\n\r\n\r\nThe first one is mostly inspired from the `array_reduce` method in `core/src/multiarray/methods.c` \r\n\r\nThe second one is a wrapper written in python around `np.frombuffer(..).reshape(..)` \r\n\r\nThis is very much WIP as I am not familiar with the Python C API, as well as the related numpy guidelines, but the first results show the forecasted decrease in peak memory and cpu time: \r\n![results_c14eb6060b70ec1786bd869ef0879c8b0c8c6df8](https://user-images.githubusercontent.com/18555600/46150204-569a2800-c26c-11e8-809e-0b1b27c82cc4.png)\r\n\r\n\r\npinging @ogrisel and @pitrou as of now. ","created_at":"2018-09-21T15:26:38Z","updated_at":"2018-10-02T08:45:30Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ad233efd06c014dacf9c1079a7530591661820de","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":6359239,"node_id":"MDU6TGFiZWw2MzU5MjM5","url":"https://api.github.com/repos/numpy/numpy/labels/01%20-%20Enhancement","name":"01 - Enhancement","color":"fef2c0","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/numpy/numpy/pulls/12011/commits","review_comments_url":"https://api.github.com/repos/numpy/numpy/pulls/12011/comments","review_comment_url":"https://api.github.com/repos/numpy/numpy/pulls/comments{/number}","comments_url":"https://api.github.com/repos/numpy/numpy/issues/12011/comments","statuses_url":"https://api.github.com/repos/numpy/numpy/statuses/a5faa9253a34ded1635086090e397d4878929d87","head":{"label":"pierreglaser:implement-reduce-ex","ref":"implement-reduce-ex","sha":"a5faa9253a34ded1635086090e397d4878929d87","user":{"login":"pierreglaser","id":18555600,"node_id":"MDQ6VXNlcjE4NTU1NjAw","avatar_url":"https://avatars3.githubusercontent.com/u/18555600?v=4","gravatar_id":"","url":"https://api.github.com/users/pierreglaser","html_url":"https://github.com/pierreglaser","followers_url":"https://api.github.com/users/pierreglaser/followers","following_url":"https://api.github.com/users/pierreglaser/following{/other_user}","gists_url":"https://api.github.com/users/pierreglaser/gists{/gist_id}","starred_url":"https://api.github.com/users/pierreglaser/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pierreglaser/subscriptions","organizations_url":"https://api.github.com/users/pierreglaser/orgs","repos_url":"https://api.github.com/users/pierreglaser/repos","events_url":"https://api.github.com/users/pierreglaser/events{/privacy}","received_events_url":"https://api.github.com/users/pierreglaser/received_events","type":"User","site_admin":false},"repo":{"id":149419851,"node_id":"MDEwOlJlcG9zaXRvcnkxNDk0MTk4NTE=","name":"numpy","full_name":"pierreglaser/numpy","private":false,"owner":{"login":"pierreglaser","id":18555600,"node_id":"MDQ6VXNlcjE4NTU1NjAw","avatar_url":"https://avatars3.githubusercontent.com/u/18555600?v=4","gravatar_id":"","url":"https://api.github.com/users/pierreglaser","html_url":"https://github.com/pierreglaser","followers_url":"https://api.github.com/users/pierreglaser/followers","following_url":"https://api.github.com/users/pierreglaser/following{/other_user}","gists_url":"https://api.github.com/users/pierreglaser/gists{/gist_id}","starred_url":"https://api.github.com/users/pierreglaser/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pierreglaser/subscriptions","organizations_url":"https://api.github.com/users/pierreglaser/orgs","repos_url":"https://api.github.com/users/pierreglaser/repos","events_url":"https://api.github.com/users/pierreglaser/events{/privacy}","received_events_url":"https://api.github.com/users/pierreglaser/received_events","type":"User","site_admin":false},"html_url":"https://github.com/pierreglaser/numpy","description":"Numpy main repository","fork":true,"url":"https://api.github.com/repos/pierreglaser/numpy","forks_url":"https://api.github.com/repos/pierreglaser/numpy/forks","keys_url":"https://api.github.com/repos/pierreglaser/numpy/keys{/key_id}","collaborators_url":"https://api.github.com/repos/pierreglaser/numpy/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/pierreglaser/numpy/teams","hooks_url":"https://api.github.com/repos/pierreglaser/numpy/hooks","issue_events_url":"https://api.github.com/repos/pierreglaser/numpy/issues/events{/number}","events_url":"https://api.github.com/repos/pierreglaser/numpy/events","assignees_url":"https://api.github.com/repos/pierreglaser/numpy/assignees{/user}","branches_url":"https://api.github.com/repos/pierreglaser/numpy/branches{/branch}","tags_url":"https://api.github.com/repos/pierreglaser/numpy/tags","blobs_url":"https://api.github.com/repos/pierreglaser/numpy/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/pierreglaser/numpy/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/pierreglaser/numpy/git/refs{/sha}","trees_url":"https://api.github.com/repos/pierreglaser/numpy/git/trees{/sha}","statuses_url":"https://api.github.com/repos/pierreglaser/numpy/statuses/{sha}","languages_url":"https://api.github.com/repos/pierreglaser/numpy/languages","stargazers_url":"https://api.github.com/repos/pierreglaser/numpy/stargazers","contributors_url":"https://api.github.com/repos/pierreglaser/numpy/contributors","subscribers_url":"https://api.github.com/repos/pierreglaser/numpy/subscribers","subscription_url":"https://api.github.com/repos/pierreglaser/numpy/subscription","commits_url":"https://api.github.com/repos/pierreglaser/numpy/commits{/sha}","git_commits_url":"https://api.github.com/repos/pierreglaser/numpy/git/commits{/sha}","comments_url":"https://api.github.com/repos/pierreglaser/numpy/comments{/number}","issue_comment_url":"https://api.github.com/repos/pierreglaser/numpy/issues/comments{/number}","contents_url":"https://api.github.com/repos/pierreglaser/numpy/contents/{+path}","compare_url":"https://api.github.com/repos/pierreglaser/numpy/compare/{base}...{head}","merges_url":"https://api.github.com/repos/pierreglaser/numpy/merges","archive_url":"https://api.github.com/repos/pierreglaser/numpy/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/pierreglaser/numpy/downloads","issues_url":"https://api.github.com/repos/pierreglaser/numpy/issues{/number}","pulls_url":"https://api.github.com/repos/pierreglaser/numpy/pulls{/number}","milestones_url":"https://api.github.com/repos/pierreglaser/numpy/milestones{/number}","notifications_url":"https://api.github.com/repos/pierreglaser/numpy/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/pierreglaser/numpy/labels{/name}","releases_url":"https://api.github.com/repos/pierreglaser/numpy/releases{/id}","deployments_url":"https://api.github.com/repos/pierreglaser/numpy/deployments","created_at":"2018-09-19T08:44:12Z","updated_at":"2018-09-19T08:44:19Z","pushed_at":"2018-10-02T08:11:49Z","git_url":"git://github.com/pierreglaser/numpy.git","ssh_url":"git@github.com:pierreglaser/numpy.git","clone_url":"https://github.com/pierreglaser/numpy.git","svn_url":"https://github.com/pierreglaser/numpy","homepage":"https://www.numpy.org/","size":59713,"stargazers_count":0,"watchers_count":0,"language":"C","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"other","name":"NOASSERTION","spdx_id":"NOASSERTION","url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"numpy:master","ref":"master","sha":"e9488b272284db3923dd06cd4e74f836add61557","user":{"login":"numpy","id":288276,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI4ODI3Ng==","avatar_url":"https://avatars2.githubusercontent.com/u/288276?v=4","gravatar_id":"","url":"https://api.github.com/users/numpy","html_url":"https://github.com/numpy","followers_url":"https://api.github.com/users/numpy/followers","following_url":"https://api.github.com/users/numpy/following{/other_user}","gists_url":"https://api.github.com/users/numpy/gists{/gist_id}","starred_url":"https://api.github.com/users/numpy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/numpy/subscriptions","organizations_url":"https://api.github.com/users/numpy/orgs","repos_url":"https://api.github.com/users/numpy/repos","events_url":"https://api.github.com/users/numpy/events{/privacy}","received_events_url":"https://api.github.com/users/numpy/received_events","type":"Organization","site_admin":false},"repo":{"id":908607,"node_id":"MDEwOlJlcG9zaXRvcnk5MDg2MDc=","name":"numpy","full_name":"numpy/numpy","private":false,"owner":{"login":"numpy","id":288276,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI4ODI3Ng==","avatar_url":"https://avatars2.githubusercontent.com/u/288276?v=4","gravatar_id":"","url":"https://api.github.com/users/numpy","html_url":"https://github.com/numpy","followers_url":"https://api.github.com/users/numpy/followers","following_url":"https://api.github.com/users/numpy/following{/other_user}","gists_url":"https://api.github.com/users/numpy/gists{/gist_id}","starred_url":"https://api.github.com/users/numpy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/numpy/subscriptions","organizations_url":"https://api.github.com/users/numpy/orgs","repos_url":"https://api.github.com/users/numpy/repos","events_url":"https://api.github.com/users/numpy/events{/privacy}","received_events_url":"https://api.github.com/users/numpy/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/numpy/numpy","description":"Numpy main repository","fork":false,"url":"https://api.github.com/repos/numpy/numpy","forks_url":"https://api.github.com/repos/numpy/numpy/forks","keys_url":"https://api.github.com/repos/numpy/numpy/keys{/key_id}","collaborators_url":"https://api.github.com/repos/numpy/numpy/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/numpy/numpy/teams","hooks_url":"https://api.github.com/repos/numpy/numpy/hooks","issue_events_url":"https://api.github.com/repos/numpy/numpy/issues/events{/number}","events_url":"https://api.github.com/repos/numpy/numpy/events","assignees_url":"https://api.github.com/repos/numpy/numpy/assignees{/user}","branches_url":"https://api.github.com/repos/numpy/numpy/branches{/branch}","tags_url":"https://api.github.com/repos/numpy/numpy/tags","blobs_url":"https://api.github.com/repos/numpy/numpy/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/numpy/numpy/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/numpy/numpy/git/refs{/sha}","trees_url":"https://api.github.com/repos/numpy/numpy/git/trees{/sha}","statuses_url":"https://api.github.com/repos/numpy/numpy/statuses/{sha}","languages_url":"https://api.github.com/repos/numpy/numpy/languages","stargazers_url":"https://api.github.com/repos/numpy/numpy/stargazers","contributors_url":"https://api.github.com/repos/numpy/numpy/contributors","subscribers_url":"https://api.github.com/repos/numpy/numpy/subscribers","subscription_url":"https://api.github.com/repos/numpy/numpy/subscription","commits_url":"https://api.github.com/repos/numpy/numpy/commits{/sha}","git_commits_url":"https://api.github.com/repos/numpy/numpy/git/commits{/sha}","comments_url":"https://api.github.com/repos/numpy/numpy/comments{/number}","issue_comment_url":"https://api.github.com/repos/numpy/numpy/issues/comments{/number}","contents_url":"https://api.github.com/repos/numpy/numpy/contents/{+path}","compare_url":"https://api.github.com/repos/numpy/numpy/compare/{base}...{head}","merges_url":"https://api.github.com/repos/numpy/numpy/merges","archive_url":"https://api.github.com/repos/numpy/numpy/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/numpy/numpy/downloads","issues_url":"https://api.github.com/repos/numpy/numpy/issues{/number}","pulls_url":"https://api.github.com/repos/numpy/numpy/pulls{/number}","milestones_url":"https://api.github.com/repos/numpy/numpy/milestones{/number}","notifications_url":"https://api.github.com/repos/numpy/numpy/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/numpy/numpy/labels{/name}","releases_url":"https://api.github.com/repos/numpy/numpy/releases{/id}","deployments_url":"https://api.github.com/repos/numpy/numpy/deployments","created_at":"2010-09-13T23:02:39Z","updated_at":"2018-10-02T03:32:48Z","pushed_at":"2018-10-02T08:11:55Z","git_url":"git://github.com/numpy/numpy.git","ssh_url":"git@github.com:numpy/numpy.git","clone_url":"https://github.com/numpy/numpy.git","svn_url":"https://github.com/numpy/numpy","homepage":"https://www.numpy.org/","size":61034,"stargazers_count":8280,"watchers_count":8280,"language":"C","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3026,"mirror_url":null,"archived":false,"open_issues_count":1976,"license":{"key":"other","name":"NOASSERTION","spdx_id":"NOASSERTION","url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":3026,"open_issues":1976,"watchers":8280,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/numpy/numpy/pulls/12011"},"html":{"href":"https://github.com/numpy/numpy/pull/12011"},"issue":{"href":"https://api.github.com/repos/numpy/numpy/issues/12011"},"comments":{"href":"https://api.github.com/repos/numpy/numpy/issues/12011/comments"},"review_comments":{"href":"https://api.github.com/repos/numpy/numpy/pulls/12011/comments"},"review_comment":{"href":"https://api.github.com/repos/numpy/numpy/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/numpy/numpy/pulls/12011/commits"},"statuses":{"href":"https://api.github.com/repos/numpy/numpy/statuses/a5faa9253a34ded1635086090e397d4878929d87"}},"author_association":"NONE"}}
{"actor":{"display_login":"ogrisel"}}