{"action":"created","comment":{"url":"https://api.github.com/repos/grpc/grpc/pulls/comments/32851526","id":32851526,"diff_hunk":"@@ -0,0 +1,992 @@\n+# vim: expandtab:ts=2:sw=2:sts=2\n+\n+cimport grpc\n+cimport cpython\n+\n+import time\n+\n+# There are a lot of nested structures in GRPC C core. We wrap all of them in\n+# Cython extension classes and nest them in parallel in their C and Python\n+# representations. Because they memory is synchronized between them, we can\n+# forego a lot of the manual memory management that would be handled by using\n+# the CPython API alone. Furthermore, we don't need to handle as many GC issues\n+# (any GC issues at all?) because of this interlocking between C and Python\n+# memory.\n+\n+#\n+# Global state","path":"src/python/src/grpc/_adapter/_c/__init__.pyx","position":17,"original_position":17,"commit_id":"eb1cef8e5817fb22c39085e8dde531046a6836f9","original_commit_id":"eb1cef8e5817fb22c39085e8dde531046a6836f9","user":{"login":"nathanielmanistaatgoogle","id":10131044,"avatar_url":"https://avatars.githubusercontent.com/u/10131044?v=3","gravatar_id":"","url":"https://api.github.com/users/nathanielmanistaatgoogle","html_url":"https://github.com/nathanielmanistaatgoogle","followers_url":"https://api.github.com/users/nathanielmanistaatgoogle/followers","following_url":"https://api.github.com/users/nathanielmanistaatgoogle/following{/other_user}","gists_url":"https://api.github.com/users/nathanielmanistaatgoogle/gists{/gist_id}","starred_url":"https://api.github.com/users/nathanielmanistaatgoogle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nathanielmanistaatgoogle/subscriptions","organizations_url":"https://api.github.com/users/nathanielmanistaatgoogle/orgs","repos_url":"https://api.github.com/users/nathanielmanistaatgoogle/repos","events_url":"https://api.github.com/users/nathanielmanistaatgoogle/events{/privacy}","received_events_url":"https://api.github.com/users/nathanielmanistaatgoogle/received_events","type":"User","site_admin":false},"body":"I'm generally against \"section headings\" in source files as they indicate both knowledge that a file is too large and knowledge of where to break it up. Is there a Cython reason for having all this code together?","created_at":"2015-06-19T17:41:52Z","updated_at":"2015-06-19T17:41:52Z","html_url":"https://github.com/grpc/grpc/pull/2134#discussion_r32851526","pull_request_url":"https://api.github.com/repos/grpc/grpc/pulls/2134","_links":{"self":{"href":"https://api.github.com/repos/grpc/grpc/pulls/comments/32851526"},"html":{"href":"https://github.com/grpc/grpc/pull/2134#discussion_r32851526"},"pull_request":{"href":"https://api.github.com/repos/grpc/grpc/pulls/2134"}}},"pull_request":{"url":"https://api.github.com/repos/grpc/grpc/pulls/2134","id":38064322,"html_url":"https://github.com/grpc/grpc/pull/2134","diff_url":"https://github.com/grpc/grpc/pull/2134.diff","patch_url":"https://github.com/grpc/grpc/pull/2134.patch","issue_url":"https://api.github.com/repos/grpc/grpc/issues/2134","number":2134,"state":"open","locked":false,"title":"Refactor C wrapping layer w/ Cython","user":{"login":"soltanmm","id":4889063,"avatar_url":"https://avatars.githubusercontent.com/u/4889063?v=3","gravatar_id":"","url":"https://api.github.com/users/soltanmm","html_url":"https://github.com/soltanmm","followers_url":"https://api.github.com/users/soltanmm/followers","following_url":"https://api.github.com/users/soltanmm/following{/other_user}","gists_url":"https://api.github.com/users/soltanmm/gists{/gist_id}","starred_url":"https://api.github.com/users/soltanmm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/soltanmm/subscriptions","organizations_url":"https://api.github.com/users/soltanmm/orgs","repos_url":"https://api.github.com/users/soltanmm/repos","events_url":"https://api.github.com/users/soltanmm/events{/privacy}","received_events_url":"https://api.github.com/users/soltanmm/received_events","type":"User","site_admin":false},"body":"Work in progress. Putting this up for comment on code style w.r.t. Cython (the `__init__.pyx` and `grpc.pxd` files); I'm not aware of any Google style guides for the Cython flavor of Python and I've been finding myself mixing and matching C and Python styles somewhat haphazardly.\r\n\r\n(I'll move the Py3-related changes into separate commits at a later point)","created_at":"2015-06-18T23:32:33Z","updated_at":"2015-06-19T17:41:52Z","closed_at":null,"merged_at":null,"merge_commit_sha":"87d01323738496ffdd88961c3765bce3c39412ec","assignee":{"login":"nathanielmanistaatgoogle","id":10131044,"avatar_url":"https://avatars.githubusercontent.com/u/10131044?v=3","gravatar_id":"","url":"https://api.github.com/users/nathanielmanistaatgoogle","html_url":"https://github.com/nathanielmanistaatgoogle","followers_url":"https://api.github.com/users/nathanielmanistaatgoogle/followers","following_url":"https://api.github.com/users/nathanielmanistaatgoogle/following{/other_user}","gists_url":"https://api.github.com/users/nathanielmanistaatgoogle/gists{/gist_id}","starred_url":"https://api.github.com/users/nathanielmanistaatgoogle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nathanielmanistaatgoogle/subscriptions","organizations_url":"https://api.github.com/users/nathanielmanistaatgoogle/orgs","repos_url":"https://api.github.com/users/nathanielmanistaatgoogle/repos","events_url":"https://api.github.com/users/nathanielmanistaatgoogle/events{/privacy}","received_events_url":"https://api.github.com/users/nathanielmanistaatgoogle/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/grpc/grpc/pulls/2134/commits","review_comments_url":"https://api.github.com/repos/grpc/grpc/pulls/2134/comments","review_comment_url":"https://api.github.com/repos/grpc/grpc/pulls/comments{/number}","comments_url":"https://api.github.com/repos/grpc/grpc/issues/2134/comments","statuses_url":"https://api.github.com/repos/grpc/grpc/statuses/eb1cef8e5817fb22c39085e8dde531046a6836f9","head":{"label":"soltanmm:cython","ref":"cython","sha":"eb1cef8e5817fb22c39085e8dde531046a6836f9","user":{"login":"soltanmm","id":4889063,"avatar_url":"https://avatars.githubusercontent.com/u/4889063?v=3","gravatar_id":"","url":"https://api.github.com/users/soltanmm","html_url":"https://github.com/soltanmm","followers_url":"https://api.github.com/users/soltanmm/followers","following_url":"https://api.github.com/users/soltanmm/following{/other_user}","gists_url":"https://api.github.com/users/soltanmm/gists{/gist_id}","starred_url":"https://api.github.com/users/soltanmm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/soltanmm/subscriptions","organizations_url":"https://api.github.com/users/soltanmm/orgs","repos_url":"https://api.github.com/users/soltanmm/repos","events_url":"https://api.github.com/users/soltanmm/events{/privacy}","received_events_url":"https://api.github.com/users/soltanmm/received_events","type":"User","site_admin":false},"repo":{"id":31384607,"name":"grpc","full_name":"soltanmm/grpc","owner":{"login":"soltanmm","id":4889063,"avatar_url":"https://avatars.githubusercontent.com/u/4889063?v=3","gravatar_id":"","url":"https://api.github.com/users/soltanmm","html_url":"https://github.com/soltanmm","followers_url":"https://api.github.com/users/soltanmm/followers","following_url":"https://api.github.com/users/soltanmm/following{/other_user}","gists_url":"https://api.github.com/users/soltanmm/gists{/gist_id}","starred_url":"https://api.github.com/users/soltanmm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/soltanmm/subscriptions","organizations_url":"https://api.github.com/users/soltanmm/orgs","repos_url":"https://api.github.com/users/soltanmm/repos","events_url":"https://api.github.com/users/soltanmm/events{/privacy}","received_events_url":"https://api.github.com/users/soltanmm/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/soltanmm/grpc","description":"The C based gRPC (C++, Node.js, Python, Ruby, Objective-C, PHP, C#)","fork":true,"url":"https://api.github.com/repos/soltanmm/grpc","forks_url":"https://api.github.com/repos/soltanmm/grpc/forks","keys_url":"https://api.github.com/repos/soltanmm/grpc/keys{/key_id}","collaborators_url":"https://api.github.com/repos/soltanmm/grpc/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/soltanmm/grpc/teams","hooks_url":"https://api.github.com/repos/soltanmm/grpc/hooks","issue_events_url":"https://api.github.com/repos/soltanmm/grpc/issues/events{/number}","events_url":"https://api.github.com/repos/soltanmm/grpc/events","assignees_url":"https://api.github.com/repos/soltanmm/grpc/assignees{/user}","branches_url":"https://api.github.com/repos/soltanmm/grpc/branches{/branch}","tags_url":"https://api.github.com/repos/soltanmm/grpc/tags","blobs_url":"https://api.github.com/repos/soltanmm/grpc/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/soltanmm/grpc/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/soltanmm/grpc/git/refs{/sha}","trees_url":"https://api.github.com/repos/soltanmm/grpc/git/trees{/sha}","statuses_url":"https://api.github.com/repos/soltanmm/grpc/statuses/{sha}","languages_url":"https://api.github.com/repos/soltanmm/grpc/languages","stargazers_url":"https://api.github.com/repos/soltanmm/grpc/stargazers","contributors_url":"https://api.github.com/repos/soltanmm/grpc/contributors","subscribers_url":"https://api.github.com/repos/soltanmm/grpc/subscribers","subscription_url":"https://api.github.com/repos/soltanmm/grpc/subscription","commits_url":"https://api.github.com/repos/soltanmm/grpc/commits{/sha}","git_commits_url":"https://api.github.com/repos/soltanmm/grpc/git/commits{/sha}","comments_url":"https://api.github.com/repos/soltanmm/grpc/comments{/number}","issue_comment_url":"https://api.github.com/repos/soltanmm/grpc/issues/comments{/number}","contents_url":"https://api.github.com/repos/soltanmm/grpc/contents/{+path}","compare_url":"https://api.github.com/repos/soltanmm/grpc/compare/{base}...{head}","merges_url":"https://api.github.com/repos/soltanmm/grpc/merges","archive_url":"https://api.github.com/repos/soltanmm/grpc/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/soltanmm/grpc/downloads","issues_url":"https://api.github.com/repos/soltanmm/grpc/issues{/number}","pulls_url":"https://api.github.com/repos/soltanmm/grpc/pulls{/number}","milestones_url":"https://api.github.com/repos/soltanmm/grpc/milestones{/number}","notifications_url":"https://api.github.com/repos/soltanmm/grpc/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/soltanmm/grpc/labels{/name}","releases_url":"https://api.github.com/repos/soltanmm/grpc/releases{/id}","created_at":"2015-02-26T19:25:31Z","updated_at":"2015-05-06T19:41:05Z","pushed_at":"2015-06-18T23:35:42Z","git_url":"git://github.com/soltanmm/grpc.git","ssh_url":"git@github.com:soltanmm/grpc.git","clone_url":"https://github.com/soltanmm/grpc.git","svn_url":"https://github.com/soltanmm/grpc","homepage":"","size":32784,"stargazers_count":0,"watchers_count":0,"language":"C","has_issues":false,"has_downloads":false,"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":"grpc:master","ref":"master","sha":"a15f08cc9a8004785ec937b2ee06951b600d87b6","user":{"login":"grpc","id":7802525,"avatar_url":"https://avatars.githubusercontent.com/u/7802525?v=3","gravatar_id":"","url":"https://api.github.com/users/grpc","html_url":"https://github.com/grpc","followers_url":"https://api.github.com/users/grpc/followers","following_url":"https://api.github.com/users/grpc/following{/other_user}","gists_url":"https://api.github.com/users/grpc/gists{/gist_id}","starred_url":"https://api.github.com/users/grpc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/grpc/subscriptions","organizations_url":"https://api.github.com/users/grpc/orgs","repos_url":"https://api.github.com/users/grpc/repos","events_url":"https://api.github.com/users/grpc/events{/privacy}","received_events_url":"https://api.github.com/users/grpc/received_events","type":"Organization","site_admin":false},"repo":{"id":27729880,"name":"grpc","full_name":"grpc/grpc","owner":{"login":"grpc","id":7802525,"avatar_url":"https://avatars.githubusercontent.com/u/7802525?v=3","gravatar_id":"","url":"https://api.github.com/users/grpc","html_url":"https://github.com/grpc","followers_url":"https://api.github.com/users/grpc/followers","following_url":"https://api.github.com/users/grpc/following{/other_user}","gists_url":"https://api.github.com/users/grpc/gists{/gist_id}","starred_url":"https://api.github.com/users/grpc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/grpc/subscriptions","organizations_url":"https://api.github.com/users/grpc/orgs","repos_url":"https://api.github.com/users/grpc/repos","events_url":"https://api.github.com/users/grpc/events{/privacy}","received_events_url":"https://api.github.com/users/grpc/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/grpc/grpc","description":"The C based gRPC (C++, Node.js, Python, Ruby, Objective-C, PHP, C#)","fork":false,"url":"https://api.github.com/repos/grpc/grpc","forks_url":"https://api.github.com/repos/grpc/grpc/forks","keys_url":"https://api.github.com/repos/grpc/grpc/keys{/key_id}","collaborators_url":"https://api.github.com/repos/grpc/grpc/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/grpc/grpc/teams","hooks_url":"https://api.github.com/repos/grpc/grpc/hooks","issue_events_url":"https://api.github.com/repos/grpc/grpc/issues/events{/number}","events_url":"https://api.github.com/repos/grpc/grpc/events","assignees_url":"https://api.github.com/repos/grpc/grpc/assignees{/user}","branches_url":"https://api.github.com/repos/grpc/grpc/branches{/branch}","tags_url":"https://api.github.com/repos/grpc/grpc/tags","blobs_url":"https://api.github.com/repos/grpc/grpc/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/grpc/grpc/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/grpc/grpc/git/refs{/sha}","trees_url":"https://api.github.com/repos/grpc/grpc/git/trees{/sha}","statuses_url":"https://api.github.com/repos/grpc/grpc/statuses/{sha}","languages_url":"https://api.github.com/repos/grpc/grpc/languages","stargazers_url":"https://api.github.com/repos/grpc/grpc/stargazers","contributors_url":"https://api.github.com/repos/grpc/grpc/contributors","subscribers_url":"https://api.github.com/repos/grpc/grpc/subscribers","subscription_url":"https://api.github.com/repos/grpc/grpc/subscription","commits_url":"https://api.github.com/repos/grpc/grpc/commits{/sha}","git_commits_url":"https://api.github.com/repos/grpc/grpc/git/commits{/sha}","comments_url":"https://api.github.com/repos/grpc/grpc/comments{/number}","issue_comment_url":"https://api.github.com/repos/grpc/grpc/issues/comments{/number}","contents_url":"https://api.github.com/repos/grpc/grpc/contents/{+path}","compare_url":"https://api.github.com/repos/grpc/grpc/compare/{base}...{head}","merges_url":"https://api.github.com/repos/grpc/grpc/merges","archive_url":"https://api.github.com/repos/grpc/grpc/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/grpc/grpc/downloads","issues_url":"https://api.github.com/repos/grpc/grpc/issues{/number}","pulls_url":"https://api.github.com/repos/grpc/grpc/pulls{/number}","milestones_url":"https://api.github.com/repos/grpc/grpc/milestones{/number}","notifications_url":"https://api.github.com/repos/grpc/grpc/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/grpc/grpc/labels{/name}","releases_url":"https://api.github.com/repos/grpc/grpc/releases{/id}","created_at":"2014-12-08T18:58:53Z","updated_at":"2015-06-19T15:29:14Z","pushed_at":"2015-06-19T17:30:41Z","git_url":"git://github.com/grpc/grpc.git","ssh_url":"git@github.com:grpc/grpc.git","clone_url":"https://github.com/grpc/grpc.git","svn_url":"https://github.com/grpc/grpc","homepage":"","size":56562,"stargazers_count":2753,"watchers_count":2753,"language":"C","has_issues":true,"has_downloads":false,"has_wiki":true,"has_pages":false,"forks_count":381,"mirror_url":null,"open_issues_count":341,"forks":381,"open_issues":341,"watchers":2753,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/grpc/grpc/pulls/2134"},"html":{"href":"https://github.com/grpc/grpc/pull/2134"},"issue":{"href":"https://api.github.com/repos/grpc/grpc/issues/2134"},"comments":{"href":"https://api.github.com/repos/grpc/grpc/issues/2134/comments"},"review_comments":{"href":"https://api.github.com/repos/grpc/grpc/pulls/2134/comments"},"review_comment":{"href":"https://api.github.com/repos/grpc/grpc/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/grpc/grpc/pulls/2134/commits"},"statuses":{"href":"https://api.github.com/repos/grpc/grpc/statuses/eb1cef8e5817fb22c39085e8dde531046a6836f9"}}}}