{"action":"created","comment":{"url":"https://api.github.com/repos/numpy/numpy/pulls/comments/79647438","id":79647438,"diff_hunk":"@@ -864,8 +864,12 @@ def test_casting(self):\n \n         # Check that 'equiv' casting can reorder fields and change byte\n         # order\n+        # New in 1.12: This behavior changes in 1.13, test for dep warning\n         assert_(np.can_cast(a.dtype, b.dtype, casting='equiv'))\n-        c = a.astype(b.dtype, casting='equiv')\n+        with warnings.catch_warnings(record=True) as log:","path":"numpy/core/tests/test_multiarray.py","position":7,"original_position":7,"commit_id":"8c861f41a4ad8909b0ad611b6723dff5f6caad35","original_commit_id":"8c861f41a4ad8909b0ad611b6723dff5f6caad35","user":{"login":"seberg","id":61977,"avatar_url":"https://avatars.githubusercontent.com/u/61977?v=3","gravatar_id":"","url":"https://api.github.com/users/seberg","html_url":"https://github.com/seberg","followers_url":"https://api.github.com/users/seberg/followers","following_url":"https://api.github.com/users/seberg/following{/other_user}","gists_url":"https://api.github.com/users/seberg/gists{/gist_id}","starred_url":"https://api.github.com/users/seberg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/seberg/subscriptions","organizations_url":"https://api.github.com/users/seberg/orgs","repos_url":"https://api.github.com/users/seberg/repos","events_url":"https://api.github.com/users/seberg/events{/privacy}","received_events_url":"https://api.github.com/users/seberg/received_events","type":"User","site_admin":false},"body":"actually, maybe assert_warns even was a context manager by now, I somewhat think it was....","created_at":"2016-09-20T16:01:22Z","updated_at":"2016-09-20T16:01:22Z","html_url":"https://github.com/numpy/numpy/pull/6054#discussion_r79647438","pull_request_url":"https://api.github.com/repos/numpy/numpy/pulls/6054","_links":{"self":{"href":"https://api.github.com/repos/numpy/numpy/pulls/comments/79647438"},"html":{"href":"https://github.com/numpy/numpy/pull/6054#discussion_r79647438"},"pull_request":{"href":"https://api.github.com/repos/numpy/numpy/pulls/6054"}}},"pull_request":{"url":"https://api.github.com/repos/numpy/numpy/pulls/6054","id":39496349,"html_url":"https://github.com/numpy/numpy/pull/6054","diff_url":"https://github.com/numpy/numpy/pull/6054.diff","patch_url":"https://github.com/numpy/numpy/pull/6054.patch","issue_url":"https://api.github.com/repos/numpy/numpy/issues/6054","number":6054,"state":"open","locked":false,"title":"WIP: MAINT: Add deprecation warning to views of multi-field indexes","user":{"login":"ahaldane","id":9040124,"avatar_url":"https://avatars.githubusercontent.com/u/9040124?v=3","gravatar_id":"","url":"https://api.github.com/users/ahaldane","html_url":"https://github.com/ahaldane","followers_url":"https://api.github.com/users/ahaldane/followers","following_url":"https://api.github.com/users/ahaldane/following{/other_user}","gists_url":"https://api.github.com/users/ahaldane/gists{/gist_id}","starred_url":"https://api.github.com/users/ahaldane/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ahaldane/subscriptions","organizations_url":"https://api.github.com/users/ahaldane/orgs","repos_url":"https://api.github.com/users/ahaldane/repos","events_url":"https://api.github.com/users/ahaldane/events{/privacy}","received_events_url":"https://api.github.com/users/ahaldane/received_events","type":"User","site_admin":false},"body":"As discussed in #6053, in preparation for making multi-field indices return a view instead of a copy, this adds a deprecation warning when attempting to view the result of a multi-field index, as in:\r\n\r\n    >>> a = ones(10, dtype='i8,i8,i8')\r\n    >>> b = a[['f0','f2']\r\n    >>> b.view('i4') # Deprecation warning\r\n\r\nSuch code will break any time we convert copies to views, because the byte arrangement of copies and views is necessarily different. I'd like to get it in for 1.10, so we can more easily make the copy->view change in 1.11.\r\n\r\nMy computer access is limited right now so this PR might be a bit rough, I'll tidy it later. Just posting for feedback now.\r\n\r\nOne thing I haven't figured out is how to make the unit tests show the deprecation warning: There are unit tests which I know show the warning (`test_field_names`) but the warnings don't show up when I run `np.test('full')` or even `np.test('full', raise_warnings=[FutureWarning])`. I'd like to use this to catch all the numpy code that will break when convertingmulti-field  copies to view. Any ideas?\r\n","created_at":"2015-07-08T16:27:42Z","updated_at":"2016-09-20T16:01:22Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f42ba3833a5cecaf39170645767105d91b3636d1","assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/numpy/numpy/milestones/41","html_url":"https://github.com/numpy/numpy/milestones/1.12.0%20release","labels_url":"https://api.github.com/repos/numpy/numpy/milestones/41/labels","id":1503092,"number":41,"title":"1.12.0 release","description":"Tag for the Numpy 1.12.0 release.","creator":{"login":"charris","id":77272,"avatar_url":"https://avatars.githubusercontent.com/u/77272?v=3","gravatar_id":"","url":"https://api.github.com/users/charris","html_url":"https://github.com/charris","followers_url":"https://api.github.com/users/charris/followers","following_url":"https://api.github.com/users/charris/following{/other_user}","gists_url":"https://api.github.com/users/charris/gists{/gist_id}","starred_url":"https://api.github.com/users/charris/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/charris/subscriptions","organizations_url":"https://api.github.com/users/charris/orgs","repos_url":"https://api.github.com/users/charris/repos","events_url":"https://api.github.com/users/charris/events{/privacy}","received_events_url":"https://api.github.com/users/charris/received_events","type":"User","site_admin":false},"open_issues":29,"closed_issues":52,"state":"open","created_at":"2016-01-12T20:39:09Z","updated_at":"2016-09-18T13:50:57Z","due_on":null,"closed_at":null},"commits_url":"https://api.github.com/repos/numpy/numpy/pulls/6054/commits","review_comments_url":"https://api.github.com/repos/numpy/numpy/pulls/6054/comments","review_comment_url":"https://api.github.com/repos/numpy/numpy/pulls/comments{/number}","comments_url":"https://api.github.com/repos/numpy/numpy/issues/6054/comments","statuses_url":"https://api.github.com/repos/numpy/numpy/statuses/8c861f41a4ad8909b0ad611b6723dff5f6caad35","head":{"label":"ahaldane:warnview","ref":"warnview","sha":"8c861f41a4ad8909b0ad611b6723dff5f6caad35","user":{"login":"ahaldane","id":9040124,"avatar_url":"https://avatars.githubusercontent.com/u/9040124?v=3","gravatar_id":"","url":"https://api.github.com/users/ahaldane","html_url":"https://github.com/ahaldane","followers_url":"https://api.github.com/users/ahaldane/followers","following_url":"https://api.github.com/users/ahaldane/following{/other_user}","gists_url":"https://api.github.com/users/ahaldane/gists{/gist_id}","starred_url":"https://api.github.com/users/ahaldane/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ahaldane/subscriptions","organizations_url":"https://api.github.com/users/ahaldane/orgs","repos_url":"https://api.github.com/users/ahaldane/repos","events_url":"https://api.github.com/users/ahaldane/events{/privacy}","received_events_url":"https://api.github.com/users/ahaldane/received_events","type":"User","site_admin":false},"repo":{"id":29257804,"name":"numpy","full_name":"ahaldane/numpy","owner":{"login":"ahaldane","id":9040124,"avatar_url":"https://avatars.githubusercontent.com/u/9040124?v=3","gravatar_id":"","url":"https://api.github.com/users/ahaldane","html_url":"https://github.com/ahaldane","followers_url":"https://api.github.com/users/ahaldane/followers","following_url":"https://api.github.com/users/ahaldane/following{/other_user}","gists_url":"https://api.github.com/users/ahaldane/gists{/gist_id}","starred_url":"https://api.github.com/users/ahaldane/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ahaldane/subscriptions","organizations_url":"https://api.github.com/users/ahaldane/orgs","repos_url":"https://api.github.com/users/ahaldane/repos","events_url":"https://api.github.com/users/ahaldane/events{/privacy}","received_events_url":"https://api.github.com/users/ahaldane/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ahaldane/numpy","description":"Numpy main repository","fork":true,"url":"https://api.github.com/repos/ahaldane/numpy","forks_url":"https://api.github.com/repos/ahaldane/numpy/forks","keys_url":"https://api.github.com/repos/ahaldane/numpy/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ahaldane/numpy/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ahaldane/numpy/teams","hooks_url":"https://api.github.com/repos/ahaldane/numpy/hooks","issue_events_url":"https://api.github.com/repos/ahaldane/numpy/issues/events{/number}","events_url":"https://api.github.com/repos/ahaldane/numpy/events","assignees_url":"https://api.github.com/repos/ahaldane/numpy/assignees{/user}","branches_url":"https://api.github.com/repos/ahaldane/numpy/branches{/branch}","tags_url":"https://api.github.com/repos/ahaldane/numpy/tags","blobs_url":"https://api.github.com/repos/ahaldane/numpy/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ahaldane/numpy/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ahaldane/numpy/git/refs{/sha}","trees_url":"https://api.github.com/repos/ahaldane/numpy/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ahaldane/numpy/statuses/{sha}","languages_url":"https://api.github.com/repos/ahaldane/numpy/languages","stargazers_url":"https://api.github.com/repos/ahaldane/numpy/stargazers","contributors_url":"https://api.github.com/repos/ahaldane/numpy/contributors","subscribers_url":"https://api.github.com/repos/ahaldane/numpy/subscribers","subscription_url":"https://api.github.com/repos/ahaldane/numpy/subscription","commits_url":"https://api.github.com/repos/ahaldane/numpy/commits{/sha}","git_commits_url":"https://api.github.com/repos/ahaldane/numpy/git/commits{/sha}","comments_url":"https://api.github.com/repos/ahaldane/numpy/comments{/number}","issue_comment_url":"https://api.github.com/repos/ahaldane/numpy/issues/comments{/number}","contents_url":"https://api.github.com/repos/ahaldane/numpy/contents/{+path}","compare_url":"https://api.github.com/repos/ahaldane/numpy/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ahaldane/numpy/merges","archive_url":"https://api.github.com/repos/ahaldane/numpy/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ahaldane/numpy/downloads","issues_url":"https://api.github.com/repos/ahaldane/numpy/issues{/number}","pulls_url":"https://api.github.com/repos/ahaldane/numpy/pulls{/number}","milestones_url":"https://api.github.com/repos/ahaldane/numpy/milestones{/number}","notifications_url":"https://api.github.com/repos/ahaldane/numpy/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ahaldane/numpy/labels{/name}","releases_url":"https://api.github.com/repos/ahaldane/numpy/releases{/id}","deployments_url":"https://api.github.com/repos/ahaldane/numpy/deployments","created_at":"2015-01-14T18:01:59Z","updated_at":"2015-01-25T23:16:50Z","pushed_at":"2016-09-20T14:13:24Z","git_url":"git://github.com/ahaldane/numpy.git","ssh_url":"git@github.com:ahaldane/numpy.git","clone_url":"https://github.com/ahaldane/numpy.git","svn_url":"https://github.com/ahaldane/numpy","homepage":"http://www.numpy.org/","size":43199,"stargazers_count":0,"watchers_count":0,"language":"C","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"numpy:master","ref":"master","sha":"55ece5839d3e9327de7a23ed346a12ec9526899d","user":{"login":"numpy","id":288276,"avatar_url":"https://avatars.githubusercontent.com/u/288276?v=3","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,"name":"numpy","full_name":"numpy/numpy","owner":{"login":"numpy","id":288276,"avatar_url":"https://avatars.githubusercontent.com/u/288276?v=3","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},"private":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":"2016-09-20T12:44:37Z","pushed_at":"2016-09-20T15:42:06Z","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":"http://www.numpy.org/","size":80712,"stargazers_count":3354,"watchers_count":3354,"language":"C","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1701,"mirror_url":null,"open_issues_count":1297,"forks":1701,"open_issues":1297,"watchers":3354,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/numpy/numpy/pulls/6054"},"html":{"href":"https://github.com/numpy/numpy/pull/6054"},"issue":{"href":"https://api.github.com/repos/numpy/numpy/issues/6054"},"comments":{"href":"https://api.github.com/repos/numpy/numpy/issues/6054/comments"},"review_comments":{"href":"https://api.github.com/repos/numpy/numpy/pulls/6054/comments"},"review_comment":{"href":"https://api.github.com/repos/numpy/numpy/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/numpy/numpy/pulls/6054/commits"},"statuses":{"href":"https://api.github.com/repos/numpy/numpy/statuses/8c861f41a4ad8909b0ad611b6723dff5f6caad35"}}}}
{"actor":{"display_login":"seberg"}}