{"action":"created","comment":{"url":"https://api.github.com/repos/django/django/pulls/comments/228727634","pull_request_review_id":169071382,"id":228727634,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIyODcyNzYzNA==","diff_hunk":"@@ -42,6 +43,24 @@ def test_unaccent_chained(self):\n             ordered=False\n         )\n \n+    def test_unaccent_chained_with_conforming_strings_off(self):\n+        \"\"\"\n+        Chained unaccent causes the comparison string to be escaped.\n+        Make sure the escaping SQL is valid even if the DB has standard_conforming_strings OFF.\n+        \"\"\"\n+\n+        with connection.cursor() as cur:\n+            cur.execute(\"SET standard_conforming_strings TO OFF;\")\n+            try:\n+                self.assertQuerysetEqual(\n+                    self.Model.objects.filter(field__unaccent__endswith=\"éÖ\"),\n+                    [\"àéÖ\", \"aeO\"],\n+                    transform=lambda instance: instance.field,\n+                    ordered=False)\n+            except DatabaseError:\n+                self.fail(\"DatabaseError should not have occurred.\")\n+            cur.execute(\"SET standard_conforming_strings TO ON;\")","path":"tests/postgres_tests/test_unaccent.py","position":25,"original_position":25,"commit_id":"37a335feb9ba5b2dec1b1c7d1022d211057600cc","original_commit_id":"37a335feb9ba5b2dec1b1c7d1022d211057600cc","user":{"login":"timgraham","id":411869,"node_id":"MDQ6VXNlcjQxMTg2OQ==","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":"This should be:\r\n```python\r\ntry:\r\n    cursor.execute('SET standard_conforming_strings TO ON;')\r\n    ...\r\nfinally:\r\n    cursor.execute('...')\r\n```\r\nso that if the assertion fails, the \"tear down\" in finally still happens. The second query shouldn't assume the original value of standard_conforming_strings is \"on\".","created_at":"2018-10-27T21:53:51Z","updated_at":"2018-10-27T21:58:00Z","html_url":"https://github.com/django/django/pull/10566#discussion_r228727634","pull_request_url":"https://api.github.com/repos/django/django/pulls/10566","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/django/django/pulls/comments/228727634"},"html":{"href":"https://github.com/django/django/pull/10566#discussion_r228727634"},"pull_request":{"href":"https://api.github.com/repos/django/django/pulls/10566"}}},"pull_request":{"url":"https://api.github.com/repos/django/django/pulls/10566","id":226136292,"node_id":"MDExOlB1bGxSZXF1ZXN0MjI2MTM2Mjky","html_url":"https://github.com/django/django/pull/10566","diff_url":"https://github.com/django/django/pull/10566.diff","patch_url":"https://github.com/django/django/pull/10566.patch","issue_url":"https://api.github.com/repos/django/django/issues/10566","number":10566,"state":"open","locked":false,"title":"Fixed #29886 - Fixed issue with unaccent when postgres has non-defaul…","user":{"login":"jay1729","id":33232135,"node_id":"MDQ6VXNlcjMzMjMyMTM1","avatar_url":"https://avatars2.githubusercontent.com/u/33232135?v=4","gravatar_id":"","url":"https://api.github.com/users/jay1729","html_url":"https://github.com/jay1729","followers_url":"https://api.github.com/users/jay1729/followers","following_url":"https://api.github.com/users/jay1729/following{/other_user}","gists_url":"https://api.github.com/users/jay1729/gists{/gist_id}","starred_url":"https://api.github.com/users/jay1729/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jay1729/subscriptions","organizations_url":"https://api.github.com/users/jay1729/orgs","repos_url":"https://api.github.com/users/jay1729/repos","events_url":"https://api.github.com/users/jay1729/events{/privacy}","received_events_url":"https://api.github.com/users/jay1729/received_events","type":"User","site_admin":false},"body":"…t standard_conforming_strings, thanks to Tom McClure for patch","created_at":"2018-10-26T15:21:43Z","updated_at":"2018-10-27T21:58:00Z","closed_at":null,"merged_at":null,"merge_commit_sha":"bc7c2fd13bea8be42e16f7226db9de75390ade3d","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/django/django/pulls/10566/commits","review_comments_url":"https://api.github.com/repos/django/django/pulls/10566/comments","review_comment_url":"https://api.github.com/repos/django/django/pulls/comments{/number}","comments_url":"https://api.github.com/repos/django/django/issues/10566/comments","statuses_url":"https://api.github.com/repos/django/django/statuses/37a335feb9ba5b2dec1b1c7d1022d211057600cc","head":{"label":"jay1729:ticket_29886","ref":"ticket_29886","sha":"37a335feb9ba5b2dec1b1c7d1022d211057600cc","user":{"login":"jay1729","id":33232135,"node_id":"MDQ6VXNlcjMzMjMyMTM1","avatar_url":"https://avatars2.githubusercontent.com/u/33232135?v=4","gravatar_id":"","url":"https://api.github.com/users/jay1729","html_url":"https://github.com/jay1729","followers_url":"https://api.github.com/users/jay1729/followers","following_url":"https://api.github.com/users/jay1729/following{/other_user}","gists_url":"https://api.github.com/users/jay1729/gists{/gist_id}","starred_url":"https://api.github.com/users/jay1729/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jay1729/subscriptions","organizations_url":"https://api.github.com/users/jay1729/orgs","repos_url":"https://api.github.com/users/jay1729/repos","events_url":"https://api.github.com/users/jay1729/events{/privacy}","received_events_url":"https://api.github.com/users/jay1729/received_events","type":"User","site_admin":false},"repo":{"id":154450112,"node_id":"MDEwOlJlcG9zaXRvcnkxNTQ0NTAxMTI=","name":"django","full_name":"jay1729/django","private":false,"owner":{"login":"jay1729","id":33232135,"node_id":"MDQ6VXNlcjMzMjMyMTM1","avatar_url":"https://avatars2.githubusercontent.com/u/33232135?v=4","gravatar_id":"","url":"https://api.github.com/users/jay1729","html_url":"https://github.com/jay1729","followers_url":"https://api.github.com/users/jay1729/followers","following_url":"https://api.github.com/users/jay1729/following{/other_user}","gists_url":"https://api.github.com/users/jay1729/gists{/gist_id}","starred_url":"https://api.github.com/users/jay1729/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jay1729/subscriptions","organizations_url":"https://api.github.com/users/jay1729/orgs","repos_url":"https://api.github.com/users/jay1729/repos","events_url":"https://api.github.com/users/jay1729/events{/privacy}","received_events_url":"https://api.github.com/users/jay1729/received_events","type":"User","site_admin":false},"html_url":"https://github.com/jay1729/django","description":"The Web framework for perfectionists with deadlines.","fork":true,"url":"https://api.github.com/repos/jay1729/django","forks_url":"https://api.github.com/repos/jay1729/django/forks","keys_url":"https://api.github.com/repos/jay1729/django/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jay1729/django/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jay1729/django/teams","hooks_url":"https://api.github.com/repos/jay1729/django/hooks","issue_events_url":"https://api.github.com/repos/jay1729/django/issues/events{/number}","events_url":"https://api.github.com/repos/jay1729/django/events","assignees_url":"https://api.github.com/repos/jay1729/django/assignees{/user}","branches_url":"https://api.github.com/repos/jay1729/django/branches{/branch}","tags_url":"https://api.github.com/repos/jay1729/django/tags","blobs_url":"https://api.github.com/repos/jay1729/django/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jay1729/django/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jay1729/django/git/refs{/sha}","trees_url":"https://api.github.com/repos/jay1729/django/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jay1729/django/statuses/{sha}","languages_url":"https://api.github.com/repos/jay1729/django/languages","stargazers_url":"https://api.github.com/repos/jay1729/django/stargazers","contributors_url":"https://api.github.com/repos/jay1729/django/contributors","subscribers_url":"https://api.github.com/repos/jay1729/django/subscribers","subscription_url":"https://api.github.com/repos/jay1729/django/subscription","commits_url":"https://api.github.com/repos/jay1729/django/commits{/sha}","git_commits_url":"https://api.github.com/repos/jay1729/django/git/commits{/sha}","comments_url":"https://api.github.com/repos/jay1729/django/comments{/number}","issue_comment_url":"https://api.github.com/repos/jay1729/django/issues/comments{/number}","contents_url":"https://api.github.com/repos/jay1729/django/contents/{+path}","compare_url":"https://api.github.com/repos/jay1729/django/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jay1729/django/merges","archive_url":"https://api.github.com/repos/jay1729/django/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jay1729/django/downloads","issues_url":"https://api.github.com/repos/jay1729/django/issues{/number}","pulls_url":"https://api.github.com/repos/jay1729/django/pulls{/number}","milestones_url":"https://api.github.com/repos/jay1729/django/milestones{/number}","notifications_url":"https://api.github.com/repos/jay1729/django/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jay1729/django/labels{/name}","releases_url":"https://api.github.com/repos/jay1729/django/releases{/id}","deployments_url":"https://api.github.com/repos/jay1729/django/deployments","created_at":"2018-10-24T06:27:56Z","updated_at":"2018-10-24T06:28:15Z","pushed_at":"2018-10-27T18:26:41Z","git_url":"git://github.com/jay1729/django.git","ssh_url":"git@github.com:jay1729/django.git","clone_url":"https://github.com/jay1729/django.git","svn_url":"https://github.com/jay1729/django","homepage":"https://www.djangoproject.com/","size":183384,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"other","name":"Other","spdx_id":"NOASSERTION","url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"django:master","ref":"master","sha":"55b0b766fbeb2f71e68331a2e14205702f681012","user":{"login":"django","id":27804,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI3ODA0","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,"node_id":"MDEwOlJlcG9zaXRvcnk0MTY0NDgy","name":"django","full_name":"django/django","private":false,"owner":{"login":"django","id":27804,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI3ODA0","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},"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-10-27T19:13:21Z","pushed_at":"2018-10-27T21:14:10Z","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":183421,"stargazers_count":37236,"watchers_count":37236,"language":"Python","has_issues":false,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":16007,"mirror_url":null,"archived":false,"open_issues_count":170,"license":{"key":"other","name":"Other","spdx_id":"NOASSERTION","url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":16007,"open_issues":170,"watchers":37236,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/django/django/pulls/10566"},"html":{"href":"https://github.com/django/django/pull/10566"},"issue":{"href":"https://api.github.com/repos/django/django/issues/10566"},"comments":{"href":"https://api.github.com/repos/django/django/issues/10566/comments"},"review_comments":{"href":"https://api.github.com/repos/django/django/pulls/10566/comments"},"review_comment":{"href":"https://api.github.com/repos/django/django/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/django/django/pulls/10566/commits"},"statuses":{"href":"https://api.github.com/repos/django/django/statuses/37a335feb9ba5b2dec1b1c7d1022d211057600cc"}},"author_association":"NONE"}}
{"actor":{"display_login":"timgraham"}}