{"action":"created","comment":{"url":"https://api.github.com/repos/grpc/grpc/pulls/comments/73388652","id":73388652,"diff_hunk":"@@ -0,0 +1,47 @@\n+# Copyright 2016, Google Inc.\n+# All rights reserved.\n+#\n+# Redistribution and use in source and binary forms, with or without\n+# modification, are permitted provided that the following conditions are\n+# met:\n+#\n+#     * Redistributions of source code must retain the above copyright\n+# notice, this list of conditions and the following disclaimer.\n+#     * Redistributions in binary form must reproduce the above\n+# copyright notice, this list of conditions and the following disclaimer\n+# in the documentation and/or other materials provided with the\n+# distribution.\n+#     * Neither the name of Google Inc. nor the names of its\n+# contributors may be used to endorse or promote products derived from\n+# this software without specific prior written permission.\n+#\n+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n+# \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n+# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n+# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n+# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n+# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n+\n+from concurrent import futures\n+\n+\n+class RecordingThreadPool(futures.ThreadPoolExecutor):\n+  \"\"\"\n+  Subclasses ThreadPoolExecutor and adds property to check if the pool was ever used\n+  \"\"\"\n+  def __init__(self, max_workers):\n+    self._was_used = False\n+    super(RecordingThreadPool, self).__init__(max_workers)","path":"src/python/grpcio_tests/tests/unit/_thread_pool.py","position":null,"original_position":39,"commit_id":"d0fde38a17879063de5e2616f7bf8bf3ae03737d","original_commit_id":"85a4a0aeda907a8581e7a8f7801297751490be79","user":{"login":"thunderboltsid","id":6081171,"avatar_url":"https://avatars.githubusercontent.com/u/6081171?v=3","gravatar_id":"","url":"https://api.github.com/users/thunderboltsid","html_url":"https://github.com/thunderboltsid","followers_url":"https://api.github.com/users/thunderboltsid/followers","following_url":"https://api.github.com/users/thunderboltsid/following{/other_user}","gists_url":"https://api.github.com/users/thunderboltsid/gists{/gist_id}","starred_url":"https://api.github.com/users/thunderboltsid/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thunderboltsid/subscriptions","organizations_url":"https://api.github.com/users/thunderboltsid/orgs","repos_url":"https://api.github.com/users/thunderboltsid/repos","events_url":"https://api.github.com/users/thunderboltsid/events{/privacy}","received_events_url":"https://api.github.com/users/thunderboltsid/received_events","type":"User","site_admin":false},"body":"Convention or is there a specific reason (overriding of variable in case of name clash)?","created_at":"2016-08-03T18:12:10Z","updated_at":"2016-08-03T18:12:10Z","html_url":"https://github.com/grpc/grpc/pull/7625#discussion_r73388652","pull_request_url":"https://api.github.com/repos/grpc/grpc/pulls/7625","_links":{"self":{"href":"https://api.github.com/repos/grpc/grpc/pulls/comments/73388652"},"html":{"href":"https://github.com/grpc/grpc/pull/7625#discussion_r73388652"},"pull_request":{"href":"https://api.github.com/repos/grpc/grpc/pulls/7625"}}},"pull_request":{"url":"https://api.github.com/repos/grpc/grpc/pulls/7625","id":79949029,"html_url":"https://github.com/grpc/grpc/pull/7625","diff_url":"https://github.com/grpc/grpc/pull/7625.diff","patch_url":"https://github.com/grpc/grpc/pull/7625.patch","issue_url":"https://api.github.com/repos/grpc/grpc/issues/7625","number":7625,"state":"open","locked":false,"title":"Fix the ThreadPoolExecutor: max_workers can't be 0 in _channel_connectivity_test and _channel_ready_future_test","user":{"login":"thunderboltsid","id":6081171,"avatar_url":"https://avatars.githubusercontent.com/u/6081171?v=3","gravatar_id":"","url":"https://api.github.com/users/thunderboltsid","html_url":"https://github.com/thunderboltsid","followers_url":"https://api.github.com/users/thunderboltsid/followers","following_url":"https://api.github.com/users/thunderboltsid/following{/other_user}","gists_url":"https://api.github.com/users/thunderboltsid/gists{/gist_id}","starred_url":"https://api.github.com/users/thunderboltsid/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thunderboltsid/subscriptions","organizations_url":"https://api.github.com/users/thunderboltsid/orgs","repos_url":"https://api.github.com/users/thunderboltsid/repos","events_url":"https://api.github.com/users/thunderboltsid/events{/privacy}","received_events_url":"https://api.github.com/users/thunderboltsid/received_events","type":"User","site_admin":false},"body":"Add a RecordingThreadPool that inherits from ThreadPoolExecutor\r\nand has an extra property 'was_used' to indicate if submit method was\r\never called i.e. if the thread pool was ever used.","created_at":"2016-08-03T17:48:59Z","updated_at":"2016-08-03T18:12:11Z","closed_at":null,"merged_at":null,"merge_commit_sha":"baf12da5d245d0f6c22a1c1eff1e6dae4418174f","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},"assignees":[{"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":{"url":"https://api.github.com/repos/grpc/grpc/milestones/45","html_url":"https://github.com/grpc/grpc/milestones/1.1","labels_url":"https://api.github.com/repos/grpc/grpc/milestones/45/labels","id":1845911,"number":45,"title":"1.1","description":"Soon after GA.","creator":{"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},"open_issues":21,"closed_issues":6,"state":"open","created_at":"2016-06-23T17:58:55Z","updated_at":"2016-08-03T18:12:04Z","due_on":null,"closed_at":null},"commits_url":"https://api.github.com/repos/grpc/grpc/pulls/7625/commits","review_comments_url":"https://api.github.com/repos/grpc/grpc/pulls/7625/comments","review_comment_url":"https://api.github.com/repos/grpc/grpc/pulls/comments{/number}","comments_url":"https://api.github.com/repos/grpc/grpc/issues/7625/comments","statuses_url":"https://api.github.com/repos/grpc/grpc/statuses/d0fde38a17879063de5e2616f7bf8bf3ae03737d","head":{"label":"thunderboltsid:python-test-fix","ref":"python-test-fix","sha":"d0fde38a17879063de5e2616f7bf8bf3ae03737d","user":{"login":"thunderboltsid","id":6081171,"avatar_url":"https://avatars.githubusercontent.com/u/6081171?v=3","gravatar_id":"","url":"https://api.github.com/users/thunderboltsid","html_url":"https://github.com/thunderboltsid","followers_url":"https://api.github.com/users/thunderboltsid/followers","following_url":"https://api.github.com/users/thunderboltsid/following{/other_user}","gists_url":"https://api.github.com/users/thunderboltsid/gists{/gist_id}","starred_url":"https://api.github.com/users/thunderboltsid/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thunderboltsid/subscriptions","organizations_url":"https://api.github.com/users/thunderboltsid/orgs","repos_url":"https://api.github.com/users/thunderboltsid/repos","events_url":"https://api.github.com/users/thunderboltsid/events{/privacy}","received_events_url":"https://api.github.com/users/thunderboltsid/received_events","type":"User","site_admin":false},"repo":{"id":62154439,"name":"grpc","full_name":"thunderboltsid/grpc","owner":{"login":"thunderboltsid","id":6081171,"avatar_url":"https://avatars.githubusercontent.com/u/6081171?v=3","gravatar_id":"","url":"https://api.github.com/users/thunderboltsid","html_url":"https://github.com/thunderboltsid","followers_url":"https://api.github.com/users/thunderboltsid/followers","following_url":"https://api.github.com/users/thunderboltsid/following{/other_user}","gists_url":"https://api.github.com/users/thunderboltsid/gists{/gist_id}","starred_url":"https://api.github.com/users/thunderboltsid/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thunderboltsid/subscriptions","organizations_url":"https://api.github.com/users/thunderboltsid/orgs","repos_url":"https://api.github.com/users/thunderboltsid/repos","events_url":"https://api.github.com/users/thunderboltsid/events{/privacy}","received_events_url":"https://api.github.com/users/thunderboltsid/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/thunderboltsid/grpc","description":"The C based gRPC (C++, Node.js, Python, Ruby, Objective-C, PHP, C#)","fork":true,"url":"https://api.github.com/repos/thunderboltsid/grpc","forks_url":"https://api.github.com/repos/thunderboltsid/grpc/forks","keys_url":"https://api.github.com/repos/thunderboltsid/grpc/keys{/key_id}","collaborators_url":"https://api.github.com/repos/thunderboltsid/grpc/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/thunderboltsid/grpc/teams","hooks_url":"https://api.github.com/repos/thunderboltsid/grpc/hooks","issue_events_url":"https://api.github.com/repos/thunderboltsid/grpc/issues/events{/number}","events_url":"https://api.github.com/repos/thunderboltsid/grpc/events","assignees_url":"https://api.github.com/repos/thunderboltsid/grpc/assignees{/user}","branches_url":"https://api.github.com/repos/thunderboltsid/grpc/branches{/branch}","tags_url":"https://api.github.com/repos/thunderboltsid/grpc/tags","blobs_url":"https://api.github.com/repos/thunderboltsid/grpc/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/thunderboltsid/grpc/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/thunderboltsid/grpc/git/refs{/sha}","trees_url":"https://api.github.com/repos/thunderboltsid/grpc/git/trees{/sha}","statuses_url":"https://api.github.com/repos/thunderboltsid/grpc/statuses/{sha}","languages_url":"https://api.github.com/repos/thunderboltsid/grpc/languages","stargazers_url":"https://api.github.com/repos/thunderboltsid/grpc/stargazers","contributors_url":"https://api.github.com/repos/thunderboltsid/grpc/contributors","subscribers_url":"https://api.github.com/repos/thunderboltsid/grpc/subscribers","subscription_url":"https://api.github.com/repos/thunderboltsid/grpc/subscription","commits_url":"https://api.github.com/repos/thunderboltsid/grpc/commits{/sha}","git_commits_url":"https://api.github.com/repos/thunderboltsid/grpc/git/commits{/sha}","comments_url":"https://api.github.com/repos/thunderboltsid/grpc/comments{/number}","issue_comment_url":"https://api.github.com/repos/thunderboltsid/grpc/issues/comments{/number}","contents_url":"https://api.github.com/repos/thunderboltsid/grpc/contents/{+path}","compare_url":"https://api.github.com/repos/thunderboltsid/grpc/compare/{base}...{head}","merges_url":"https://api.github.com/repos/thunderboltsid/grpc/merges","archive_url":"https://api.github.com/repos/thunderboltsid/grpc/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/thunderboltsid/grpc/downloads","issues_url":"https://api.github.com/repos/thunderboltsid/grpc/issues{/number}","pulls_url":"https://api.github.com/repos/thunderboltsid/grpc/pulls{/number}","milestones_url":"https://api.github.com/repos/thunderboltsid/grpc/milestones{/number}","notifications_url":"https://api.github.com/repos/thunderboltsid/grpc/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/thunderboltsid/grpc/labels{/name}","releases_url":"https://api.github.com/repos/thunderboltsid/grpc/releases{/id}","deployments_url":"https://api.github.com/repos/thunderboltsid/grpc/deployments","created_at":"2016-06-28T15:51:27Z","updated_at":"2016-06-28T15:51:37Z","pushed_at":"2016-08-03T18:09:08Z","git_url":"git://github.com/thunderboltsid/grpc.git","ssh_url":"git@github.com:thunderboltsid/grpc.git","clone_url":"https://github.com/thunderboltsid/grpc.git","svn_url":"https://github.com/thunderboltsid/grpc","homepage":"","size":78211,"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":"eedc335580c6691f5401674841be0362596e1d9c","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}","deployments_url":"https://api.github.com/repos/grpc/grpc/deployments","created_at":"2014-12-08T18:58:53Z","updated_at":"2016-08-03T17:47:22Z","pushed_at":"2016-08-03T18:09:08Z","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":201289,"stargazers_count":5718,"watchers_count":5718,"language":"C","has_issues":true,"has_downloads":false,"has_wiki":true,"has_pages":true,"forks_count":1057,"mirror_url":null,"open_issues_count":678,"forks":1057,"open_issues":678,"watchers":5718,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/grpc/grpc/pulls/7625"},"html":{"href":"https://github.com/grpc/grpc/pull/7625"},"issue":{"href":"https://api.github.com/repos/grpc/grpc/issues/7625"},"comments":{"href":"https://api.github.com/repos/grpc/grpc/issues/7625/comments"},"review_comments":{"href":"https://api.github.com/repos/grpc/grpc/pulls/7625/comments"},"review_comment":{"href":"https://api.github.com/repos/grpc/grpc/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/grpc/grpc/pulls/7625/commits"},"statuses":{"href":"https://api.github.com/repos/grpc/grpc/statuses/d0fde38a17879063de5e2616f7bf8bf3ae03737d"}}}}
{"actor":{"display_login":"thunderboltsid"}}