{"action":"created","comment":{"url":"https://api.github.com/repos/django/django/pulls/comments/175632176","pull_request_review_id":105192535,"id":175632176,"diff_hunk":"@@ -988,41 +988,16 @@ class BooleanField(Field):\n     empty_strings_allowed = False\n     default_error_messages = {\n         'invalid': _(\"'%(value)s' value must be either True or False.\"),\n+        'invalid_nullable': _(\"'%(value)s' value must be either True, False, or None.\"),\n     }\n     description = _(\"Boolean (Either True or False)\")\n \n-    def __init__(self, *args, **kwargs):\n-        kwargs['blank'] = True\n-        super().__init__(*args, **kwargs)\n-\n-    def check(self, **kwargs):\n-        return [\n-            *super().check(**kwargs),\n-            *self._check_null(**kwargs),\n-        ]\n-\n-    def _check_null(self, **kwargs):\n-        if getattr(self, 'null', False):\n-            return [\n-                checks.Error(\n-                    'BooleanFields do not accept null values.',\n-                    hint='Use a NullBooleanField instead.',\n-                    obj=self,\n-                    id='fields.E110',\n-                )\n-            ]\n-        else:\n-            return []\n-\n-    def deconstruct(self):\n-        name, path, args, kwargs = super().deconstruct()\n-        del kwargs['blank']\n-        return name, path, args, kwargs\n-\n     def get_internal_type(self):\n         return \"BooleanField\"\n \n     def to_python(self, value):","path":"django/db/models/fields/__init__.py","position":39,"original_position":39,"commit_id":"5b5ea70c24dd7f28716d7804c7f468227417e924","original_commit_id":"e424960c7c468bc861e3ca9e7a13e84e91be433d","user":{"login":"timgraham","id":411869,"avatar_url":"https://avatars3.githubusercontent.com/u/411869?v=4","gravatar_id":"","url":"https://api.github.com/users/timgraham","html_url":"https://github.com/timgraham","followers_url":"https://api.github.com/users/timgraham/followers","following_url":"https://api.github.com/users/timgraham/following{/other_user}","gists_url":"https://api.github.com/users/timgraham/gists{/gist_id}","starred_url":"https://api.github.com/users/timgraham/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/timgraham/subscriptions","organizations_url":"https://api.github.com/users/timgraham/orgs","repos_url":"https://api.github.com/users/timgraham/repos","events_url":"https://api.github.com/users/timgraham/events{/privacy}","received_events_url":"https://api.github.com/users/timgraham/received_events","type":"User","site_admin":false},"body":"It's for the XML serializer which serializes `True` and `False` to strings and `None` to `<None></None>`. I'll add a test to show that the change you suggested in `to_python()` isn't needed.","created_at":"2018-03-20T01:16:23Z","updated_at":"2018-03-20T01:16:23Z","html_url":"https://github.com/django/django/pull/8467#discussion_r175632176","pull_request_url":"https://api.github.com/repos/django/django/pulls/8467","author_association":"OWNER","_links":{"self":{"href":"https://api.github.com/repos/django/django/pulls/comments/175632176"},"html":{"href":"https://github.com/django/django/pull/8467#discussion_r175632176"},"pull_request":{"href":"https://api.github.com/repos/django/django/pulls/8467"}},"in_reply_to_id":175473007},"pull_request":{"url":"https://api.github.com/repos/django/django/pulls/8467","id":119311625,"html_url":"https://github.com/django/django/pull/8467","diff_url":"https://github.com/django/django/pull/8467.diff","patch_url":"https://github.com/django/django/pull/8467.patch","issue_url":"https://api.github.com/repos/django/django/issues/8467","number":8467,"state":"open","locked":false,"title":"Fixed #29227 -- Allowed BooleanField to be null=True.","user":{"login":"timgraham","id":411869,"avatar_url":"https://avatars3.githubusercontent.com/u/411869?v=4","gravatar_id":"","url":"https://api.github.com/users/timgraham","html_url":"https://github.com/timgraham","followers_url":"https://api.github.com/users/timgraham/followers","following_url":"https://api.github.com/users/timgraham/following{/other_user}","gists_url":"https://api.github.com/users/timgraham/gists{/gist_id}","starred_url":"https://api.github.com/users/timgraham/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/timgraham/subscriptions","organizations_url":"https://api.github.com/users/timgraham/orgs","repos_url":"https://api.github.com/users/timgraham/repos","events_url":"https://api.github.com/users/timgraham/events{/privacy}","received_events_url":"https://api.github.com/users/timgraham/received_events","type":"User","site_admin":false},"body":"https://code.djangoproject.com/ticket/29227","created_at":"2017-05-06T18:43:20Z","updated_at":"2018-03-20T01:16:23Z","closed_at":null,"merged_at":null,"merge_commit_sha":"36a2d449b8c646c8c8a4b5df836cb6a1694f2fd1","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/django/django/pulls/8467/commits","review_comments_url":"https://api.github.com/repos/django/django/pulls/8467/comments","review_comment_url":"https://api.github.com/repos/django/django/pulls/comments{/number}","comments_url":"https://api.github.com/repos/django/django/issues/8467/comments","statuses_url":"https://api.github.com/repos/django/django/statuses/5b5ea70c24dd7f28716d7804c7f468227417e924","head":{"label":"timgraham:blank-booleanfield","ref":"blank-booleanfield","sha":"5b5ea70c24dd7f28716d7804c7f468227417e924","user":{"login":"timgraham","id":411869,"avatar_url":"https://avatars3.githubusercontent.com/u/411869?v=4","gravatar_id":"","url":"https://api.github.com/users/timgraham","html_url":"https://github.com/timgraham","followers_url":"https://api.github.com/users/timgraham/followers","following_url":"https://api.github.com/users/timgraham/following{/other_user}","gists_url":"https://api.github.com/users/timgraham/gists{/gist_id}","starred_url":"https://api.github.com/users/timgraham/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/timgraham/subscriptions","organizations_url":"https://api.github.com/users/timgraham/orgs","repos_url":"https://api.github.com/users/timgraham/repos","events_url":"https://api.github.com/users/timgraham/events{/privacy}","received_events_url":"https://api.github.com/users/timgraham/received_events","type":"User","site_admin":false},"repo":{"id":6815085,"name":"django","full_name":"timgraham/django","owner":{"login":"timgraham","id":411869,"avatar_url":"https://avatars3.githubusercontent.com/u/411869?v=4","gravatar_id":"","url":"https://api.github.com/users/timgraham","html_url":"https://github.com/timgraham","followers_url":"https://api.github.com/users/timgraham/followers","following_url":"https://api.github.com/users/timgraham/following{/other_user}","gists_url":"https://api.github.com/users/timgraham/gists{/gist_id}","starred_url":"https://api.github.com/users/timgraham/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/timgraham/subscriptions","organizations_url":"https://api.github.com/users/timgraham/orgs","repos_url":"https://api.github.com/users/timgraham/repos","events_url":"https://api.github.com/users/timgraham/events{/privacy}","received_events_url":"https://api.github.com/users/timgraham/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/timgraham/django","description":"The Web framework for perfectionists with deadlines.","fork":true,"url":"https://api.github.com/repos/timgraham/django","forks_url":"https://api.github.com/repos/timgraham/django/forks","keys_url":"https://api.github.com/repos/timgraham/django/keys{/key_id}","collaborators_url":"https://api.github.com/repos/timgraham/django/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/timgraham/django/teams","hooks_url":"https://api.github.com/repos/timgraham/django/hooks","issue_events_url":"https://api.github.com/repos/timgraham/django/issues/events{/number}","events_url":"https://api.github.com/repos/timgraham/django/events","assignees_url":"https://api.github.com/repos/timgraham/django/assignees{/user}","branches_url":"https://api.github.com/repos/timgraham/django/branches{/branch}","tags_url":"https://api.github.com/repos/timgraham/django/tags","blobs_url":"https://api.github.com/repos/timgraham/django/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/timgraham/django/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/timgraham/django/git/refs{/sha}","trees_url":"https://api.github.com/repos/timgraham/django/git/trees{/sha}","statuses_url":"https://api.github.com/repos/timgraham/django/statuses/{sha}","languages_url":"https://api.github.com/repos/timgraham/django/languages","stargazers_url":"https://api.github.com/repos/timgraham/django/stargazers","contributors_url":"https://api.github.com/repos/timgraham/django/contributors","subscribers_url":"https://api.github.com/repos/timgraham/django/subscribers","subscription_url":"https://api.github.com/repos/timgraham/django/subscription","commits_url":"https://api.github.com/repos/timgraham/django/commits{/sha}","git_commits_url":"https://api.github.com/repos/timgraham/django/git/commits{/sha}","comments_url":"https://api.github.com/repos/timgraham/django/comments{/number}","issue_comment_url":"https://api.github.com/repos/timgraham/django/issues/comments{/number}","contents_url":"https://api.github.com/repos/timgraham/django/contents/{+path}","compare_url":"https://api.github.com/repos/timgraham/django/compare/{base}...{head}","merges_url":"https://api.github.com/repos/timgraham/django/merges","archive_url":"https://api.github.com/repos/timgraham/django/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/timgraham/django/downloads","issues_url":"https://api.github.com/repos/timgraham/django/issues{/number}","pulls_url":"https://api.github.com/repos/timgraham/django/pulls{/number}","milestones_url":"https://api.github.com/repos/timgraham/django/milestones{/number}","notifications_url":"https://api.github.com/repos/timgraham/django/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/timgraham/django/labels{/name}","releases_url":"https://api.github.com/repos/timgraham/django/releases{/id}","deployments_url":"https://api.github.com/repos/timgraham/django/deployments","created_at":"2012-11-22T15:27:43Z","updated_at":"2018-03-18T20:22:43Z","pushed_at":"2018-03-19T17:28:28Z","git_url":"git://github.com/timgraham/django.git","ssh_url":"git@github.com:timgraham/django.git","clone_url":"https://github.com/timgraham/django.git","svn_url":"https://github.com/timgraham/django","homepage":"http://www.djangoproject.com/","size":149189,"stargazers_count":9,"watchers_count":9,"language":"Python","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"other","name":"Other","spdx_id":null,"url":null},"forks":1,"open_issues":0,"watchers":9,"default_branch":"master"}},"base":{"label":"django:master","ref":"master","sha":"cede5111bbeea1f02a7d35941a4264c7ff95df0a","user":{"login":"django","id":27804,"avatar_url":"https://avatars2.githubusercontent.com/u/27804?v=4","gravatar_id":"","url":"https://api.github.com/users/django","html_url":"https://github.com/django","followers_url":"https://api.github.com/users/django/followers","following_url":"https://api.github.com/users/django/following{/other_user}","gists_url":"https://api.github.com/users/django/gists{/gist_id}","starred_url":"https://api.github.com/users/django/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/django/subscriptions","organizations_url":"https://api.github.com/users/django/orgs","repos_url":"https://api.github.com/users/django/repos","events_url":"https://api.github.com/users/django/events{/privacy}","received_events_url":"https://api.github.com/users/django/received_events","type":"Organization","site_admin":false},"repo":{"id":4164482,"name":"django","full_name":"django/django","owner":{"login":"django","id":27804,"avatar_url":"https://avatars2.githubusercontent.com/u/27804?v=4","gravatar_id":"","url":"https://api.github.com/users/django","html_url":"https://github.com/django","followers_url":"https://api.github.com/users/django/followers","following_url":"https://api.github.com/users/django/following{/other_user}","gists_url":"https://api.github.com/users/django/gists{/gist_id}","starred_url":"https://api.github.com/users/django/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/django/subscriptions","organizations_url":"https://api.github.com/users/django/orgs","repos_url":"https://api.github.com/users/django/repos","events_url":"https://api.github.com/users/django/events{/privacy}","received_events_url":"https://api.github.com/users/django/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/django/django","description":"The Web framework for perfectionists with deadlines.","fork":false,"url":"https://api.github.com/repos/django/django","forks_url":"https://api.github.com/repos/django/django/forks","keys_url":"https://api.github.com/repos/django/django/keys{/key_id}","collaborators_url":"https://api.github.com/repos/django/django/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/django/django/teams","hooks_url":"https://api.github.com/repos/django/django/hooks","issue_events_url":"https://api.github.com/repos/django/django/issues/events{/number}","events_url":"https://api.github.com/repos/django/django/events","assignees_url":"https://api.github.com/repos/django/django/assignees{/user}","branches_url":"https://api.github.com/repos/django/django/branches{/branch}","tags_url":"https://api.github.com/repos/django/django/tags","blobs_url":"https://api.github.com/repos/django/django/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/django/django/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/django/django/git/refs{/sha}","trees_url":"https://api.github.com/repos/django/django/git/trees{/sha}","statuses_url":"https://api.github.com/repos/django/django/statuses/{sha}","languages_url":"https://api.github.com/repos/django/django/languages","stargazers_url":"https://api.github.com/repos/django/django/stargazers","contributors_url":"https://api.github.com/repos/django/django/contributors","subscribers_url":"https://api.github.com/repos/django/django/subscribers","subscription_url":"https://api.github.com/repos/django/django/subscription","commits_url":"https://api.github.com/repos/django/django/commits{/sha}","git_commits_url":"https://api.github.com/repos/django/django/git/commits{/sha}","comments_url":"https://api.github.com/repos/django/django/comments{/number}","issue_comment_url":"https://api.github.com/repos/django/django/issues/comments{/number}","contents_url":"https://api.github.com/repos/django/django/contents/{+path}","compare_url":"https://api.github.com/repos/django/django/compare/{base}...{head}","merges_url":"https://api.github.com/repos/django/django/merges","archive_url":"https://api.github.com/repos/django/django/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/django/django/downloads","issues_url":"https://api.github.com/repos/django/django/issues{/number}","pulls_url":"https://api.github.com/repos/django/django/pulls{/number}","milestones_url":"https://api.github.com/repos/django/django/milestones{/number}","notifications_url":"https://api.github.com/repos/django/django/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/django/django/labels{/name}","releases_url":"https://api.github.com/repos/django/django/releases{/id}","deployments_url":"https://api.github.com/repos/django/django/deployments","created_at":"2012-04-28T02:47:18Z","updated_at":"2018-03-20T01:06:28Z","pushed_at":"2018-03-20T01:06:57Z","git_url":"git://github.com/django/django.git","ssh_url":"git@github.com:django/django.git","clone_url":"https://github.com/django/django.git","svn_url":"https://github.com/django/django","homepage":"https://www.djangoproject.com/","size":175294,"stargazers_count":32554,"watchers_count":32554,"language":"Python","has_issues":false,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":13757,"mirror_url":null,"archived":false,"open_issues_count":179,"license":{"key":"other","name":"Other","spdx_id":null,"url":null},"forks":13757,"open_issues":179,"watchers":32554,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/django/django/pulls/8467"},"html":{"href":"https://github.com/django/django/pull/8467"},"issue":{"href":"https://api.github.com/repos/django/django/issues/8467"},"comments":{"href":"https://api.github.com/repos/django/django/issues/8467/comments"},"review_comments":{"href":"https://api.github.com/repos/django/django/pulls/8467/comments"},"review_comment":{"href":"https://api.github.com/repos/django/django/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/django/django/pulls/8467/commits"},"statuses":{"href":"https://api.github.com/repos/django/django/statuses/5b5ea70c24dd7f28716d7804c7f468227417e924"}},"author_association":"OWNER"}}
{"actor":{"display_login":"timgraham"}}