GitHub PullRequestReviewCommentEvent at 2014-09-10 17:14:04
Repository: powny
Actor: nikicat
Payload: {"action":"created","comment":{"url":"https://api.github.com/repos/yandex-sysmon/powny/pulls/comments/17374699","id":17374699,"diff_hunk":"@@ -0,0 +1,134 @@\n+import traceback\n+import inspect\n+import pickle\n+import copy\n+import threading\n+import collections\n+\n+from contextlog import get_logger\n+\n+\n+# =====\n+_fake_context = None  # For tests\n+\n+def get_context():\n+    if _fake_context is not None:\n+        return _fake_context\n+    thread = threading.current_thread()\n+    assert isinstance(thread, JobThread), \"Called not from a job context!\"\n+    job_context = thread.get_job_context()  # pylint: disable=E1103\n+    del thread\n+    return _JobContextProxy(job_context)\n+\n+\n+Step = collections.namedtuple(\"Step\", (\n+    \"job_id\",\n+    \"state\",\n+    \"stack_or_retval\",\n+    \"exc\",\n+    \"done\",\n+))\n+\n+\n+class JobThread(threading.Thread):\n+    def __init__(self, save_context, *args, **kwargs):\n+        self._save_context = save_context  # save_context(job_id, state, stack_or_retval, exc)\n+        self._job_context = _JobContext(*args, **kwargs)\n+        self._job_id = self._job_context.get_job_id()","path":"powny/core/context.py","position":37,"original_position":37,"commit_id":"7ccfce2509f2561ccafbe89fe4adeaa8601818cb","original_commit_id":"7ccfce2509f2561ccafbe89fe4adeaa8601818cb","user":{"login":"nikicat","id":329262,"avatar_url":"https://avatars.githubusercontent.com/u/329262?v=2","gravatar_id":"709bc993640f94f768c1ec86b699167d","url":"https://api.github.com/users/nikicat","html_url":"https://github.com/nikicat","followers_url":"https://api.github.com/users/nikicat/followers","following_url":"https://api.github.com/users/nikicat/following{/other_user}","gists_url":"https://api.github.com/users/nikicat/gists{/gist_id}","starred_url":"https://api.github.com/users/nikicat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nikicat/subscriptions","organizations_url":"https://api.github.com/users/nikicat/orgs","repos_url":"https://api.github.com/users/nikicat/repos","events_url":"https://api.github.com/users/nikicat/events{/privacy}","received_events_url":"https://api.github.com/users/nikicat/received_events","type":"User","site_admin":false},"body":"why do you copy `_job_id`?","created_at":"2014-09-10T17:14:04Z","updated_at":"2014-09-10T17:14:04Z","html_url":"https://github.com/yandex-sysmon/powny/pull/162#discussion_r17374699","pull_request_url":"https://api.github.com/repos/yandex-sysmon/powny/pulls/162","_links":{"self":{"href":"https://api.github.com/repos/yandex-sysmon/powny/pulls/comments/17374699"},"html":{"href":"https://github.com/yandex-sysmon/powny/pull/162#discussion_r17374699"},"pull_request":{"href":"https://api.github.com/repos/yandex-sysmon/powny/pulls/162"}}},"pull_request":{"url":"https://api.github.com/repos/yandex-sysmon/powny/pulls/162","id":20577025,"html_url":"https://github.com/yandex-sysmon/powny/pull/162","diff_url":"https://github.com/yandex-sysmon/powny/pull/162.diff","patch_url":"https://github.com/yandex-sysmon/powny/pull/162.patch","issue_url":"https://api.github.com/repos/yandex-sysmon/powny/issues/162","number":162,"state":"open","locked":false,"title":"New powny kernel/userspace","user":{"login":"mdevaev","id":416259,"avatar_url":"https://avatars.githubusercontent.com/u/416259?v=2","gravatar_id":"30739fb9758346d44ba8a46335286a43","url":"https://api.github.com/users/mdevaev","html_url":"https://github.com/mdevaev","followers_url":"https://api.github.com/users/mdevaev/followers","following_url":"https://api.github.com/users/mdevaev/following{/other_user}","gists_url":"https://api.github.com/users/mdevaev/gists{/gist_id}","starred_url":"https://api.github.com/users/mdevaev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mdevaev/subscriptions","organizations_url":"https://api.github.com/users/mdevaev/orgs","repos_url":"https://api.github.com/users/mdevaev/repos","events_url":"https://api.github.com/users/mdevaev/events{/privacy}","received_events_url":"https://api.github.com/users/mdevaev/received_events","type":"User","site_admin":false},"body":"PS: Tests failed because the new version of requests/vcrpy contains a bug: https://github.com/kevin1024/vcrpy/issues/94","created_at":"2014-09-01T15:15:58Z","updated_at":"2014-09-10T17:14:04Z","closed_at":null,"merged_at":null,"merge_commit_sha":"28cad6da557e77aaa7ced66ffc7edb6c93e62224","assignee":{"login":"nikicat","id":329262,"avatar_url":"https://avatars.githubusercontent.com/u/329262?v=2","gravatar_id":"709bc993640f94f768c1ec86b699167d","url":"https://api.github.com/users/nikicat","html_url":"https://github.com/nikicat","followers_url":"https://api.github.com/users/nikicat/followers","following_url":"https://api.github.com/users/nikicat/following{/other_user}","gists_url":"https://api.github.com/users/nikicat/gists{/gist_id}","starred_url":"https://api.github.com/users/nikicat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nikicat/subscriptions","organizations_url":"https://api.github.com/users/nikicat/orgs","repos_url":"https://api.github.com/users/nikicat/repos","events_url":"https://api.github.com/users/nikicat/events{/privacy}","received_events_url":"https://api.github.com/users/nikicat/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/yandex-sysmon/powny/pulls/162/commits","review_comments_url":"https://api.github.com/repos/yandex-sysmon/powny/pulls/162/comments","review_comment_url":"https://api.github.com/repos/yandex-sysmon/powny/pulls/comments/{number}","comments_url":"https://api.github.com/repos/yandex-sysmon/powny/issues/162/comments","statuses_url":"https://api.github.com/repos/yandex-sysmon/powny/statuses/7ccfce2509f2561ccafbe89fe4adeaa8601818cb","head":{"label":"mdevaev:powny-ng","ref":"powny-ng","sha":"7ccfce2509f2561ccafbe89fe4adeaa8601818cb","user":{"login":"mdevaev","id":416259,"avatar_url":"https://avatars.githubusercontent.com/u/416259?v=2","gravatar_id":"30739fb9758346d44ba8a46335286a43","url":"https://api.github.com/users/mdevaev","html_url":"https://github.com/mdevaev","followers_url":"https://api.github.com/users/mdevaev/followers","following_url":"https://api.github.com/users/mdevaev/following{/other_user}","gists_url":"https://api.github.com/users/mdevaev/gists{/gist_id}","starred_url":"https://api.github.com/users/mdevaev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mdevaev/subscriptions","organizations_url":"https://api.github.com/users/mdevaev/orgs","repos_url":"https://api.github.com/users/mdevaev/repos","events_url":"https://api.github.com/users/mdevaev/events{/privacy}","received_events_url":"https://api.github.com/users/mdevaev/received_events","type":"User","site_admin":false},"repo":{"id":15169340,"name":"gns","full_name":"mdevaev/gns","owner":{"login":"mdevaev","id":416259,"avatar_url":"https://avatars.githubusercontent.com/u/416259?v=2","gravatar_id":"30739fb9758346d44ba8a46335286a43","url":"https://api.github.com/users/mdevaev","html_url":"https://github.com/mdevaev","followers_url":"https://api.github.com/users/mdevaev/followers","following_url":"https://api.github.com/users/mdevaev/following{/other_user}","gists_url":"https://api.github.com/users/mdevaev/gists{/gist_id}","starred_url":"https://api.github.com/users/mdevaev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mdevaev/subscriptions","organizations_url":"https://api.github.com/users/mdevaev/orgs","repos_url":"https://api.github.com/users/mdevaev/repos","events_url":"https://api.github.com/users/mdevaev/events{/privacy}","received_events_url":"https://api.github.com/users/mdevaev/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/mdevaev/gns","description":"Universal distributed notification service","fork":true,"url":"https://api.github.com/repos/mdevaev/gns","forks_url":"https://api.github.com/repos/mdevaev/gns/forks","keys_url":"https://api.github.com/repos/mdevaev/gns/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mdevaev/gns/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mdevaev/gns/teams","hooks_url":"https://api.github.com/repos/mdevaev/gns/hooks","issue_events_url":"https://api.github.com/repos/mdevaev/gns/issues/events{/number}","events_url":"https://api.github.com/repos/mdevaev/gns/events","assignees_url":"https://api.github.com/repos/mdevaev/gns/assignees{/user}","branches_url":"https://api.github.com/repos/mdevaev/gns/branches{/branch}","tags_url":"https://api.github.com/repos/mdevaev/gns/tags","blobs_url":"https://api.github.com/repos/mdevaev/gns/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mdevaev/gns/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mdevaev/gns/git/refs{/sha}","trees_url":"https://api.github.com/repos/mdevaev/gns/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mdevaev/gns/statuses/{sha}","languages_url":"https://api.github.com/repos/mdevaev/gns/languages","stargazers_url":"https://api.github.com/repos/mdevaev/gns/stargazers","contributors_url":"https://api.github.com/repos/mdevaev/gns/contributors","subscribers_url":"https://api.github.com/repos/mdevaev/gns/subscribers","subscription_url":"https://api.github.com/repos/mdevaev/gns/subscription","commits_url":"https://api.github.com/repos/mdevaev/gns/commits{/sha}","git_commits_url":"https://api.github.com/repos/mdevaev/gns/git/commits{/sha}","comments_url":"https://api.github.com/repos/mdevaev/gns/comments{/number}","issue_comment_url":"https://api.github.com/repos/mdevaev/gns/issues/comments/{number}","contents_url":"https://api.github.com/repos/mdevaev/gns/contents/{+path}","compare_url":"https://api.github.com/repos/mdevaev/gns/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mdevaev/gns/merges","archive_url":"https://api.github.com/repos/mdevaev/gns/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mdevaev/gns/downloads","issues_url":"https://api.github.com/repos/mdevaev/gns/issues{/number}","pulls_url":"https://api.github.com/repos/mdevaev/gns/pulls{/number}","milestones_url":"https://api.github.com/repos/mdevaev/gns/milestones{/number}","notifications_url":"https://api.github.com/repos/mdevaev/gns/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mdevaev/gns/labels{/name}","releases_url":"https://api.github.com/repos/mdevaev/gns/releases{/id}","created_at":"2013-12-13T17:13:02Z","updated_at":"2014-08-12T09:23:56Z","pushed_at":"2014-09-08T15:42:29Z","git_url":"git://github.com/mdevaev/gns.git","ssh_url":"git@github.com:mdevaev/gns.git","clone_url":"https://github.com/mdevaev/gns.git","svn_url":"https://github.com/mdevaev/gns","homepage":"","size":3931,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"yandex-sysmon:powny-ng","ref":"powny-ng","sha":"cd070d1a31e0fcf282d468d38775dcef831bbd7c","user":{"login":"yandex-sysmon","id":5229177,"avatar_url":"https://avatars.githubusercontent.com/u/5229177?v=2","gravatar_id":"28c12f4cbdea361456ccfd12c012da8d","url":"https://api.github.com/users/yandex-sysmon","html_url":"https://github.com/yandex-sysmon","followers_url":"https://api.github.com/users/yandex-sysmon/followers","following_url":"https://api.github.com/users/yandex-sysmon/following{/other_user}","gists_url":"https://api.github.com/users/yandex-sysmon/gists{/gist_id}","starred_url":"https://api.github.com/users/yandex-sysmon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yandex-sysmon/subscriptions","organizations_url":"https://api.github.com/users/yandex-sysmon/orgs","repos_url":"https://api.github.com/users/yandex-sysmon/repos","events_url":"https://api.github.com/users/yandex-sysmon/events{/privacy}","received_events_url":"https://api.github.com/users/yandex-sysmon/received_events","type":"Organization","site_admin":false},"repo":{"id":15111065,"name":"powny","full_name":"yandex-sysmon/powny","owner":{"login":"yandex-sysmon","id":5229177,"avatar_url":"https://avatars.githubusercontent.com/u/5229177?v=2","gravatar_id":"28c12f4cbdea361456ccfd12c012da8d","url":"https://api.github.com/users/yandex-sysmon","html_url":"https://github.com/yandex-sysmon","followers_url":"https://api.github.com/users/yandex-sysmon/followers","following_url":"https://api.github.com/users/yandex-sysmon/following{/other_user}","gists_url":"https://api.github.com/users/yandex-sysmon/gists{/gist_id}","starred_url":"https://api.github.com/users/yandex-sysmon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yandex-sysmon/subscriptions","organizations_url":"https://api.github.com/users/yandex-sysmon/orgs","repos_url":"https://api.github.com/users/yandex-sysmon/repos","events_url":"https://api.github.com/users/yandex-sysmon/events{/privacy}","received_events_url":"https://api.github.com/users/yandex-sysmon/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/yandex-sysmon/powny","description":"Universal distributed notification service","fork":false,"url":"https://api.github.com/repos/yandex-sysmon/powny","forks_url":"https://api.github.com/repos/yandex-sysmon/powny/forks","keys_url":"https://api.github.com/repos/yandex-sysmon/powny/keys{/key_id}","collaborators_url":"https://api.github.com/repos/yandex-sysmon/powny/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/yandex-sysmon/powny/teams","hooks_url":"https://api.github.com/repos/yandex-sysmon/powny/hooks","issue_events_url":"https://api.github.com/repos/yandex-sysmon/powny/issues/events{/number}","events_url":"https://api.github.com/repos/yandex-sysmon/powny/events","assignees_url":"https://api.github.com/repos/yandex-sysmon/powny/assignees{/user}","branches_url":"https://api.github.com/repos/yandex-sysmon/powny/branches{/branch}","tags_url":"https://api.github.com/repos/yandex-sysmon/powny/tags","blobs_url":"https://api.github.com/repos/yandex-sysmon/powny/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/yandex-sysmon/powny/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/yandex-sysmon/powny/git/refs{/sha}","trees_url":"https://api.github.com/repos/yandex-sysmon/powny/git/trees{/sha}","statuses_url":"https://api.github.com/repos/yandex-sysmon/powny/statuses/{sha}","languages_url":"https://api.github.com/repos/yandex-sysmon/powny/languages","stargazers_url":"https://api.github.com/repos/yandex-sysmon/powny/stargazers","contributors_url":"https://api.github.com/repos/yandex-sysmon/powny/contributors","subscribers_url":"https://api.github.com/repos/yandex-sysmon/powny/subscribers","subscription_url":"https://api.github.com/repos/yandex-sysmon/powny/subscription","commits_url":"https://api.github.com/repos/yandex-sysmon/powny/commits{/sha}","git_commits_url":"https://api.github.com/repos/yandex-sysmon/powny/git/commits{/sha}","comments_url":"https://api.github.com/repos/yandex-sysmon/powny/comments{/number}","issue_comment_url":"https://api.github.com/repos/yandex-sysmon/powny/issues/comments/{number}","contents_url":"https://api.github.com/repos/yandex-sysmon/powny/contents/{+path}","compare_url":"https://api.github.com/repos/yandex-sysmon/powny/compare/{base}...{head}","merges_url":"https://api.github.com/repos/yandex-sysmon/powny/merges","archive_url":"https://api.github.com/repos/yandex-sysmon/powny/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/yandex-sysmon/powny/downloads","issues_url":"https://api.github.com/repos/yandex-sysmon/powny/issues{/number}","pulls_url":"https://api.github.com/repos/yandex-sysmon/powny/pulls{/number}","milestones_url":"https://api.github.com/repos/yandex-sysmon/powny/milestones{/number}","notifications_url":"https://api.github.com/repos/yandex-sysmon/powny/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/yandex-sysmon/powny/labels{/name}","releases_url":"https://api.github.com/repos/yandex-sysmon/powny/releases{/id}","created_at":"2013-12-11T15:31:17Z","updated_at":"2014-09-08T13:45:41Z","pushed_at":"2014-09-01T15:14:49Z","git_url":"git://github.com/yandex-sysmon/powny.git","ssh_url":"git@github.com:yandex-sysmon/powny.git","clone_url":"https://github.com/yandex-sysmon/powny.git","svn_url":"https://github.com/yandex-sysmon/powny","homepage":"","size":3236,"stargazers_count":4,"watchers_count":4,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"forks_count":3,"mirror_url":null,"open_issues_count":17,"forks":3,"open_issues":17,"watchers":4,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/yandex-sysmon/powny/pulls/162"},"html":{"href":"https://github.com/yandex-sysmon/powny/pull/162"},"issue":{"href":"https://api.github.com/repos/yandex-sysmon/powny/issues/162"},"comments":{"href":"https://api.github.com/repos/yandex-sysmon/powny/issues/162/comments"},"review_comments":{"href":"https://api.github.com/repos/yandex-sysmon/powny/pulls/162/comments"},"review_comment":{"href":"https://api.github.com/repos/yandex-sysmon/powny/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/yandex-sysmon/powny/pulls/162/commits"},"statuses":{"href":"https://api.github.com/repos/yandex-sysmon/powny/statuses/7ccfce2509f2561ccafbe89fe4adeaa8601818cb"}}}}