{"action":"created","issue":{"url":"https://api.github.com/repos/apple/swift/issues/90","labels_url":"https://api.github.com/repos/apple/swift/issues/90/labels{/name}","comments_url":"https://api.github.com/repos/apple/swift/issues/90/comments","events_url":"https://api.github.com/repos/apple/swift/issues/90/events","html_url":"https://github.com/apple/swift/pull/90","id":120262567,"number":90,"title":"[WIP] Modify Python scripts to run on Python 2 and 3","user":{"login":"alexwlchan","id":301220,"avatar_url":"https://avatars.githubusercontent.com/u/301220?v=3","gravatar_id":"","url":"https://api.github.com/users/alexwlchan","html_url":"https://github.com/alexwlchan","followers_url":"https://api.github.com/users/alexwlchan/followers","following_url":"https://api.github.com/users/alexwlchan/following{/other_user}","gists_url":"https://api.github.com/users/alexwlchan/gists{/gist_id}","starred_url":"https://api.github.com/users/alexwlchan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alexwlchan/subscriptions","organizations_url":"https://api.github.com/users/alexwlchan/orgs","repos_url":"https://api.github.com/users/alexwlchan/repos","events_url":"https://api.github.com/users/alexwlchan/events{/privacy}","received_events_url":"https://api.github.com/users/alexwlchan/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":24,"created_at":"2015-12-03T20:29:02Z","updated_at":"2015-12-09T00:50:54Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/apple/swift/pulls/90","html_url":"https://github.com/apple/swift/pull/90","diff_url":"https://github.com/apple/swift/pull/90.diff","patch_url":"https://github.com/apple/swift/pull/90.patch"},"body":"Some systems use Python 3 as their default interpreter (e.g. #83).\r\n\r\nThis is a collection of fixes that should get these scripts much closer to running on both Python 2 and 3. Obtained by running the [six module](http://pythonhosted.org/six/) over every .py file in the repo, and going through the proposed changes by hand.\r\n\r\nThere are probably still a few gotchas that will break in Python 3 – but this gets substantially closer to a fully working set."},"comment":{"url":"https://api.github.com/repos/apple/swift/issues/comments/163071787","html_url":"https://github.com/apple/swift/pull/90#issuecomment-163071787","issue_url":"https://api.github.com/repos/apple/swift/issues/90","id":163071787,"user":{"login":"dmshynk","id":13720613,"avatar_url":"https://avatars.githubusercontent.com/u/13720613?v=3","gravatar_id":"","url":"https://api.github.com/users/dmshynk","html_url":"https://github.com/dmshynk","followers_url":"https://api.github.com/users/dmshynk/followers","following_url":"https://api.github.com/users/dmshynk/following{/other_user}","gists_url":"https://api.github.com/users/dmshynk/gists{/gist_id}","starred_url":"https://api.github.com/users/dmshynk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dmshynk/subscriptions","organizations_url":"https://api.github.com/users/dmshynk/orgs","repos_url":"https://api.github.com/users/dmshynk/repos","events_url":"https://api.github.com/users/dmshynk/events{/privacy}","received_events_url":"https://api.github.com/users/dmshynk/received_events","type":"User","site_admin":false},"created_at":"2015-12-09T00:50:54Z","updated_at":"2015-12-09T00:50:54Z","body":"@alexwlchan, sorry for the confusion, the solution I posted initially indeed doesn't work; in https://github.com/dmshynk/swift/commit/170c67baf07fa635aa0c174481cc79745fce168d, I went with\r\n```diff\r\n- code_point = ('\\U%{cp}08x' % { 'cp': code_point }).decode('unicode_escape')\r\n+ code_point = ('\\\\U%{cp}08x' % { 'cp': code_point }).decode('unicode_escape')\r\n```\r\nwhich seems to work in both Python 2 and Python 3."}}