{"action":"created","comment":{"url":"https://api.github.com/repos/boto/botocore/pulls/comments/60798407","id":60798407,"diff_hunk":"@@ -440,3 +440,82 @@ def setUp(self):\n     def test_always_serialized_as_str(self):\n         request = self.serialize_to_request({'ContentLength': 100})\n         self.assertEqual(request['headers']['Content-Length'], '100')\n+\n+\n+class TestRestXMLUnicodeSerialization(unittest.TestCase):\n+    def setUp(self):\n+        self.model = {\n+            'metadata': {'protocol': 'rest-xml', 'apiVersion': '2014-01-01'},\n+            'documentation': '',\n+            'operations': {","path":"tests/unit/test_serialize.py","position":11,"original_position":11,"commit_id":"26b5873c760631ad87d80b29a366bf61ab3e536c","original_commit_id":"26b5873c760631ad87d80b29a366bf61ab3e536c","user":{"login":"JordonPhillips","id":2643092,"avatar_url":"https://avatars.githubusercontent.com/u/2643092?v=3","gravatar_id":"","url":"https://api.github.com/users/JordonPhillips","html_url":"https://github.com/JordonPhillips","followers_url":"https://api.github.com/users/JordonPhillips/followers","following_url":"https://api.github.com/users/JordonPhillips/following{/other_user}","gists_url":"https://api.github.com/users/JordonPhillips/gists{/gist_id}","starred_url":"https://api.github.com/users/JordonPhillips/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JordonPhillips/subscriptions","organizations_url":"https://api.github.com/users/JordonPhillips/orgs","repos_url":"https://api.github.com/users/JordonPhillips/repos","events_url":"https://api.github.com/users/JordonPhillips/events{/privacy}","received_events_url":"https://api.github.com/users/JordonPhillips/received_events","type":"User","site_admin":false},"body":"I wanted to use as close to the real data as possible, though it isn't strictly necessary.","created_at":"2016-04-22T20:27:46Z","updated_at":"2016-04-22T20:27:46Z","html_url":"https://github.com/boto/botocore/pull/888#discussion_r60798407","pull_request_url":"https://api.github.com/repos/boto/botocore/pulls/888","_links":{"self":{"href":"https://api.github.com/repos/boto/botocore/pulls/comments/60798407"},"html":{"href":"https://github.com/boto/botocore/pull/888#discussion_r60798407"},"pull_request":{"href":"https://api.github.com/repos/boto/botocore/pulls/888"}}},"pull_request":{"url":"https://api.github.com/repos/boto/botocore/pulls/888","id":67429781,"html_url":"https://github.com/boto/botocore/pull/888","diff_url":"https://github.com/boto/botocore/pull/888.diff","patch_url":"https://github.com/boto/botocore/pull/888.patch","issue_url":"https://api.github.com/repos/boto/botocore/issues/888","number":888,"state":"open","locked":false,"title":"Don't preemptively convert unicode in rest-xml parser","user":{"login":"JordonPhillips","id":2643092,"avatar_url":"https://avatars.githubusercontent.com/u/2643092?v=3","gravatar_id":"","url":"https://api.github.com/users/JordonPhillips","html_url":"https://github.com/JordonPhillips","followers_url":"https://api.github.com/users/JordonPhillips/followers","following_url":"https://api.github.com/users/JordonPhillips/following{/other_user}","gists_url":"https://api.github.com/users/JordonPhillips/gists{/gist_id}","starred_url":"https://api.github.com/users/JordonPhillips/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JordonPhillips/subscriptions","organizations_url":"https://api.github.com/users/JordonPhillips/orgs","repos_url":"https://api.github.com/users/JordonPhillips/repos","events_url":"https://api.github.com/users/JordonPhillips/events{/privacy}","received_events_url":"https://api.github.com/users/JordonPhillips/received_events","type":"User","site_admin":false},"body":"In the rest xml parser, we were converting the input we recieve into a\r\n`str`, which was causing failures on python 2 when multibyte unicode\r\nstrings were passed in. The fix is to simply use `six.text_type`, which\r\nis `unicode` on 2 and `str` on 3. The string will be encoded into the\r\ndefault encoding later on in the serializer.\r\n\r\nFixes #868\r\n\r\ncc @kyleknap @jamesls ","created_at":"2016-04-21T22:03:17Z","updated_at":"2016-04-22T20:27:46Z","closed_at":null,"merged_at":null,"merge_commit_sha":"bb877b7554d82ff82fa07aabd6e8ee026d0acce3","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/boto/botocore/pulls/888/commits","review_comments_url":"https://api.github.com/repos/boto/botocore/pulls/888/comments","review_comment_url":"https://api.github.com/repos/boto/botocore/pulls/comments{/number}","comments_url":"https://api.github.com/repos/boto/botocore/issues/888/comments","statuses_url":"https://api.github.com/repos/boto/botocore/statuses/26b5873c760631ad87d80b29a366bf61ab3e536c","head":{"label":"JordonPhillips:rest-xml-parser","ref":"rest-xml-parser","sha":"26b5873c760631ad87d80b29a366bf61ab3e536c","user":{"login":"JordonPhillips","id":2643092,"avatar_url":"https://avatars.githubusercontent.com/u/2643092?v=3","gravatar_id":"","url":"https://api.github.com/users/JordonPhillips","html_url":"https://github.com/JordonPhillips","followers_url":"https://api.github.com/users/JordonPhillips/followers","following_url":"https://api.github.com/users/JordonPhillips/following{/other_user}","gists_url":"https://api.github.com/users/JordonPhillips/gists{/gist_id}","starred_url":"https://api.github.com/users/JordonPhillips/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JordonPhillips/subscriptions","organizations_url":"https://api.github.com/users/JordonPhillips/orgs","repos_url":"https://api.github.com/users/JordonPhillips/repos","events_url":"https://api.github.com/users/JordonPhillips/events{/privacy}","received_events_url":"https://api.github.com/users/JordonPhillips/received_events","type":"User","site_admin":false},"repo":{"id":41875883,"name":"botocore","full_name":"JordonPhillips/botocore","owner":{"login":"JordonPhillips","id":2643092,"avatar_url":"https://avatars.githubusercontent.com/u/2643092?v=3","gravatar_id":"","url":"https://api.github.com/users/JordonPhillips","html_url":"https://github.com/JordonPhillips","followers_url":"https://api.github.com/users/JordonPhillips/followers","following_url":"https://api.github.com/users/JordonPhillips/following{/other_user}","gists_url":"https://api.github.com/users/JordonPhillips/gists{/gist_id}","starred_url":"https://api.github.com/users/JordonPhillips/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JordonPhillips/subscriptions","organizations_url":"https://api.github.com/users/JordonPhillips/orgs","repos_url":"https://api.github.com/users/JordonPhillips/repos","events_url":"https://api.github.com/users/JordonPhillips/events{/privacy}","received_events_url":"https://api.github.com/users/JordonPhillips/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/JordonPhillips/botocore","description":"The low-level, core functionality of boto 3.","fork":true,"url":"https://api.github.com/repos/JordonPhillips/botocore","forks_url":"https://api.github.com/repos/JordonPhillips/botocore/forks","keys_url":"https://api.github.com/repos/JordonPhillips/botocore/keys{/key_id}","collaborators_url":"https://api.github.com/repos/JordonPhillips/botocore/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/JordonPhillips/botocore/teams","hooks_url":"https://api.github.com/repos/JordonPhillips/botocore/hooks","issue_events_url":"https://api.github.com/repos/JordonPhillips/botocore/issues/events{/number}","events_url":"https://api.github.com/repos/JordonPhillips/botocore/events","assignees_url":"https://api.github.com/repos/JordonPhillips/botocore/assignees{/user}","branches_url":"https://api.github.com/repos/JordonPhillips/botocore/branches{/branch}","tags_url":"https://api.github.com/repos/JordonPhillips/botocore/tags","blobs_url":"https://api.github.com/repos/JordonPhillips/botocore/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/JordonPhillips/botocore/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/JordonPhillips/botocore/git/refs{/sha}","trees_url":"https://api.github.com/repos/JordonPhillips/botocore/git/trees{/sha}","statuses_url":"https://api.github.com/repos/JordonPhillips/botocore/statuses/{sha}","languages_url":"https://api.github.com/repos/JordonPhillips/botocore/languages","stargazers_url":"https://api.github.com/repos/JordonPhillips/botocore/stargazers","contributors_url":"https://api.github.com/repos/JordonPhillips/botocore/contributors","subscribers_url":"https://api.github.com/repos/JordonPhillips/botocore/subscribers","subscription_url":"https://api.github.com/repos/JordonPhillips/botocore/subscription","commits_url":"https://api.github.com/repos/JordonPhillips/botocore/commits{/sha}","git_commits_url":"https://api.github.com/repos/JordonPhillips/botocore/git/commits{/sha}","comments_url":"https://api.github.com/repos/JordonPhillips/botocore/comments{/number}","issue_comment_url":"https://api.github.com/repos/JordonPhillips/botocore/issues/comments{/number}","contents_url":"https://api.github.com/repos/JordonPhillips/botocore/contents/{+path}","compare_url":"https://api.github.com/repos/JordonPhillips/botocore/compare/{base}...{head}","merges_url":"https://api.github.com/repos/JordonPhillips/botocore/merges","archive_url":"https://api.github.com/repos/JordonPhillips/botocore/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/JordonPhillips/botocore/downloads","issues_url":"https://api.github.com/repos/JordonPhillips/botocore/issues{/number}","pulls_url":"https://api.github.com/repos/JordonPhillips/botocore/pulls{/number}","milestones_url":"https://api.github.com/repos/JordonPhillips/botocore/milestones{/number}","notifications_url":"https://api.github.com/repos/JordonPhillips/botocore/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/JordonPhillips/botocore/labels{/name}","releases_url":"https://api.github.com/repos/JordonPhillips/botocore/releases{/id}","deployments_url":"https://api.github.com/repos/JordonPhillips/botocore/deployments","created_at":"2015-09-03T18:13:17Z","updated_at":"2016-01-11T18:57:53Z","pushed_at":"2016-04-22T19:24:57Z","git_url":"git://github.com/JordonPhillips/botocore.git","ssh_url":"git@github.com:JordonPhillips/botocore.git","clone_url":"https://github.com/JordonPhillips/botocore.git","svn_url":"https://github.com/JordonPhillips/botocore","homepage":null,"size":21530,"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":"develop"}},"base":{"label":"boto:develop","ref":"develop","sha":"c371e60afcfbc0c7ba3070e62056dac20268961a","user":{"login":"boto","id":327752,"avatar_url":"https://avatars.githubusercontent.com/u/327752?v=3","gravatar_id":"","url":"https://api.github.com/users/boto","html_url":"https://github.com/boto","followers_url":"https://api.github.com/users/boto/followers","following_url":"https://api.github.com/users/boto/following{/other_user}","gists_url":"https://api.github.com/users/boto/gists{/gist_id}","starred_url":"https://api.github.com/users/boto/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/boto/subscriptions","organizations_url":"https://api.github.com/users/boto/orgs","repos_url":"https://api.github.com/users/boto/repos","events_url":"https://api.github.com/users/boto/events{/privacy}","received_events_url":"https://api.github.com/users/boto/received_events","type":"Organization","site_admin":false},"repo":{"id":6670942,"name":"botocore","full_name":"boto/botocore","owner":{"login":"boto","id":327752,"avatar_url":"https://avatars.githubusercontent.com/u/327752?v=3","gravatar_id":"","url":"https://api.github.com/users/boto","html_url":"https://github.com/boto","followers_url":"https://api.github.com/users/boto/followers","following_url":"https://api.github.com/users/boto/following{/other_user}","gists_url":"https://api.github.com/users/boto/gists{/gist_id}","starred_url":"https://api.github.com/users/boto/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/boto/subscriptions","organizations_url":"https://api.github.com/users/boto/orgs","repos_url":"https://api.github.com/users/boto/repos","events_url":"https://api.github.com/users/boto/events{/privacy}","received_events_url":"https://api.github.com/users/boto/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/boto/botocore","description":"The low-level, core functionality of boto 3.","fork":false,"url":"https://api.github.com/repos/boto/botocore","forks_url":"https://api.github.com/repos/boto/botocore/forks","keys_url":"https://api.github.com/repos/boto/botocore/keys{/key_id}","collaborators_url":"https://api.github.com/repos/boto/botocore/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/boto/botocore/teams","hooks_url":"https://api.github.com/repos/boto/botocore/hooks","issue_events_url":"https://api.github.com/repos/boto/botocore/issues/events{/number}","events_url":"https://api.github.com/repos/boto/botocore/events","assignees_url":"https://api.github.com/repos/boto/botocore/assignees{/user}","branches_url":"https://api.github.com/repos/boto/botocore/branches{/branch}","tags_url":"https://api.github.com/repos/boto/botocore/tags","blobs_url":"https://api.github.com/repos/boto/botocore/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/boto/botocore/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/boto/botocore/git/refs{/sha}","trees_url":"https://api.github.com/repos/boto/botocore/git/trees{/sha}","statuses_url":"https://api.github.com/repos/boto/botocore/statuses/{sha}","languages_url":"https://api.github.com/repos/boto/botocore/languages","stargazers_url":"https://api.github.com/repos/boto/botocore/stargazers","contributors_url":"https://api.github.com/repos/boto/botocore/contributors","subscribers_url":"https://api.github.com/repos/boto/botocore/subscribers","subscription_url":"https://api.github.com/repos/boto/botocore/subscription","commits_url":"https://api.github.com/repos/boto/botocore/commits{/sha}","git_commits_url":"https://api.github.com/repos/boto/botocore/git/commits{/sha}","comments_url":"https://api.github.com/repos/boto/botocore/comments{/number}","issue_comment_url":"https://api.github.com/repos/boto/botocore/issues/comments{/number}","contents_url":"https://api.github.com/repos/boto/botocore/contents/{+path}","compare_url":"https://api.github.com/repos/boto/botocore/compare/{base}...{head}","merges_url":"https://api.github.com/repos/boto/botocore/merges","archive_url":"https://api.github.com/repos/boto/botocore/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/boto/botocore/downloads","issues_url":"https://api.github.com/repos/boto/botocore/issues{/number}","pulls_url":"https://api.github.com/repos/boto/botocore/pulls{/number}","milestones_url":"https://api.github.com/repos/boto/botocore/milestones{/number}","notifications_url":"https://api.github.com/repos/boto/botocore/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/boto/botocore/labels{/name}","releases_url":"https://api.github.com/repos/boto/botocore/releases{/id}","deployments_url":"https://api.github.com/repos/boto/botocore/deployments","created_at":"2012-11-13T13:25:36Z","updated_at":"2016-04-22T12:56:11Z","pushed_at":"2016-04-22T20:19:41Z","git_url":"git://github.com/boto/botocore.git","ssh_url":"git@github.com:boto/botocore.git","clone_url":"https://github.com/boto/botocore.git","svn_url":"https://github.com/boto/botocore","homepage":null,"size":23453,"stargazers_count":246,"watchers_count":246,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":159,"mirror_url":null,"open_issues_count":36,"forks":159,"open_issues":36,"watchers":246,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/boto/botocore/pulls/888"},"html":{"href":"https://github.com/boto/botocore/pull/888"},"issue":{"href":"https://api.github.com/repos/boto/botocore/issues/888"},"comments":{"href":"https://api.github.com/repos/boto/botocore/issues/888/comments"},"review_comments":{"href":"https://api.github.com/repos/boto/botocore/pulls/888/comments"},"review_comment":{"href":"https://api.github.com/repos/boto/botocore/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/boto/botocore/pulls/888/commits"},"statuses":{"href":"https://api.github.com/repos/boto/botocore/statuses/26b5873c760631ad87d80b29a366bf61ab3e536c"}}}}