GitHub PullRequestReviewCommentEvent at 2014-10-21 07:29:07
Repository: ipython
Actor: Carreau
Payload: {"action":"created","comment":{"url":"https://api.github.com/repos/ipython/ipython/pulls/comments/19132857","id":19132857,"diff_hunk":"@@ -101,11 +101,14 @@ def itervalues(d): return iter(d.values())\n     getcwd = os.getcwd\n     \n     MethodType = types.MethodType\n-    \n-    def execfile(fname, glob, loc=None):\n+\n+    def execfile(fname, glob, loc=None, compiler=None):\n         loc = loc if (loc is not None) else glob\n         with open(fname, 'rb') as f:\n-            exec(compile(f.read(), fname, 'exec'), glob, loc)\n+            if compiler is None:\n+                exec(compiler(f.read(), fname, 'exec'), glob, loc)","path":"IPython/utils/py3compat.py","position":12,"original_position":12,"commit_id":"bfe8f618ea3600dda354f06e418e2ec51982def5","original_commit_id":"bfe8f618ea3600dda354f06e418e2ec51982def5","user":{"login":"Carreau","id":335567,"avatar_url":"https://avatars.githubusercontent.com/u/335567?v=2","gravatar_id":"","url":"https://api.github.com/users/Carreau","html_url":"https://github.com/Carreau","followers_url":"https://api.github.com/users/Carreau/followers","following_url":"https://api.github.com/users/Carreau/following{/other_user}","gists_url":"https://api.github.com/users/Carreau/gists{/gist_id}","starred_url":"https://api.github.com/users/Carreau/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Carreau/subscriptions","organizations_url":"https://api.github.com/users/Carreau/orgs","repos_url":"https://api.github.com/users/Carreau/repos","events_url":"https://api.github.com/users/Carreau/events{/privacy}","received_events_url":"https://api.github.com/users/Carreau/received_events","type":"User","site_admin":false},"body":"or maybe a `comp = compiler if (compiler is not None) else  compile` would lead to less code duplications later error if we have to change both lines. Same around line 205, but up to you. ","created_at":"2014-10-21T07:29:07Z","updated_at":"2014-10-21T07:29:07Z","html_url":"https://github.com/ipython/ipython/pull/6436#discussion_r19132857","pull_request_url":"https://api.github.com/repos/ipython/ipython/pulls/6436","_links":{"self":{"href":"https://api.github.com/repos/ipython/ipython/pulls/comments/19132857"},"html":{"href":"https://github.com/ipython/ipython/pull/6436#discussion_r19132857"},"pull_request":{"href":"https://api.github.com/repos/ipython/ipython/pulls/6436"}}},"pull_request":{"url":"https://api.github.com/repos/ipython/ipython/pulls/6436","id":20904766,"html_url":"https://github.com/ipython/ipython/pull/6436","diff_url":"https://github.com/ipython/ipython/pull/6436.diff","patch_url":"https://github.com/ipython/ipython/pull/6436.patch","issue_url":"https://api.github.com/repos/ipython/ipython/issues/6436","number":6436,"state":"open","locked":false,"title":"Saving future compile directives from ipython -i","user":{"login":"thomasballinger","id":458879,"avatar_url":"https://avatars.githubusercontent.com/u/458879?v=2","gravatar_id":"","url":"https://api.github.com/users/thomasballinger","html_url":"https://github.com/thomasballinger","followers_url":"https://api.github.com/users/thomasballinger/followers","following_url":"https://api.github.com/users/thomasballinger/following{/other_user}","gists_url":"https://api.github.com/users/thomasballinger/gists{/gist_id}","starred_url":"https://api.github.com/users/thomasballinger/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thomasballinger/subscriptions","organizations_url":"https://api.github.com/users/thomasballinger/orgs","repos_url":"https://api.github.com/users/thomasballinger/repos","events_url":"https://api.github.com/users/thomasballinger/events{/privacy}","received_events_url":"https://api.github.com/users/thomasballinger/received_events","type":"User","site_admin":false},"body":"Here's a version that copies a lot of code, just so there's something to discuss. Ideas on the right way to go about this?\r\n\r\n* There's lots of repeated code because I didn't want to mess with the signature of py3compat.execfile.\r\n* Not working for python -i module.ipy yet\r\n* Is this too much functionality for py3compat?\r\n* No new tests yet","created_at":"2014-09-08T17:35:32Z","updated_at":"2014-10-21T07:29:07Z","closed_at":null,"merged_at":null,"merge_commit_sha":"65f673c68c82e743d92b2d95969a662fa0780639","assignee":{"login":"takluyver","id":327925,"avatar_url":"https://avatars.githubusercontent.com/u/327925?v=2","gravatar_id":"","url":"https://api.github.com/users/takluyver","html_url":"https://github.com/takluyver","followers_url":"https://api.github.com/users/takluyver/followers","following_url":"https://api.github.com/users/takluyver/following{/other_user}","gists_url":"https://api.github.com/users/takluyver/gists{/gist_id}","starred_url":"https://api.github.com/users/takluyver/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/takluyver/subscriptions","organizations_url":"https://api.github.com/users/takluyver/orgs","repos_url":"https://api.github.com/users/takluyver/repos","events_url":"https://api.github.com/users/takluyver/events{/privacy}","received_events_url":"https://api.github.com/users/takluyver/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/ipython/ipython/milestones/13","labels_url":"https://api.github.com/repos/ipython/ipython/milestones/13/labels","id":532467,"number":13,"title":"3.0","description":"IPython 3.0 Summer/Fall","creator":{"login":"Carreau","id":335567,"avatar_url":"https://avatars.githubusercontent.com/u/335567?v=2","gravatar_id":"","url":"https://api.github.com/users/Carreau","html_url":"https://github.com/Carreau","followers_url":"https://api.github.com/users/Carreau/followers","following_url":"https://api.github.com/users/Carreau/following{/other_user}","gists_url":"https://api.github.com/users/Carreau/gists{/gist_id}","starred_url":"https://api.github.com/users/Carreau/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Carreau/subscriptions","organizations_url":"https://api.github.com/users/Carreau/orgs","repos_url":"https://api.github.com/users/Carreau/repos","events_url":"https://api.github.com/users/Carreau/events{/privacy}","received_events_url":"https://api.github.com/users/Carreau/received_events","type":"User","site_admin":false},"open_issues":244,"closed_issues":499,"state":"open","created_at":"2014-01-10T13:22:15Z","updated_at":"2014-10-21T05:49:56Z","due_on":null},"commits_url":"https://api.github.com/repos/ipython/ipython/pulls/6436/commits","review_comments_url":"https://api.github.com/repos/ipython/ipython/pulls/6436/comments","review_comment_url":"https://api.github.com/repos/ipython/ipython/pulls/comments/{number}","comments_url":"https://api.github.com/repos/ipython/ipython/issues/6436/comments","statuses_url":"https://api.github.com/repos/ipython/ipython/statuses/bfe8f618ea3600dda354f06e418e2ec51982def5","head":{"label":"thomasballinger:fix-6430","ref":"fix-6430","sha":"bfe8f618ea3600dda354f06e418e2ec51982def5","user":{"login":"thomasballinger","id":458879,"avatar_url":"https://avatars.githubusercontent.com/u/458879?v=2","gravatar_id":"","url":"https://api.github.com/users/thomasballinger","html_url":"https://github.com/thomasballinger","followers_url":"https://api.github.com/users/thomasballinger/followers","following_url":"https://api.github.com/users/thomasballinger/following{/other_user}","gists_url":"https://api.github.com/users/thomasballinger/gists{/gist_id}","starred_url":"https://api.github.com/users/thomasballinger/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thomasballinger/subscriptions","organizations_url":"https://api.github.com/users/thomasballinger/orgs","repos_url":"https://api.github.com/users/thomasballinger/repos","events_url":"https://api.github.com/users/thomasballinger/events{/privacy}","received_events_url":"https://api.github.com/users/thomasballinger/received_events","type":"User","site_admin":false},"repo":{"id":23800493,"name":"ipython","full_name":"thomasballinger/ipython","owner":{"login":"thomasballinger","id":458879,"avatar_url":"https://avatars.githubusercontent.com/u/458879?v=2","gravatar_id":"","url":"https://api.github.com/users/thomasballinger","html_url":"https://github.com/thomasballinger","followers_url":"https://api.github.com/users/thomasballinger/followers","following_url":"https://api.github.com/users/thomasballinger/following{/other_user}","gists_url":"https://api.github.com/users/thomasballinger/gists{/gist_id}","starred_url":"https://api.github.com/users/thomasballinger/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thomasballinger/subscriptions","organizations_url":"https://api.github.com/users/thomasballinger/orgs","repos_url":"https://api.github.com/users/thomasballinger/repos","events_url":"https://api.github.com/users/thomasballinger/events{/privacy}","received_events_url":"https://api.github.com/users/thomasballinger/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/thomasballinger/ipython","description":"Official repository for IPython itself. Other repos in the IPython organization contain things like the website, documentation builds, etc.","fork":true,"url":"https://api.github.com/repos/thomasballinger/ipython","forks_url":"https://api.github.com/repos/thomasballinger/ipython/forks","keys_url":"https://api.github.com/repos/thomasballinger/ipython/keys{/key_id}","collaborators_url":"https://api.github.com/repos/thomasballinger/ipython/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/thomasballinger/ipython/teams","hooks_url":"https://api.github.com/repos/thomasballinger/ipython/hooks","issue_events_url":"https://api.github.com/repos/thomasballinger/ipython/issues/events{/number}","events_url":"https://api.github.com/repos/thomasballinger/ipython/events","assignees_url":"https://api.github.com/repos/thomasballinger/ipython/assignees{/user}","branches_url":"https://api.github.com/repos/thomasballinger/ipython/branches{/branch}","tags_url":"https://api.github.com/repos/thomasballinger/ipython/tags","blobs_url":"https://api.github.com/repos/thomasballinger/ipython/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/thomasballinger/ipython/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/thomasballinger/ipython/git/refs{/sha}","trees_url":"https://api.github.com/repos/thomasballinger/ipython/git/trees{/sha}","statuses_url":"https://api.github.com/repos/thomasballinger/ipython/statuses/{sha}","languages_url":"https://api.github.com/repos/thomasballinger/ipython/languages","stargazers_url":"https://api.github.com/repos/thomasballinger/ipython/stargazers","contributors_url":"https://api.github.com/repos/thomasballinger/ipython/contributors","subscribers_url":"https://api.github.com/repos/thomasballinger/ipython/subscribers","subscription_url":"https://api.github.com/repos/thomasballinger/ipython/subscription","commits_url":"https://api.github.com/repos/thomasballinger/ipython/commits{/sha}","git_commits_url":"https://api.github.com/repos/thomasballinger/ipython/git/commits{/sha}","comments_url":"https://api.github.com/repos/thomasballinger/ipython/comments{/number}","issue_comment_url":"https://api.github.com/repos/thomasballinger/ipython/issues/comments/{number}","contents_url":"https://api.github.com/repos/thomasballinger/ipython/contents/{+path}","compare_url":"https://api.github.com/repos/thomasballinger/ipython/compare/{base}...{head}","merges_url":"https://api.github.com/repos/thomasballinger/ipython/merges","archive_url":"https://api.github.com/repos/thomasballinger/ipython/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/thomasballinger/ipython/downloads","issues_url":"https://api.github.com/repos/thomasballinger/ipython/issues{/number}","pulls_url":"https://api.github.com/repos/thomasballinger/ipython/pulls{/number}","milestones_url":"https://api.github.com/repos/thomasballinger/ipython/milestones{/number}","notifications_url":"https://api.github.com/repos/thomasballinger/ipython/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/thomasballinger/ipython/labels{/name}","releases_url":"https://api.github.com/repos/thomasballinger/ipython/releases{/id}","created_at":"2014-09-08T17:21:32Z","updated_at":"2014-09-08T15:43:50Z","pushed_at":"2014-10-19T22:44:26Z","git_url":"git://github.com/thomasballinger/ipython.git","ssh_url":"git@github.com:thomasballinger/ipython.git","clone_url":"https://github.com/thomasballinger/ipython.git","svn_url":"https://github.com/thomasballinger/ipython","homepage":"http://ipython.org","size":59298,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"ipython:master","ref":"master","sha":"541627947af6597ca0890daf3a102704dbed1940","user":{"login":"ipython","id":230453,"avatar_url":"https://avatars.githubusercontent.com/u/230453?v=2","gravatar_id":"","url":"https://api.github.com/users/ipython","html_url":"https://github.com/ipython","followers_url":"https://api.github.com/users/ipython/followers","following_url":"https://api.github.com/users/ipython/following{/other_user}","gists_url":"https://api.github.com/users/ipython/gists{/gist_id}","starred_url":"https://api.github.com/users/ipython/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ipython/subscriptions","organizations_url":"https://api.github.com/users/ipython/orgs","repos_url":"https://api.github.com/users/ipython/repos","events_url":"https://api.github.com/users/ipython/events{/privacy}","received_events_url":"https://api.github.com/users/ipython/received_events","type":"Organization","site_admin":false},"repo":{"id":658518,"name":"ipython","full_name":"ipython/ipython","owner":{"login":"ipython","id":230453,"avatar_url":"https://avatars.githubusercontent.com/u/230453?v=2","gravatar_id":"","url":"https://api.github.com/users/ipython","html_url":"https://github.com/ipython","followers_url":"https://api.github.com/users/ipython/followers","following_url":"https://api.github.com/users/ipython/following{/other_user}","gists_url":"https://api.github.com/users/ipython/gists{/gist_id}","starred_url":"https://api.github.com/users/ipython/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ipython/subscriptions","organizations_url":"https://api.github.com/users/ipython/orgs","repos_url":"https://api.github.com/users/ipython/repos","events_url":"https://api.github.com/users/ipython/events{/privacy}","received_events_url":"https://api.github.com/users/ipython/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ipython/ipython","description":"Official repository for IPython itself. Other repos in the IPython organization contain things like the website, documentation builds, etc.","fork":false,"url":"https://api.github.com/repos/ipython/ipython","forks_url":"https://api.github.com/repos/ipython/ipython/forks","keys_url":"https://api.github.com/repos/ipython/ipython/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ipython/ipython/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ipython/ipython/teams","hooks_url":"https://api.github.com/repos/ipython/ipython/hooks","issue_events_url":"https://api.github.com/repos/ipython/ipython/issues/events{/number}","events_url":"https://api.github.com/repos/ipython/ipython/events","assignees_url":"https://api.github.com/repos/ipython/ipython/assignees{/user}","branches_url":"https://api.github.com/repos/ipython/ipython/branches{/branch}","tags_url":"https://api.github.com/repos/ipython/ipython/tags","blobs_url":"https://api.github.com/repos/ipython/ipython/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ipython/ipython/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ipython/ipython/git/refs{/sha}","trees_url":"https://api.github.com/repos/ipython/ipython/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ipython/ipython/statuses/{sha}","languages_url":"https://api.github.com/repos/ipython/ipython/languages","stargazers_url":"https://api.github.com/repos/ipython/ipython/stargazers","contributors_url":"https://api.github.com/repos/ipython/ipython/contributors","subscribers_url":"https://api.github.com/repos/ipython/ipython/subscribers","subscription_url":"https://api.github.com/repos/ipython/ipython/subscription","commits_url":"https://api.github.com/repos/ipython/ipython/commits{/sha}","git_commits_url":"https://api.github.com/repos/ipython/ipython/git/commits{/sha}","comments_url":"https://api.github.com/repos/ipython/ipython/comments{/number}","issue_comment_url":"https://api.github.com/repos/ipython/ipython/issues/comments/{number}","contents_url":"https://api.github.com/repos/ipython/ipython/contents/{+path}","compare_url":"https://api.github.com/repos/ipython/ipython/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ipython/ipython/merges","archive_url":"https://api.github.com/repos/ipython/ipython/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ipython/ipython/downloads","issues_url":"https://api.github.com/repos/ipython/ipython/issues{/number}","pulls_url":"https://api.github.com/repos/ipython/ipython/pulls{/number}","milestones_url":"https://api.github.com/repos/ipython/ipython/milestones{/number}","notifications_url":"https://api.github.com/repos/ipython/ipython/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ipython/ipython/labels{/name}","releases_url":"https://api.github.com/repos/ipython/ipython/releases{/id}","created_at":"2010-05-10T04:46:06Z","updated_at":"2014-10-21T04:30:37Z","pushed_at":"2014-10-20T22:29:38Z","git_url":"git://github.com/ipython/ipython.git","ssh_url":"git@github.com:ipython/ipython.git","clone_url":"https://github.com/ipython/ipython.git","svn_url":"https://github.com/ipython/ipython","homepage":"http://ipython.org","size":125819,"stargazers_count":5020,"watchers_count":5020,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1456,"mirror_url":null,"open_issues_count":865,"forks":1456,"open_issues":865,"watchers":5020,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ipython/ipython/pulls/6436"},"html":{"href":"https://github.com/ipython/ipython/pull/6436"},"issue":{"href":"https://api.github.com/repos/ipython/ipython/issues/6436"},"comments":{"href":"https://api.github.com/repos/ipython/ipython/issues/6436/comments"},"review_comments":{"href":"https://api.github.com/repos/ipython/ipython/pulls/6436/comments"},"review_comment":{"href":"https://api.github.com/repos/ipython/ipython/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/ipython/ipython/pulls/6436/commits"},"statuses":{"href":"https://api.github.com/repos/ipython/ipython/statuses/bfe8f618ea3600dda354f06e418e2ec51982def5"}}}}