{"action":"created","comment":{"url":"https://api.github.com/repos/tomchristie/django-rest-framework/pulls/comments/30228078","id":30228078,"diff_hunk":"@@ -388,10 +400,7 @@ def to_internal_value(self, data):\n \n         ret = OrderedDict()\n         errors = OrderedDict()\n-        fields = [\n-            field for field in self.fields.values()\n-            if (not field.read_only) or (field.default is not empty)\n-        ]\n+        fields = self._to_internal_value_fields","path":"rest_framework/serializers.py","position":34,"original_position":34,"commit_id":"1ee31735835a10564d33a7b9dfcf1935b9702487","original_commit_id":"1ee31735835a10564d33a7b9dfcf1935b9702487","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":"If we're making this change we may as well just do `for field in self._to_internal_value_fields` and not bother with the `fields` variable at all.","created_at":"2015-05-13T13:07:35Z","updated_at":"2015-05-13T13:07:35Z","html_url":"https://github.com/tomchristie/django-rest-framework/pull/2922#discussion_r30228078","pull_request_url":"https://api.github.com/repos/tomchristie/django-rest-framework/pulls/2922","_links":{"self":{"href":"https://api.github.com/repos/tomchristie/django-rest-framework/pulls/comments/30228078"},"html":{"href":"https://github.com/tomchristie/django-rest-framework/pull/2922#discussion_r30228078"},"pull_request":{"href":"https://api.github.com/repos/tomchristie/django-rest-framework/pulls/2922"}}},"pull_request":{"url":"https://api.github.com/repos/tomchristie/django-rest-framework/pulls/2922","id":35065491,"html_url":"https://github.com/tomchristie/django-rest-framework/pull/2922","diff_url":"https://github.com/tomchristie/django-rest-framework/pull/2922.diff","patch_url":"https://github.com/tomchristie/django-rest-framework/pull/2922.patch","issue_url":"https://api.github.com/repos/tomchristie/django-rest-framework/issues/2922","number":2922,"state":"open","locked":false,"title":"Cache fields list for to_internal_value and to_representation","user":{"login":"thedrow","id":48936,"avatar_url":"https://avatars.githubusercontent.com/u/48936?v=3","gravatar_id":"","url":"https://api.github.com/users/thedrow","html_url":"https://github.com/thedrow","followers_url":"https://api.github.com/users/thedrow/followers","following_url":"https://api.github.com/users/thedrow/following{/other_user}","gists_url":"https://api.github.com/users/thedrow/gists{/gist_id}","starred_url":"https://api.github.com/users/thedrow/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thedrow/subscriptions","organizations_url":"https://api.github.com/users/thedrow/orgs","repos_url":"https://api.github.com/users/thedrow/repos","events_url":"https://api.github.com/users/thedrow/events{/privacy}","received_events_url":"https://api.github.com/users/thedrow/received_events","type":"User","site_admin":false},"body":"Is there any reason why this is a bad idea?","created_at":"2015-05-09T11:38:12Z","updated_at":"2015-05-13T13:07:35Z","closed_at":null,"merged_at":null,"merge_commit_sha":"bc9728070dde3cf5653c8ccf54799ccbd9621afe","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/tomchristie/django-rest-framework/pulls/2922/commits","review_comments_url":"https://api.github.com/repos/tomchristie/django-rest-framework/pulls/2922/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/2922/comments","statuses_url":"https://api.github.com/repos/tomchristie/django-rest-framework/statuses/1ee31735835a10564d33a7b9dfcf1935b9702487","head":{"label":"thedrow:patch-11","ref":"patch-11","sha":"1ee31735835a10564d33a7b9dfcf1935b9702487","user":{"login":"thedrow","id":48936,"avatar_url":"https://avatars.githubusercontent.com/u/48936?v=3","gravatar_id":"","url":"https://api.github.com/users/thedrow","html_url":"https://github.com/thedrow","followers_url":"https://api.github.com/users/thedrow/followers","following_url":"https://api.github.com/users/thedrow/following{/other_user}","gists_url":"https://api.github.com/users/thedrow/gists{/gist_id}","starred_url":"https://api.github.com/users/thedrow/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thedrow/subscriptions","organizations_url":"https://api.github.com/users/thedrow/orgs","repos_url":"https://api.github.com/users/thedrow/repos","events_url":"https://api.github.com/users/thedrow/events{/privacy}","received_events_url":"https://api.github.com/users/thedrow/received_events","type":"User","site_admin":false},"repo":{"id":13302103,"name":"django-rest-framework-1","full_name":"thedrow/django-rest-framework-1","owner":{"login":"thedrow","id":48936,"avatar_url":"https://avatars.githubusercontent.com/u/48936?v=3","gravatar_id":"","url":"https://api.github.com/users/thedrow","html_url":"https://github.com/thedrow","followers_url":"https://api.github.com/users/thedrow/followers","following_url":"https://api.github.com/users/thedrow/following{/other_user}","gists_url":"https://api.github.com/users/thedrow/gists{/gist_id}","starred_url":"https://api.github.com/users/thedrow/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thedrow/subscriptions","organizations_url":"https://api.github.com/users/thedrow/orgs","repos_url":"https://api.github.com/users/thedrow/repos","events_url":"https://api.github.com/users/thedrow/events{/privacy}","received_events_url":"https://api.github.com/users/thedrow/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/thedrow/django-rest-framework-1","description":"Awesome web-browseable Web APIs.","fork":true,"url":"https://api.github.com/repos/thedrow/django-rest-framework-1","forks_url":"https://api.github.com/repos/thedrow/django-rest-framework-1/forks","keys_url":"https://api.github.com/repos/thedrow/django-rest-framework-1/keys{/key_id}","collaborators_url":"https://api.github.com/repos/thedrow/django-rest-framework-1/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/thedrow/django-rest-framework-1/teams","hooks_url":"https://api.github.com/repos/thedrow/django-rest-framework-1/hooks","issue_events_url":"https://api.github.com/repos/thedrow/django-rest-framework-1/issues/events{/number}","events_url":"https://api.github.com/repos/thedrow/django-rest-framework-1/events","assignees_url":"https://api.github.com/repos/thedrow/django-rest-framework-1/assignees{/user}","branches_url":"https://api.github.com/repos/thedrow/django-rest-framework-1/branches{/branch}","tags_url":"https://api.github.com/repos/thedrow/django-rest-framework-1/tags","blobs_url":"https://api.github.com/repos/thedrow/django-rest-framework-1/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/thedrow/django-rest-framework-1/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/thedrow/django-rest-framework-1/git/refs{/sha}","trees_url":"https://api.github.com/repos/thedrow/django-rest-framework-1/git/trees{/sha}","statuses_url":"https://api.github.com/repos/thedrow/django-rest-framework-1/statuses/{sha}","languages_url":"https://api.github.com/repos/thedrow/django-rest-framework-1/languages","stargazers_url":"https://api.github.com/repos/thedrow/django-rest-framework-1/stargazers","contributors_url":"https://api.github.com/repos/thedrow/django-rest-framework-1/contributors","subscribers_url":"https://api.github.com/repos/thedrow/django-rest-framework-1/subscribers","subscription_url":"https://api.github.com/repos/thedrow/django-rest-framework-1/subscription","commits_url":"https://api.github.com/repos/thedrow/django-rest-framework-1/commits{/sha}","git_commits_url":"https://api.github.com/repos/thedrow/django-rest-framework-1/git/commits{/sha}","comments_url":"https://api.github.com/repos/thedrow/django-rest-framework-1/comments{/number}","issue_comment_url":"https://api.github.com/repos/thedrow/django-rest-framework-1/issues/comments{/number}","contents_url":"https://api.github.com/repos/thedrow/django-rest-framework-1/contents/{+path}","compare_url":"https://api.github.com/repos/thedrow/django-rest-framework-1/compare/{base}...{head}","merges_url":"https://api.github.com/repos/thedrow/django-rest-framework-1/merges","archive_url":"https://api.github.com/repos/thedrow/django-rest-framework-1/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/thedrow/django-rest-framework-1/downloads","issues_url":"https://api.github.com/repos/thedrow/django-rest-framework-1/issues{/number}","pulls_url":"https://api.github.com/repos/thedrow/django-rest-framework-1/pulls{/number}","milestones_url":"https://api.github.com/repos/thedrow/django-rest-framework-1/milestones{/number}","notifications_url":"https://api.github.com/repos/thedrow/django-rest-framework-1/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/thedrow/django-rest-framework-1/labels{/name}","releases_url":"https://api.github.com/repos/thedrow/django-rest-framework-1/releases{/id}","created_at":"2013-10-03T15:33:28Z","updated_at":"2015-02-06T05:22:50Z","pushed_at":"2015-05-09T11:37:49Z","git_url":"git://github.com/thedrow/django-rest-framework-1.git","ssh_url":"git@github.com:thedrow/django-rest-framework-1.git","clone_url":"https://github.com/thedrow/django-rest-framework-1.git","svn_url":"https://github.com/thedrow/django-rest-framework-1","homepage":"django-rest-framework.org","size":13533,"stargazers_count":0,"watchers_count":0,"language":"Python","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":"tomchristie:master","ref":"master","sha":"35efbe41abcff15ea2f60096aaa95bd41f2532a3","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}","created_at":"2011-03-02T17:13:56Z","updated_at":"2015-05-13T11:36:14Z","pushed_at":"2015-05-13T12:40:00Z","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":33825,"stargazers_count":4021,"watchers_count":4021,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":1255,"mirror_url":null,"open_issues_count":150,"forks":1255,"open_issues":150,"watchers":4021,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/tomchristie/django-rest-framework/pulls/2922"},"html":{"href":"https://github.com/tomchristie/django-rest-framework/pull/2922"},"issue":{"href":"https://api.github.com/repos/tomchristie/django-rest-framework/issues/2922"},"comments":{"href":"https://api.github.com/repos/tomchristie/django-rest-framework/issues/2922/comments"},"review_comments":{"href":"https://api.github.com/repos/tomchristie/django-rest-framework/pulls/2922/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/2922/commits"},"statuses":{"href":"https://api.github.com/repos/tomchristie/django-rest-framework/statuses/1ee31735835a10564d33a7b9dfcf1935b9702487"}}}}