{"action":"created","comment":{"url":"https://api.github.com/repos/tomchristie/django-rest-framework/pulls/comments/84690686","pull_request_review_id":5451609,"id":84690686,"diff_hunk":"@@ -37,15 +37,21 @@ def get_schema_fields(self, view):\n         return []\n \n \n-class FilterSet(object):\n-    def __new__(cls, *args, **kwargs):\n-        warnings.warn(\n-            \"The built in 'rest_framework.filters.FilterSet' is pending deprecation. \"\n-            \"You should use 'django_filters.rest_framework.FilterSet' instead.\",\n-            PendingDeprecationWarning\n-        )\n-        from django_filters.rest_framework import FilterSet\n-        return FilterSet(*args, **kwargs)\n+if django_filters:\n+    from django_filters.filterset import FilterSetMetaclass as DFFilterSetMetaclass\n+    from django_filters.rest_framework.filterset import FilterSet as DFFilterSet\n+\n+    class FilterSetMetaclass(DFFilterSetMetaclass):\n+        def __new__(cls, name, bases, attrs):\n+            warnings.warn(\n+                \"The built in 'rest_framework.filters.FilterSet' is pending deprecation. \"\n+                \"You should use 'django_filters.rest_framework.FilterSet' instead.\",\n+                PendingDeprecationWarning\n+            )\n+            return super(FilterSetMetaclass, cls).__new__(cls, name, bases, attrs)\n+\n+    class FilterSet(six.with_metaclass(FilterSetMetaclass, DFFilterSet)):\n+        pass","path":"rest_framework/filters.py","position":27,"original_position":27,"commit_id":"96523b688339bd39d89af72993867b04c923d0e8","original_commit_id":"96523b688339bd39d89af72993867b04c923d0e8","user":{"login":"tomchristie","id":647359,"avatar_url":"https://avatars.githubusercontent.com/u/647359?v=3","gravatar_id":"","url":"https://api.github.com/users/tomchristie","html_url":"https://github.com/tomchristie","followers_url":"https://api.github.com/users/tomchristie/followers","following_url":"https://api.github.com/users/tomchristie/following{/other_user}","gists_url":"https://api.github.com/users/tomchristie/gists{/gist_id}","starred_url":"https://api.github.com/users/tomchristie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tomchristie/subscriptions","organizations_url":"https://api.github.com/users/tomchristie/orgs","repos_url":"https://api.github.com/users/tomchristie/repos","events_url":"https://api.github.com/users/tomchristie/events{/privacy}","received_events_url":"https://api.github.com/users/tomchristie/received_events","type":"User","site_admin":false},"body":"This could just be...\r\n\r\n    else:\r\n        def FilterSet(*args, **kwargs):\r\n            assert False, 'django-filter must be installed to use the `FilterSet` class'","created_at":"2016-10-24T13:47:29Z","updated_at":"2016-10-24T13:47:29Z","html_url":"https://github.com/tomchristie/django-rest-framework/pull/4620#discussion_r84690686","pull_request_url":"https://api.github.com/repos/tomchristie/django-rest-framework/pulls/4620","_links":{"self":{"href":"https://api.github.com/repos/tomchristie/django-rest-framework/pulls/comments/84690686"},"html":{"href":"https://github.com/tomchristie/django-rest-framework/pull/4620#discussion_r84690686"},"pull_request":{"href":"https://api.github.com/repos/tomchristie/django-rest-framework/pulls/4620"}}},"pull_request":{"url":"https://api.github.com/repos/tomchristie/django-rest-framework/pulls/4620","id":90555978,"html_url":"https://github.com/tomchristie/django-rest-framework/pull/4620","diff_url":"https://github.com/tomchristie/django-rest-framework/pull/4620.diff","patch_url":"https://github.com/tomchristie/django-rest-framework/pull/4620.patch","issue_url":"https://api.github.com/repos/tomchristie/django-rest-framework/issues/4620","number":4620,"state":"open","locked":false,"title":"Fix FilterSet proxy","user":{"login":"conkiztador","id":1217253,"avatar_url":"https://avatars.githubusercontent.com/u/1217253?v=3","gravatar_id":"","url":"https://api.github.com/users/conkiztador","html_url":"https://github.com/conkiztador","followers_url":"https://api.github.com/users/conkiztador/followers","following_url":"https://api.github.com/users/conkiztador/following{/other_user}","gists_url":"https://api.github.com/users/conkiztador/gists{/gist_id}","starred_url":"https://api.github.com/users/conkiztador/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/conkiztador/subscriptions","organizations_url":"https://api.github.com/users/conkiztador/orgs","repos_url":"https://api.github.com/users/conkiztador/repos","events_url":"https://api.github.com/users/conkiztador/events{/privacy}","received_events_url":"https://api.github.com/users/conkiztador/received_events","type":"User","site_admin":false},"body":"## Description\r\n\r\nFix FilterSet proxying to be aware of parent metaclasses.\r\n\r\nCloses #4619.\r\n","created_at":"2016-10-24T06:33:41Z","updated_at":"2016-10-24T13:47:29Z","closed_at":null,"merged_at":null,"merge_commit_sha":"8f68cac06bb48d01f275500445ce61f60463937f","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/tomchristie/django-rest-framework/pulls/4620/commits","review_comments_url":"https://api.github.com/repos/tomchristie/django-rest-framework/pulls/4620/comments","review_comment_url":"https://api.github.com/repos/tomchristie/django-rest-framework/pulls/comments{/number}","comments_url":"https://api.github.com/repos/tomchristie/django-rest-framework/issues/4620/comments","statuses_url":"https://api.github.com/repos/tomchristie/django-rest-framework/statuses/96523b688339bd39d89af72993867b04c923d0e8","head":{"label":"conkiztador:filterset-proxy","ref":"filterset-proxy","sha":"96523b688339bd39d89af72993867b04c923d0e8","user":{"login":"conkiztador","id":1217253,"avatar_url":"https://avatars.githubusercontent.com/u/1217253?v=3","gravatar_id":"","url":"https://api.github.com/users/conkiztador","html_url":"https://github.com/conkiztador","followers_url":"https://api.github.com/users/conkiztador/followers","following_url":"https://api.github.com/users/conkiztador/following{/other_user}","gists_url":"https://api.github.com/users/conkiztador/gists{/gist_id}","starred_url":"https://api.github.com/users/conkiztador/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/conkiztador/subscriptions","organizations_url":"https://api.github.com/users/conkiztador/orgs","repos_url":"https://api.github.com/users/conkiztador/repos","events_url":"https://api.github.com/users/conkiztador/events{/privacy}","received_events_url":"https://api.github.com/users/conkiztador/received_events","type":"User","site_admin":false},"repo":{"id":71752398,"name":"django-rest-framework","full_name":"conkiztador/django-rest-framework","owner":{"login":"conkiztador","id":1217253,"avatar_url":"https://avatars.githubusercontent.com/u/1217253?v=3","gravatar_id":"","url":"https://api.github.com/users/conkiztador","html_url":"https://github.com/conkiztador","followers_url":"https://api.github.com/users/conkiztador/followers","following_url":"https://api.github.com/users/conkiztador/following{/other_user}","gists_url":"https://api.github.com/users/conkiztador/gists{/gist_id}","starred_url":"https://api.github.com/users/conkiztador/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/conkiztador/subscriptions","organizations_url":"https://api.github.com/users/conkiztador/orgs","repos_url":"https://api.github.com/users/conkiztador/repos","events_url":"https://api.github.com/users/conkiztador/events{/privacy}","received_events_url":"https://api.github.com/users/conkiztador/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/conkiztador/django-rest-framework","description":"Web APIs for Django.","fork":true,"url":"https://api.github.com/repos/conkiztador/django-rest-framework","forks_url":"https://api.github.com/repos/conkiztador/django-rest-framework/forks","keys_url":"https://api.github.com/repos/conkiztador/django-rest-framework/keys{/key_id}","collaborators_url":"https://api.github.com/repos/conkiztador/django-rest-framework/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/conkiztador/django-rest-framework/teams","hooks_url":"https://api.github.com/repos/conkiztador/django-rest-framework/hooks","issue_events_url":"https://api.github.com/repos/conkiztador/django-rest-framework/issues/events{/number}","events_url":"https://api.github.com/repos/conkiztador/django-rest-framework/events","assignees_url":"https://api.github.com/repos/conkiztador/django-rest-framework/assignees{/user}","branches_url":"https://api.github.com/repos/conkiztador/django-rest-framework/branches{/branch}","tags_url":"https://api.github.com/repos/conkiztador/django-rest-framework/tags","blobs_url":"https://api.github.com/repos/conkiztador/django-rest-framework/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/conkiztador/django-rest-framework/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/conkiztador/django-rest-framework/git/refs{/sha}","trees_url":"https://api.github.com/repos/conkiztador/django-rest-framework/git/trees{/sha}","statuses_url":"https://api.github.com/repos/conkiztador/django-rest-framework/statuses/{sha}","languages_url":"https://api.github.com/repos/conkiztador/django-rest-framework/languages","stargazers_url":"https://api.github.com/repos/conkiztador/django-rest-framework/stargazers","contributors_url":"https://api.github.com/repos/conkiztador/django-rest-framework/contributors","subscribers_url":"https://api.github.com/repos/conkiztador/django-rest-framework/subscribers","subscription_url":"https://api.github.com/repos/conkiztador/django-rest-framework/subscription","commits_url":"https://api.github.com/repos/conkiztador/django-rest-framework/commits{/sha}","git_commits_url":"https://api.github.com/repos/conkiztador/django-rest-framework/git/commits{/sha}","comments_url":"https://api.github.com/repos/conkiztador/django-rest-framework/comments{/number}","issue_comment_url":"https://api.github.com/repos/conkiztador/django-rest-framework/issues/comments{/number}","contents_url":"https://api.github.com/repos/conkiztador/django-rest-framework/contents/{+path}","compare_url":"https://api.github.com/repos/conkiztador/django-rest-framework/compare/{base}...{head}","merges_url":"https://api.github.com/repos/conkiztador/django-rest-framework/merges","archive_url":"https://api.github.com/repos/conkiztador/django-rest-framework/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/conkiztador/django-rest-framework/downloads","issues_url":"https://api.github.com/repos/conkiztador/django-rest-framework/issues{/number}","pulls_url":"https://api.github.com/repos/conkiztador/django-rest-framework/pulls{/number}","milestones_url":"https://api.github.com/repos/conkiztador/django-rest-framework/milestones{/number}","notifications_url":"https://api.github.com/repos/conkiztador/django-rest-framework/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/conkiztador/django-rest-framework/labels{/name}","releases_url":"https://api.github.com/repos/conkiztador/django-rest-framework/releases{/id}","deployments_url":"https://api.github.com/repos/conkiztador/django-rest-framework/deployments","created_at":"2016-10-24T04:42:02Z","updated_at":"2016-10-24T04:42:07Z","pushed_at":"2016-10-24T06:27:02Z","git_url":"git://github.com/conkiztador/django-rest-framework.git","ssh_url":"git@github.com:conkiztador/django-rest-framework.git","clone_url":"https://github.com/conkiztador/django-rest-framework.git","svn_url":"https://github.com/conkiztador/django-rest-framework","homepage":"www.django-rest-framework.org","size":25616,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":false,"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":"tomchristie:master","ref":"master","sha":"1bd35ad35553e1be91df85dadb163c240aa51498","user":{"login":"tomchristie","id":647359,"avatar_url":"https://avatars.githubusercontent.com/u/647359?v=3","gravatar_id":"","url":"https://api.github.com/users/tomchristie","html_url":"https://github.com/tomchristie","followers_url":"https://api.github.com/users/tomchristie/followers","following_url":"https://api.github.com/users/tomchristie/following{/other_user}","gists_url":"https://api.github.com/users/tomchristie/gists{/gist_id}","starred_url":"https://api.github.com/users/tomchristie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tomchristie/subscriptions","organizations_url":"https://api.github.com/users/tomchristie/orgs","repos_url":"https://api.github.com/users/tomchristie/repos","events_url":"https://api.github.com/users/tomchristie/events{/privacy}","received_events_url":"https://api.github.com/users/tomchristie/received_events","type":"User","site_admin":false},"repo":{"id":1431547,"name":"django-rest-framework","full_name":"tomchristie/django-rest-framework","owner":{"login":"tomchristie","id":647359,"avatar_url":"https://avatars.githubusercontent.com/u/647359?v=3","gravatar_id":"","url":"https://api.github.com/users/tomchristie","html_url":"https://github.com/tomchristie","followers_url":"https://api.github.com/users/tomchristie/followers","following_url":"https://api.github.com/users/tomchristie/following{/other_user}","gists_url":"https://api.github.com/users/tomchristie/gists{/gist_id}","starred_url":"https://api.github.com/users/tomchristie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tomchristie/subscriptions","organizations_url":"https://api.github.com/users/tomchristie/orgs","repos_url":"https://api.github.com/users/tomchristie/repos","events_url":"https://api.github.com/users/tomchristie/events{/privacy}","received_events_url":"https://api.github.com/users/tomchristie/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/tomchristie/django-rest-framework","description":"Web APIs for Django.","fork":false,"url":"https://api.github.com/repos/tomchristie/django-rest-framework","forks_url":"https://api.github.com/repos/tomchristie/django-rest-framework/forks","keys_url":"https://api.github.com/repos/tomchristie/django-rest-framework/keys{/key_id}","collaborators_url":"https://api.github.com/repos/tomchristie/django-rest-framework/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/tomchristie/django-rest-framework/teams","hooks_url":"https://api.github.com/repos/tomchristie/django-rest-framework/hooks","issue_events_url":"https://api.github.com/repos/tomchristie/django-rest-framework/issues/events{/number}","events_url":"https://api.github.com/repos/tomchristie/django-rest-framework/events","assignees_url":"https://api.github.com/repos/tomchristie/django-rest-framework/assignees{/user}","branches_url":"https://api.github.com/repos/tomchristie/django-rest-framework/branches{/branch}","tags_url":"https://api.github.com/repos/tomchristie/django-rest-framework/tags","blobs_url":"https://api.github.com/repos/tomchristie/django-rest-framework/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/tomchristie/django-rest-framework/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/tomchristie/django-rest-framework/git/refs{/sha}","trees_url":"https://api.github.com/repos/tomchristie/django-rest-framework/git/trees{/sha}","statuses_url":"https://api.github.com/repos/tomchristie/django-rest-framework/statuses/{sha}","languages_url":"https://api.github.com/repos/tomchristie/django-rest-framework/languages","stargazers_url":"https://api.github.com/repos/tomchristie/django-rest-framework/stargazers","contributors_url":"https://api.github.com/repos/tomchristie/django-rest-framework/contributors","subscribers_url":"https://api.github.com/repos/tomchristie/django-rest-framework/subscribers","subscription_url":"https://api.github.com/repos/tomchristie/django-rest-framework/subscription","commits_url":"https://api.github.com/repos/tomchristie/django-rest-framework/commits{/sha}","git_commits_url":"https://api.github.com/repos/tomchristie/django-rest-framework/git/commits{/sha}","comments_url":"https://api.github.com/repos/tomchristie/django-rest-framework/comments{/number}","issue_comment_url":"https://api.github.com/repos/tomchristie/django-rest-framework/issues/comments{/number}","contents_url":"https://api.github.com/repos/tomchristie/django-rest-framework/contents/{+path}","compare_url":"https://api.github.com/repos/tomchristie/django-rest-framework/compare/{base}...{head}","merges_url":"https://api.github.com/repos/tomchristie/django-rest-framework/merges","archive_url":"https://api.github.com/repos/tomchristie/django-rest-framework/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/tomchristie/django-rest-framework/downloads","issues_url":"https://api.github.com/repos/tomchristie/django-rest-framework/issues{/number}","pulls_url":"https://api.github.com/repos/tomchristie/django-rest-framework/pulls{/number}","milestones_url":"https://api.github.com/repos/tomchristie/django-rest-framework/milestones{/number}","notifications_url":"https://api.github.com/repos/tomchristie/django-rest-framework/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/tomchristie/django-rest-framework/labels{/name}","releases_url":"https://api.github.com/repos/tomchristie/django-rest-framework/releases{/id}","deployments_url":"https://api.github.com/repos/tomchristie/django-rest-framework/deployments","created_at":"2011-03-02T17:13:56Z","updated_at":"2016-10-24T09:11:12Z","pushed_at":"2016-10-24T13:45:48Z","git_url":"git://github.com/tomchristie/django-rest-framework.git","ssh_url":"git@github.com:tomchristie/django-rest-framework.git","clone_url":"https://github.com/tomchristie/django-rest-framework.git","svn_url":"https://github.com/tomchristie/django-rest-framework","homepage":"www.django-rest-framework.org","size":34768,"stargazers_count":6685,"watchers_count":6685,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":2308,"mirror_url":null,"open_issues_count":139,"forks":2308,"open_issues":139,"watchers":6685,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/tomchristie/django-rest-framework/pulls/4620"},"html":{"href":"https://github.com/tomchristie/django-rest-framework/pull/4620"},"issue":{"href":"https://api.github.com/repos/tomchristie/django-rest-framework/issues/4620"},"comments":{"href":"https://api.github.com/repos/tomchristie/django-rest-framework/issues/4620/comments"},"review_comments":{"href":"https://api.github.com/repos/tomchristie/django-rest-framework/pulls/4620/comments"},"review_comment":{"href":"https://api.github.com/repos/tomchristie/django-rest-framework/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/tomchristie/django-rest-framework/pulls/4620/commits"},"statuses":{"href":"https://api.github.com/repos/tomchristie/django-rest-framework/statuses/96523b688339bd39d89af72993867b04c923d0e8"}}}}
{"actor":{"display_login":"tomchristie"}}