{"action":"closed","number":3430,"pull_request":{"url":"https://api.github.com/repos/translate/translate/pulls/3430","id":67515079,"html_url":"https://github.com/translate/translate/pull/3430","diff_url":"https://github.com/translate/translate/pull/3430.diff","patch_url":"https://github.com/translate/translate/pull/3430.patch","issue_url":"https://api.github.com/repos/translate/translate/issues/3430","number":3430,"state":"closed","locked":false,"title":"multistring: restore decoding bytes","user":{"login":"julen","id":16768,"avatar_url":"https://avatars.githubusercontent.com/u/16768?v=3","gravatar_id":"","url":"https://api.github.com/users/julen","html_url":"https://github.com/julen","followers_url":"https://api.github.com/users/julen/followers","following_url":"https://api.github.com/users/julen/following{/other_user}","gists_url":"https://api.github.com/users/julen/gists{/gist_id}","starred_url":"https://api.github.com/users/julen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/julen/subscriptions","organizations_url":"https://api.github.com/users/julen/orgs","repos_url":"https://api.github.com/users/julen/repos","events_url":"https://api.github.com/users/julen/events{/privacy}","received_events_url":"https://api.github.com/users/julen/received_events","type":"User","site_admin":false},"body":"We've hit an issue in Pootle which can only be reproduced with TTK master (https://github.com/translate/pootle/issues/4594). The real cause of this is unclear (@phlax mentioned this is originating somewhere in `Store.update()`), and it seems like coercing `multistring`s with non-ASCII data to unicode fails.\r\n\r\nIn that sense, I'm not sure whether `multistring` should accept bytes in its constructor or not, however previously this [used to work via the `autoencode` class](https://github.com/translate/pootle/blob/02c993c59fadde9f495934ce0a34b87d523ad5f1/pootle/apps/pootle_store/fields.py#L59-L79) (note the `UTF-8` argument to the constructor) which is now removed in master.\r\n\r\nI have added a test and a patch for this, which when creating the object would decode bytes from UTF-8 if that was passed. This seems to align with the previous behavior, not sure if we should aim for that though...\r\n\r\n@claudep we'd appreciate to hear your thoughts on this one, TIA :)","created_at":"2016-04-22T13:54:51Z","updated_at":"2016-04-25T07:51:43Z","closed_at":"2016-04-25T07:51:43Z","merged_at":"2016-04-25T07:51:43Z","merge_commit_sha":"de30e2308f5922edfd002ad71eb41dcb76413e0d","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/translate/translate/pulls/3430/commits","review_comments_url":"https://api.github.com/repos/translate/translate/pulls/3430/comments","review_comment_url":"https://api.github.com/repos/translate/translate/pulls/comments{/number}","comments_url":"https://api.github.com/repos/translate/translate/issues/3430/comments","statuses_url":"https://api.github.com/repos/translate/translate/statuses/de30e2308f5922edfd002ad71eb41dcb76413e0d","head":{"label":"julen:unicode-coercion","ref":"unicode-coercion","sha":"de30e2308f5922edfd002ad71eb41dcb76413e0d","user":{"login":"julen","id":16768,"avatar_url":"https://avatars.githubusercontent.com/u/16768?v=3","gravatar_id":"","url":"https://api.github.com/users/julen","html_url":"https://github.com/julen","followers_url":"https://api.github.com/users/julen/followers","following_url":"https://api.github.com/users/julen/following{/other_user}","gists_url":"https://api.github.com/users/julen/gists{/gist_id}","starred_url":"https://api.github.com/users/julen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/julen/subscriptions","organizations_url":"https://api.github.com/users/julen/orgs","repos_url":"https://api.github.com/users/julen/repos","events_url":"https://api.github.com/users/julen/events{/privacy}","received_events_url":"https://api.github.com/users/julen/received_events","type":"User","site_admin":false},"repo":{"id":27430327,"name":"translate","full_name":"julen/translate","owner":{"login":"julen","id":16768,"avatar_url":"https://avatars.githubusercontent.com/u/16768?v=3","gravatar_id":"","url":"https://api.github.com/users/julen","html_url":"https://github.com/julen","followers_url":"https://api.github.com/users/julen/followers","following_url":"https://api.github.com/users/julen/following{/other_user}","gists_url":"https://api.github.com/users/julen/gists{/gist_id}","starred_url":"https://api.github.com/users/julen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/julen/subscriptions","organizations_url":"https://api.github.com/users/julen/orgs","repos_url":"https://api.github.com/users/julen/repos","events_url":"https://api.github.com/users/julen/events{/privacy}","received_events_url":"https://api.github.com/users/julen/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/julen/translate","description":"Useful localization tools with Python API for building localization & translation systems","fork":true,"url":"https://api.github.com/repos/julen/translate","forks_url":"https://api.github.com/repos/julen/translate/forks","keys_url":"https://api.github.com/repos/julen/translate/keys{/key_id}","collaborators_url":"https://api.github.com/repos/julen/translate/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/julen/translate/teams","hooks_url":"https://api.github.com/repos/julen/translate/hooks","issue_events_url":"https://api.github.com/repos/julen/translate/issues/events{/number}","events_url":"https://api.github.com/repos/julen/translate/events","assignees_url":"https://api.github.com/repos/julen/translate/assignees{/user}","branches_url":"https://api.github.com/repos/julen/translate/branches{/branch}","tags_url":"https://api.github.com/repos/julen/translate/tags","blobs_url":"https://api.github.com/repos/julen/translate/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/julen/translate/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/julen/translate/git/refs{/sha}","trees_url":"https://api.github.com/repos/julen/translate/git/trees{/sha}","statuses_url":"https://api.github.com/repos/julen/translate/statuses/{sha}","languages_url":"https://api.github.com/repos/julen/translate/languages","stargazers_url":"https://api.github.com/repos/julen/translate/stargazers","contributors_url":"https://api.github.com/repos/julen/translate/contributors","subscribers_url":"https://api.github.com/repos/julen/translate/subscribers","subscription_url":"https://api.github.com/repos/julen/translate/subscription","commits_url":"https://api.github.com/repos/julen/translate/commits{/sha}","git_commits_url":"https://api.github.com/repos/julen/translate/git/commits{/sha}","comments_url":"https://api.github.com/repos/julen/translate/comments{/number}","issue_comment_url":"https://api.github.com/repos/julen/translate/issues/comments{/number}","contents_url":"https://api.github.com/repos/julen/translate/contents/{+path}","compare_url":"https://api.github.com/repos/julen/translate/compare/{base}...{head}","merges_url":"https://api.github.com/repos/julen/translate/merges","archive_url":"https://api.github.com/repos/julen/translate/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/julen/translate/downloads","issues_url":"https://api.github.com/repos/julen/translate/issues{/number}","pulls_url":"https://api.github.com/repos/julen/translate/pulls{/number}","milestones_url":"https://api.github.com/repos/julen/translate/milestones{/number}","notifications_url":"https://api.github.com/repos/julen/translate/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/julen/translate/labels{/name}","releases_url":"https://api.github.com/repos/julen/translate/releases{/id}","deployments_url":"https://api.github.com/repos/julen/translate/deployments","created_at":"2014-12-02T11:53:49Z","updated_at":"2015-03-24T02:59:23Z","pushed_at":"2016-04-24T08:55:29Z","git_url":"git://github.com/julen/translate.git","ssh_url":"git@github.com:julen/translate.git","clone_url":"https://github.com/julen/translate.git","svn_url":"https://github.com/julen/translate","homepage":"http://toolkit.translatehouse.org","size":29351,"stargazers_count":1,"watchers_count":1,"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":1,"default_branch":"master"}},"base":{"label":"translate:master","ref":"master","sha":"c5c6de6a5daaaace320a73c1fe391f52da911fc8","user":{"login":"translate","id":1538178,"avatar_url":"https://avatars.githubusercontent.com/u/1538178?v=3","gravatar_id":"","url":"https://api.github.com/users/translate","html_url":"https://github.com/translate","followers_url":"https://api.github.com/users/translate/followers","following_url":"https://api.github.com/users/translate/following{/other_user}","gists_url":"https://api.github.com/users/translate/gists{/gist_id}","starred_url":"https://api.github.com/users/translate/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/translate/subscriptions","organizations_url":"https://api.github.com/users/translate/orgs","repos_url":"https://api.github.com/users/translate/repos","events_url":"https://api.github.com/users/translate/events{/privacy}","received_events_url":"https://api.github.com/users/translate/received_events","type":"Organization","site_admin":false},"repo":{"id":3769696,"name":"translate","full_name":"translate/translate","owner":{"login":"translate","id":1538178,"avatar_url":"https://avatars.githubusercontent.com/u/1538178?v=3","gravatar_id":"","url":"https://api.github.com/users/translate","html_url":"https://github.com/translate","followers_url":"https://api.github.com/users/translate/followers","following_url":"https://api.github.com/users/translate/following{/other_user}","gists_url":"https://api.github.com/users/translate/gists{/gist_id}","starred_url":"https://api.github.com/users/translate/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/translate/subscriptions","organizations_url":"https://api.github.com/users/translate/orgs","repos_url":"https://api.github.com/users/translate/repos","events_url":"https://api.github.com/users/translate/events{/privacy}","received_events_url":"https://api.github.com/users/translate/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/translate/translate","description":"Useful localization tools with Python API for building localization & translation systems","fork":false,"url":"https://api.github.com/repos/translate/translate","forks_url":"https://api.github.com/repos/translate/translate/forks","keys_url":"https://api.github.com/repos/translate/translate/keys{/key_id}","collaborators_url":"https://api.github.com/repos/translate/translate/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/translate/translate/teams","hooks_url":"https://api.github.com/repos/translate/translate/hooks","issue_events_url":"https://api.github.com/repos/translate/translate/issues/events{/number}","events_url":"https://api.github.com/repos/translate/translate/events","assignees_url":"https://api.github.com/repos/translate/translate/assignees{/user}","branches_url":"https://api.github.com/repos/translate/translate/branches{/branch}","tags_url":"https://api.github.com/repos/translate/translate/tags","blobs_url":"https://api.github.com/repos/translate/translate/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/translate/translate/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/translate/translate/git/refs{/sha}","trees_url":"https://api.github.com/repos/translate/translate/git/trees{/sha}","statuses_url":"https://api.github.com/repos/translate/translate/statuses/{sha}","languages_url":"https://api.github.com/repos/translate/translate/languages","stargazers_url":"https://api.github.com/repos/translate/translate/stargazers","contributors_url":"https://api.github.com/repos/translate/translate/contributors","subscribers_url":"https://api.github.com/repos/translate/translate/subscribers","subscription_url":"https://api.github.com/repos/translate/translate/subscription","commits_url":"https://api.github.com/repos/translate/translate/commits{/sha}","git_commits_url":"https://api.github.com/repos/translate/translate/git/commits{/sha}","comments_url":"https://api.github.com/repos/translate/translate/comments{/number}","issue_comment_url":"https://api.github.com/repos/translate/translate/issues/comments{/number}","contents_url":"https://api.github.com/repos/translate/translate/contents/{+path}","compare_url":"https://api.github.com/repos/translate/translate/compare/{base}...{head}","merges_url":"https://api.github.com/repos/translate/translate/merges","archive_url":"https://api.github.com/repos/translate/translate/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/translate/translate/downloads","issues_url":"https://api.github.com/repos/translate/translate/issues{/number}","pulls_url":"https://api.github.com/repos/translate/translate/pulls{/number}","milestones_url":"https://api.github.com/repos/translate/translate/milestones{/number}","notifications_url":"https://api.github.com/repos/translate/translate/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/translate/translate/labels{/name}","releases_url":"https://api.github.com/repos/translate/translate/releases{/id}","deployments_url":"https://api.github.com/repos/translate/translate/deployments","created_at":"2012-03-19T23:05:29Z","updated_at":"2016-04-14T05:41:59Z","pushed_at":"2016-04-25T07:51:41Z","git_url":"git://github.com/translate/translate.git","ssh_url":"git@github.com:translate/translate.git","clone_url":"https://github.com/translate/translate.git","svn_url":"https://github.com/translate/translate","homepage":"http://toolkit.translatehouse.org","size":29814,"stargazers_count":217,"watchers_count":217,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":111,"mirror_url":null,"open_issues_count":325,"forks":111,"open_issues":325,"watchers":217,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/translate/translate/pulls/3430"},"html":{"href":"https://github.com/translate/translate/pull/3430"},"issue":{"href":"https://api.github.com/repos/translate/translate/issues/3430"},"comments":{"href":"https://api.github.com/repos/translate/translate/issues/3430/comments"},"review_comments":{"href":"https://api.github.com/repos/translate/translate/pulls/3430/comments"},"review_comment":{"href":"https://api.github.com/repos/translate/translate/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/translate/translate/pulls/3430/commits"},"statuses":{"href":"https://api.github.com/repos/translate/translate/statuses/de30e2308f5922edfd002ad71eb41dcb76413e0d"}},"merged":true,"mergeable":null,"mergeable_state":"unknown","merged_by":{"login":"julen","id":16768,"avatar_url":"https://avatars.githubusercontent.com/u/16768?v=3","gravatar_id":"","url":"https://api.github.com/users/julen","html_url":"https://github.com/julen","followers_url":"https://api.github.com/users/julen/followers","following_url":"https://api.github.com/users/julen/following{/other_user}","gists_url":"https://api.github.com/users/julen/gists{/gist_id}","starred_url":"https://api.github.com/users/julen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/julen/subscriptions","organizations_url":"https://api.github.com/users/julen/orgs","repos_url":"https://api.github.com/users/julen/repos","events_url":"https://api.github.com/users/julen/events{/privacy}","received_events_url":"https://api.github.com/users/julen/received_events","type":"User","site_admin":false},"comments":11,"review_comments":2,"commits":1,"additions":41,"deletions":2,"changed_files":4}}