{"action":"created","comment":{"url":"https://api.github.com/repos/pika/pika/pulls/comments/55130130","id":55130130,"diff_hunk":"@@ -944,32 +1017,81 @@ def _on_cancelok(self, method_frame):\n     def _on_close(self, method_frame):\n         \"\"\"Handle the case where our channel has been closed for us\n \n-        :param pika.frame.Method method_frame: The close frame\n+        :param pika.frame.Method method_frame: Method frame with Channel.Close\n+            method\n \n         \"\"\"\n-        LOGGER.info('%s', method_frame)\n-        LOGGER.warning('Received remote Channel.Close (%s): %r on channel %s',\n+        LOGGER.warning('Received remote Channel.Close (%s): %r on %s',\n                        method_frame.method.reply_code,\n                        method_frame.method.reply_text,\n                        self)\n-        if self.connection.is_open:\n-            self._send_method(spec.Channel.CloseOk())\n-        self._set_state(self.CLOSED)\n-        self.callbacks.process(self.channel_number, '_on_channel_close', self,\n-                               self, method_frame.method.reply_code,\n-                               method_frame.method.reply_text)\n-        self._cleanup()\n+","path":"pika/channel.py","position":720,"original_position":720,"commit_id":"d4a2fde64eca46b274c30c1519dab9d10f8183c2","original_commit_id":"d4a2fde64eca46b274c30c1519dab9d10f8183c2","user":{"login":"vitaly-krugl","id":1441066,"avatar_url":"https://avatars.githubusercontent.com/u/1441066?v=3","gravatar_id":"","url":"https://api.github.com/users/vitaly-krugl","html_url":"https://github.com/vitaly-krugl","followers_url":"https://api.github.com/users/vitaly-krugl/followers","following_url":"https://api.github.com/users/vitaly-krugl/following{/other_user}","gists_url":"https://api.github.com/users/vitaly-krugl/gists{/gist_id}","starred_url":"https://api.github.com/users/vitaly-krugl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vitaly-krugl/subscriptions","organizations_url":"https://api.github.com/users/vitaly-krugl/orgs","repos_url":"https://api.github.com/users/vitaly-krugl/repos","events_url":"https://api.github.com/users/vitaly-krugl/events{/privacy}","received_events_url":"https://api.github.com/users/vitaly-krugl/received_events","type":"User","site_admin":false},"body":"REVIEWME `_on_close` changes below","created_at":"2016-03-05T23:51:47Z","updated_at":"2016-03-05T23:51:47Z","html_url":"https://github.com/pika/pika/pull/712#discussion_r55130130","pull_request_url":"https://api.github.com/repos/pika/pika/pulls/712","_links":{"self":{"href":"https://api.github.com/repos/pika/pika/pulls/comments/55130130"},"html":{"href":"https://github.com/pika/pika/pull/712#discussion_r55130130"},"pull_request":{"href":"https://api.github.com/repos/pika/pika/pulls/712"}}},"pull_request":{"url":"https://api.github.com/repos/pika/pika/pulls/712","id":61209699,"html_url":"https://github.com/pika/pika/pull/712","diff_url":"https://github.com/pika/pika/pull/712.diff","patch_url":"https://github.com/pika/pika/pull/712.patch","issue_url":"https://api.github.com/repos/pika/pika/issues/712","number":712,"state":"open","locked":false,"title":"Cleaned up Channel-related logic in Channel and Connection","user":{"login":"vitaly-krugl","id":1441066,"avatar_url":"https://avatars.githubusercontent.com/u/1441066?v=3","gravatar_id":"","url":"https://api.github.com/users/vitaly-krugl","html_url":"https://github.com/vitaly-krugl","followers_url":"https://api.github.com/users/vitaly-krugl/followers","following_url":"https://api.github.com/users/vitaly-krugl/following{/other_user}","gists_url":"https://api.github.com/users/vitaly-krugl/gists{/gist_id}","starred_url":"https://api.github.com/users/vitaly-krugl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vitaly-krugl/subscriptions","organizations_url":"https://api.github.com/users/vitaly-krugl/orgs","repos_url":"https://api.github.com/users/vitaly-krugl/repos","events_url":"https://api.github.com/users/vitaly-krugl/events{/privacy}","received_events_url":"https://api.github.com/users/vitaly-krugl/received_events","type":"User","site_admin":false},"body":"Don't merge yet, validating build on all platforms, may need to add a few tests before merging.\r\n\r\nCleaned up Channel-related logic in `Channel`and `Connection` classes. Fixed a number of bugs discovered through code review. See commit message for details.\r\n\r\nSorry about combining these changes with so much pylint cleanup; it was difficult to use pylint productively with so many pylint messages. I also created pylintrc at root level. This should be much easier going forward.\r\n\r\nTo make it easy to find changes that merit review, I labeled corresponding sections of changed code with REVIEWME in comments. Here is a high-level summary of changed files:\r\n\r\nChanges that merit review:\r\n* pika/channel.py: merits review\r\n* pika/connection.py: merits review\r\n* tests/unit/channel_tests.py: added test logic\r\n* tests/unit/connection_tests.py: added test logic\r\n* pika/compat.py: minor change\r\n* pika/exceptions.py: minor change\r\n\r\nMinor changes:\r\n* pika/adapters/blocking_connection.py: remove the deprecated type arg; everything else is pylint fixup\r\n* pika/adapters/base_connection.py: minor change, primarily in `__repr__`.\r\n* tests/unit/base_connection_tests.py: minor; added test for `__repr__`.\r\n* tests/unit/{content_frame_dispatcher_tests.py → content_frame_assembler_tests.py}\r\n* tests/unit/heartbeat_tests.py: minor fix\r\n*  tests/unit/tornado_tests.py: minor fix\r\n* docs/version_history.rst: minor change\r\n* pylintrc: new file; pylint defaults","created_at":"2016-03-01T08:44:57Z","updated_at":"2016-03-05T23:51:47Z","closed_at":null,"merged_at":null,"merge_commit_sha":"2db07c2a3d4cd23305b1ac98c25e4cead97eb9f3","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/pika/pika/pulls/712/commits","review_comments_url":"https://api.github.com/repos/pika/pika/pulls/712/comments","review_comment_url":"https://api.github.com/repos/pika/pika/pulls/comments{/number}","comments_url":"https://api.github.com/repos/pika/pika/issues/712/comments","statuses_url":"https://api.github.com/repos/pika/pika/statuses/d4a2fde64eca46b274c30c1519dab9d10f8183c2","head":{"label":"vitaly-krugl:channel-cleanup","ref":"channel-cleanup","sha":"d4a2fde64eca46b274c30c1519dab9d10f8183c2","user":{"login":"vitaly-krugl","id":1441066,"avatar_url":"https://avatars.githubusercontent.com/u/1441066?v=3","gravatar_id":"","url":"https://api.github.com/users/vitaly-krugl","html_url":"https://github.com/vitaly-krugl","followers_url":"https://api.github.com/users/vitaly-krugl/followers","following_url":"https://api.github.com/users/vitaly-krugl/following{/other_user}","gists_url":"https://api.github.com/users/vitaly-krugl/gists{/gist_id}","starred_url":"https://api.github.com/users/vitaly-krugl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vitaly-krugl/subscriptions","organizations_url":"https://api.github.com/users/vitaly-krugl/orgs","repos_url":"https://api.github.com/users/vitaly-krugl/repos","events_url":"https://api.github.com/users/vitaly-krugl/events{/privacy}","received_events_url":"https://api.github.com/users/vitaly-krugl/received_events","type":"User","site_admin":false},"repo":{"id":32773342,"name":"pika","full_name":"vitaly-krugl/pika","owner":{"login":"vitaly-krugl","id":1441066,"avatar_url":"https://avatars.githubusercontent.com/u/1441066?v=3","gravatar_id":"","url":"https://api.github.com/users/vitaly-krugl","html_url":"https://github.com/vitaly-krugl","followers_url":"https://api.github.com/users/vitaly-krugl/followers","following_url":"https://api.github.com/users/vitaly-krugl/following{/other_user}","gists_url":"https://api.github.com/users/vitaly-krugl/gists{/gist_id}","starred_url":"https://api.github.com/users/vitaly-krugl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vitaly-krugl/subscriptions","organizations_url":"https://api.github.com/users/vitaly-krugl/orgs","repos_url":"https://api.github.com/users/vitaly-krugl/repos","events_url":"https://api.github.com/users/vitaly-krugl/events{/privacy}","received_events_url":"https://api.github.com/users/vitaly-krugl/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/vitaly-krugl/pika","description":"Pure Python RabbitMQ/AMQP 0-9-1 client library","fork":true,"url":"https://api.github.com/repos/vitaly-krugl/pika","forks_url":"https://api.github.com/repos/vitaly-krugl/pika/forks","keys_url":"https://api.github.com/repos/vitaly-krugl/pika/keys{/key_id}","collaborators_url":"https://api.github.com/repos/vitaly-krugl/pika/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/vitaly-krugl/pika/teams","hooks_url":"https://api.github.com/repos/vitaly-krugl/pika/hooks","issue_events_url":"https://api.github.com/repos/vitaly-krugl/pika/issues/events{/number}","events_url":"https://api.github.com/repos/vitaly-krugl/pika/events","assignees_url":"https://api.github.com/repos/vitaly-krugl/pika/assignees{/user}","branches_url":"https://api.github.com/repos/vitaly-krugl/pika/branches{/branch}","tags_url":"https://api.github.com/repos/vitaly-krugl/pika/tags","blobs_url":"https://api.github.com/repos/vitaly-krugl/pika/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/vitaly-krugl/pika/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/vitaly-krugl/pika/git/refs{/sha}","trees_url":"https://api.github.com/repos/vitaly-krugl/pika/git/trees{/sha}","statuses_url":"https://api.github.com/repos/vitaly-krugl/pika/statuses/{sha}","languages_url":"https://api.github.com/repos/vitaly-krugl/pika/languages","stargazers_url":"https://api.github.com/repos/vitaly-krugl/pika/stargazers","contributors_url":"https://api.github.com/repos/vitaly-krugl/pika/contributors","subscribers_url":"https://api.github.com/repos/vitaly-krugl/pika/subscribers","subscription_url":"https://api.github.com/repos/vitaly-krugl/pika/subscription","commits_url":"https://api.github.com/repos/vitaly-krugl/pika/commits{/sha}","git_commits_url":"https://api.github.com/repos/vitaly-krugl/pika/git/commits{/sha}","comments_url":"https://api.github.com/repos/vitaly-krugl/pika/comments{/number}","issue_comment_url":"https://api.github.com/repos/vitaly-krugl/pika/issues/comments{/number}","contents_url":"https://api.github.com/repos/vitaly-krugl/pika/contents/{+path}","compare_url":"https://api.github.com/repos/vitaly-krugl/pika/compare/{base}...{head}","merges_url":"https://api.github.com/repos/vitaly-krugl/pika/merges","archive_url":"https://api.github.com/repos/vitaly-krugl/pika/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/vitaly-krugl/pika/downloads","issues_url":"https://api.github.com/repos/vitaly-krugl/pika/issues{/number}","pulls_url":"https://api.github.com/repos/vitaly-krugl/pika/pulls{/number}","milestones_url":"https://api.github.com/repos/vitaly-krugl/pika/milestones{/number}","notifications_url":"https://api.github.com/repos/vitaly-krugl/pika/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/vitaly-krugl/pika/labels{/name}","releases_url":"https://api.github.com/repos/vitaly-krugl/pika/releases{/id}","deployments_url":"https://api.github.com/repos/vitaly-krugl/pika/deployments","created_at":"2015-03-24T03:14:18Z","updated_at":"2016-01-19T19:45:51Z","pushed_at":"2016-03-05T22:53:32Z","git_url":"git://github.com/vitaly-krugl/pika.git","ssh_url":"git@github.com:vitaly-krugl/pika.git","clone_url":"https://github.com/vitaly-krugl/pika.git","svn_url":"https://github.com/vitaly-krugl/pika","homepage":"http://pika.readthedocs.org","size":6010,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":0,"forks":1,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"pika:master","ref":"master","sha":"9f62cbe032e9b4fa0fe1842587ce0702c3926a3d","user":{"login":"pika","id":660428,"avatar_url":"https://avatars.githubusercontent.com/u/660428?v=3","gravatar_id":"","url":"https://api.github.com/users/pika","html_url":"https://github.com/pika","followers_url":"https://api.github.com/users/pika/followers","following_url":"https://api.github.com/users/pika/following{/other_user}","gists_url":"https://api.github.com/users/pika/gists{/gist_id}","starred_url":"https://api.github.com/users/pika/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pika/subscriptions","organizations_url":"https://api.github.com/users/pika/orgs","repos_url":"https://api.github.com/users/pika/repos","events_url":"https://api.github.com/users/pika/events{/privacy}","received_events_url":"https://api.github.com/users/pika/received_events","type":"Organization","site_admin":false},"repo":{"id":342869,"name":"pika","full_name":"pika/pika","owner":{"login":"pika","id":660428,"avatar_url":"https://avatars.githubusercontent.com/u/660428?v=3","gravatar_id":"","url":"https://api.github.com/users/pika","html_url":"https://github.com/pika","followers_url":"https://api.github.com/users/pika/followers","following_url":"https://api.github.com/users/pika/following{/other_user}","gists_url":"https://api.github.com/users/pika/gists{/gist_id}","starred_url":"https://api.github.com/users/pika/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pika/subscriptions","organizations_url":"https://api.github.com/users/pika/orgs","repos_url":"https://api.github.com/users/pika/repos","events_url":"https://api.github.com/users/pika/events{/privacy}","received_events_url":"https://api.github.com/users/pika/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/pika/pika","description":"Pure Python RabbitMQ/AMQP 0-9-1 client library","fork":false,"url":"https://api.github.com/repos/pika/pika","forks_url":"https://api.github.com/repos/pika/pika/forks","keys_url":"https://api.github.com/repos/pika/pika/keys{/key_id}","collaborators_url":"https://api.github.com/repos/pika/pika/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/pika/pika/teams","hooks_url":"https://api.github.com/repos/pika/pika/hooks","issue_events_url":"https://api.github.com/repos/pika/pika/issues/events{/number}","events_url":"https://api.github.com/repos/pika/pika/events","assignees_url":"https://api.github.com/repos/pika/pika/assignees{/user}","branches_url":"https://api.github.com/repos/pika/pika/branches{/branch}","tags_url":"https://api.github.com/repos/pika/pika/tags","blobs_url":"https://api.github.com/repos/pika/pika/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/pika/pika/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/pika/pika/git/refs{/sha}","trees_url":"https://api.github.com/repos/pika/pika/git/trees{/sha}","statuses_url":"https://api.github.com/repos/pika/pika/statuses/{sha}","languages_url":"https://api.github.com/repos/pika/pika/languages","stargazers_url":"https://api.github.com/repos/pika/pika/stargazers","contributors_url":"https://api.github.com/repos/pika/pika/contributors","subscribers_url":"https://api.github.com/repos/pika/pika/subscribers","subscription_url":"https://api.github.com/repos/pika/pika/subscription","commits_url":"https://api.github.com/repos/pika/pika/commits{/sha}","git_commits_url":"https://api.github.com/repos/pika/pika/git/commits{/sha}","comments_url":"https://api.github.com/repos/pika/pika/comments{/number}","issue_comment_url":"https://api.github.com/repos/pika/pika/issues/comments{/number}","contents_url":"https://api.github.com/repos/pika/pika/contents/{+path}","compare_url":"https://api.github.com/repos/pika/pika/compare/{base}...{head}","merges_url":"https://api.github.com/repos/pika/pika/merges","archive_url":"https://api.github.com/repos/pika/pika/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/pika/pika/downloads","issues_url":"https://api.github.com/repos/pika/pika/issues{/number}","pulls_url":"https://api.github.com/repos/pika/pika/pulls{/number}","milestones_url":"https://api.github.com/repos/pika/pika/milestones{/number}","notifications_url":"https://api.github.com/repos/pika/pika/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/pika/pika/labels{/name}","releases_url":"https://api.github.com/repos/pika/pika/releases{/id}","deployments_url":"https://api.github.com/repos/pika/pika/deployments","created_at":"2009-10-19T23:22:02Z","updated_at":"2016-03-03T03:27:28Z","pushed_at":"2016-03-05T22:53:33Z","git_url":"git://github.com/pika/pika.git","ssh_url":"git@github.com:pika/pika.git","clone_url":"https://github.com/pika/pika.git","svn_url":"https://github.com/pika/pika","homepage":"http://pika.readthedocs.org","size":19143,"stargazers_count":942,"watchers_count":942,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":342,"mirror_url":null,"open_issues_count":23,"forks":342,"open_issues":23,"watchers":942,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/pika/pika/pulls/712"},"html":{"href":"https://github.com/pika/pika/pull/712"},"issue":{"href":"https://api.github.com/repos/pika/pika/issues/712"},"comments":{"href":"https://api.github.com/repos/pika/pika/issues/712/comments"},"review_comments":{"href":"https://api.github.com/repos/pika/pika/pulls/712/comments"},"review_comment":{"href":"https://api.github.com/repos/pika/pika/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/pika/pika/pulls/712/commits"},"statuses":{"href":"https://api.github.com/repos/pika/pika/statuses/d4a2fde64eca46b274c30c1519dab9d10f8183c2"}}}}