{"action":"created","comment":{"url":"https://api.github.com/repos/translate/translate/pulls/comments/37447369","id":37447369,"diff_hunk":"@@ -71,7 +71,7 @@ class NumberPlaceable(Ph):\n     \"\"\"Placeable for numbers.\"\"\"\n \n     istranslatable = False\n-    regex = re.compile(ur\"[-+]?[0-9]+([\\u00a0.,][0-9]+)*\")\n+    regex = re.compile(u\"[-+]?[0-9]+([\\u00a0.,][0-9]+)*\")","path":"translate/storage/placeables/general.py","position":5,"original_position":5,"commit_id":"d965fd1315fd730ec0e06801b851415e99a851e6","original_commit_id":"13b086afe5fb2bc9a4f8947230510ace87fa3f8b","user":{"login":"claudep","id":143192,"avatar_url":"https://avatars.githubusercontent.com/u/143192?v=3","gravatar_id":"","url":"https://api.github.com/users/claudep","html_url":"https://github.com/claudep","followers_url":"https://api.github.com/users/claudep/followers","following_url":"https://api.github.com/users/claudep/following{/other_user}","gists_url":"https://api.github.com/users/claudep/gists{/gist_id}","starred_url":"https://api.github.com/users/claudep/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/claudep/subscriptions","organizations_url":"https://api.github.com/users/claudep/orgs","repos_url":"https://api.github.com/users/claudep/repos","events_url":"https://api.github.com/users/claudep/events{/privacy}","received_events_url":"https://api.github.com/users/claudep/received_events","type":"User","site_admin":false},"body":"It depends on the original intent. Apparently, Python resolves unicode escapes, even in raw strings. So if the 'r' prefix was intended to keep the \\u00a0 sequence \"as is\", we should double the backslashes, regardless of the prefix. But if the intent was just to insert a non-breakable space in the string, I think it is fine to remove the prefix.","created_at":"2015-08-19T18:08:22Z","updated_at":"2015-08-19T18:08:22Z","html_url":"https://github.com/translate/translate/pull/3292#discussion_r37447369","pull_request_url":"https://api.github.com/repos/translate/translate/pulls/3292","_links":{"self":{"href":"https://api.github.com/repos/translate/translate/pulls/comments/37447369"},"html":{"href":"https://github.com/translate/translate/pull/3292#discussion_r37447369"},"pull_request":{"href":"https://api.github.com/repos/translate/translate/pulls/3292"}}},"pull_request":{"url":"https://api.github.com/repos/translate/translate/pulls/3292","id":42817746,"html_url":"https://github.com/translate/translate/pull/3292","diff_url":"https://github.com/translate/translate/pull/3292.diff","patch_url":"https://github.com/translate/translate/pull/3292.patch","issue_url":"https://api.github.com/repos/translate/translate/issues/3292","number":3292,"state":"open","locked":false,"title":"Avoided raw unicode strings for Python 3 compatibility","user":{"login":"claudep","id":143192,"avatar_url":"https://avatars.githubusercontent.com/u/143192?v=3","gravatar_id":"","url":"https://api.github.com/users/claudep","html_url":"https://github.com/claudep","followers_url":"https://api.github.com/users/claudep/followers","following_url":"https://api.github.com/users/claudep/following{/other_user}","gists_url":"https://api.github.com/users/claudep/gists{/gist_id}","starred_url":"https://api.github.com/users/claudep/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/claudep/subscriptions","organizations_url":"https://api.github.com/users/claudep/orgs","repos_url":"https://api.github.com/users/claudep/repos","events_url":"https://api.github.com/users/claudep/events{/privacy}","received_events_url":"https://api.github.com/users/claudep/received_events","type":"User","site_admin":false},"body":"Raw unicode strings syntax (e.g. ur'mystring') is not valid syntax on\r\nPython 3.\r\nRead https://www.python.org/dev/peps/pep-0414/#exclusion-of-raw-unicode-literals\r\nThis patch uses various techniques to workaround this issue: removing either\r\nthe raw or unicode markers when they are not essential, or using unicode_literals\r\nto mimic the Python 3 behavior.","created_at":"2015-08-19T14:02:23Z","updated_at":"2015-08-19T18:08:22Z","closed_at":null,"merged_at":null,"merge_commit_sha":"18892279630b80eb4be59fa3932a27fd74a305ac","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/translate/translate/pulls/3292/commits","review_comments_url":"https://api.github.com/repos/translate/translate/pulls/3292/comments","review_comment_url":"https://api.github.com/repos/translate/translate/pulls/comments{/number}","comments_url":"https://api.github.com/repos/translate/translate/issues/3292/comments","statuses_url":"https://api.github.com/repos/translate/translate/statuses/d965fd1315fd730ec0e06801b851415e99a851e6","head":{"label":"claudep:raw_unicode","ref":"raw_unicode","sha":"d965fd1315fd730ec0e06801b851415e99a851e6","user":{"login":"claudep","id":143192,"avatar_url":"https://avatars.githubusercontent.com/u/143192?v=3","gravatar_id":"","url":"https://api.github.com/users/claudep","html_url":"https://github.com/claudep","followers_url":"https://api.github.com/users/claudep/followers","following_url":"https://api.github.com/users/claudep/following{/other_user}","gists_url":"https://api.github.com/users/claudep/gists{/gist_id}","starred_url":"https://api.github.com/users/claudep/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/claudep/subscriptions","organizations_url":"https://api.github.com/users/claudep/orgs","repos_url":"https://api.github.com/users/claudep/repos","events_url":"https://api.github.com/users/claudep/events{/privacy}","received_events_url":"https://api.github.com/users/claudep/received_events","type":"User","site_admin":false},"repo":{"id":40787088,"name":"translate","full_name":"claudep/translate","owner":{"login":"claudep","id":143192,"avatar_url":"https://avatars.githubusercontent.com/u/143192?v=3","gravatar_id":"","url":"https://api.github.com/users/claudep","html_url":"https://github.com/claudep","followers_url":"https://api.github.com/users/claudep/followers","following_url":"https://api.github.com/users/claudep/following{/other_user}","gists_url":"https://api.github.com/users/claudep/gists{/gist_id}","starred_url":"https://api.github.com/users/claudep/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/claudep/subscriptions","organizations_url":"https://api.github.com/users/claudep/orgs","repos_url":"https://api.github.com/users/claudep/repos","events_url":"https://api.github.com/users/claudep/events{/privacy}","received_events_url":"https://api.github.com/users/claudep/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/claudep/translate","description":"Useful localization tools with Python API for building localization & translation systems","fork":true,"url":"https://api.github.com/repos/claudep/translate","forks_url":"https://api.github.com/repos/claudep/translate/forks","keys_url":"https://api.github.com/repos/claudep/translate/keys{/key_id}","collaborators_url":"https://api.github.com/repos/claudep/translate/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/claudep/translate/teams","hooks_url":"https://api.github.com/repos/claudep/translate/hooks","issue_events_url":"https://api.github.com/repos/claudep/translate/issues/events{/number}","events_url":"https://api.github.com/repos/claudep/translate/events","assignees_url":"https://api.github.com/repos/claudep/translate/assignees{/user}","branches_url":"https://api.github.com/repos/claudep/translate/branches{/branch}","tags_url":"https://api.github.com/repos/claudep/translate/tags","blobs_url":"https://api.github.com/repos/claudep/translate/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/claudep/translate/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/claudep/translate/git/refs{/sha}","trees_url":"https://api.github.com/repos/claudep/translate/git/trees{/sha}","statuses_url":"https://api.github.com/repos/claudep/translate/statuses/{sha}","languages_url":"https://api.github.com/repos/claudep/translate/languages","stargazers_url":"https://api.github.com/repos/claudep/translate/stargazers","contributors_url":"https://api.github.com/repos/claudep/translate/contributors","subscribers_url":"https://api.github.com/repos/claudep/translate/subscribers","subscription_url":"https://api.github.com/repos/claudep/translate/subscription","commits_url":"https://api.github.com/repos/claudep/translate/commits{/sha}","git_commits_url":"https://api.github.com/repos/claudep/translate/git/commits{/sha}","comments_url":"https://api.github.com/repos/claudep/translate/comments{/number}","issue_comment_url":"https://api.github.com/repos/claudep/translate/issues/comments{/number}","contents_url":"https://api.github.com/repos/claudep/translate/contents/{+path}","compare_url":"https://api.github.com/repos/claudep/translate/compare/{base}...{head}","merges_url":"https://api.github.com/repos/claudep/translate/merges","archive_url":"https://api.github.com/repos/claudep/translate/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/claudep/translate/downloads","issues_url":"https://api.github.com/repos/claudep/translate/issues{/number}","pulls_url":"https://api.github.com/repos/claudep/translate/pulls{/number}","milestones_url":"https://api.github.com/repos/claudep/translate/milestones{/number}","notifications_url":"https://api.github.com/repos/claudep/translate/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/claudep/translate/labels{/name}","releases_url":"https://api.github.com/repos/claudep/translate/releases{/id}","created_at":"2015-08-15T21:48:10Z","updated_at":"2015-08-15T21:48:12Z","pushed_at":"2015-08-19T18:03:39Z","git_url":"git://github.com/claudep/translate.git","ssh_url":"git@github.com:claudep/translate.git","clone_url":"https://github.com/claudep/translate.git","svn_url":"https://github.com/claudep/translate","homepage":"http://toolkit.translatehouse.org","size":29013,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"translate:master","ref":"master","sha":"2b1b18876fb698e3c460f8bc548dbfcb16cca8fa","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}","created_at":"2012-03-19T23:05:29Z","updated_at":"2015-07-26T23:52:52Z","pushed_at":"2015-08-19T18:03:39Z","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":32209,"stargazers_count":168,"watchers_count":168,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":92,"mirror_url":null,"open_issues_count":313,"forks":92,"open_issues":313,"watchers":168,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/translate/translate/pulls/3292"},"html":{"href":"https://github.com/translate/translate/pull/3292"},"issue":{"href":"https://api.github.com/repos/translate/translate/issues/3292"},"comments":{"href":"https://api.github.com/repos/translate/translate/issues/3292/comments"},"review_comments":{"href":"https://api.github.com/repos/translate/translate/pulls/3292/comments"},"review_comment":{"href":"https://api.github.com/repos/translate/translate/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/translate/translate/pulls/3292/commits"},"statuses":{"href":"https://api.github.com/repos/translate/translate/statuses/d965fd1315fd730ec0e06801b851415e99a851e6"}}}}