{"action":"created","comment":{"url":"https://api.github.com/repos/bitly/pynsq/pulls/comments/35678028","id":35678028,"diff_hunk":"@@ -692,13 +710,36 @@ def giving_up(self, message):\n         \"\"\"\n         logger.warning('[%s] giving up on message %s after %d tries (max:%d) %r',\n                        self.name, message.id, message.attempts, self.max_tries, message.body)\n-\n-    def disabled(self):\n+                       \n+        \n+    def _on_connection_identify_response(self, conn, data, **kwargs):\n+        if not hasattr(self, '_disabled_notice'):\n+            self._disabled_notice = True\n+\n+            def semver(v):\n+                def cast(x):\n+                    try:\n+                        return int(x)\n+                    except:\n+                        return x\n+                return map(cast, v.replace('-','.').split('.'))\n+\n+            if self.disabled.__code__ != Reader.disabled.__code__ and semver(data['version']) >= semver('0.3'):\n+                logging.warning('disabled() incompatible with nsqd >= 0.3. Use change_max_in_flight(0)')\n+                warnings.warn('disabled() is a deprecated and will be removed in a future. ' + ","path":"nsq/reader.py","position":92,"original_position":92,"commit_id":"8ba964635053a5c7c8f436e64d27e61527031308","original_commit_id":"8ba964635053a5c7c8f436e64d27e61527031308","user":{"login":"mreiferson","id":187441,"avatar_url":"https://avatars.githubusercontent.com/u/187441?v=3","gravatar_id":"","url":"https://api.github.com/users/mreiferson","html_url":"https://github.com/mreiferson","followers_url":"https://api.github.com/users/mreiferson/followers","following_url":"https://api.github.com/users/mreiferson/following{/other_user}","gists_url":"https://api.github.com/users/mreiferson/gists{/gist_id}","starred_url":"https://api.github.com/users/mreiferson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mreiferson/subscriptions","organizations_url":"https://api.github.com/users/mreiferson/orgs","repos_url":"https://api.github.com/users/mreiferson/repos","events_url":"https://api.github.com/users/mreiferson/events{/privacy}","received_events_url":"https://api.github.com/users/mreiferson/received_events","type":"User","site_admin":false},"body":"> disabled() is deprecated and will be removed in a future release, use set_max_in_flight(0) instead","created_at":"2015-07-28T17:53:28Z","updated_at":"2015-07-28T17:53:28Z","html_url":"https://github.com/bitly/pynsq/pull/117#discussion_r35678028","pull_request_url":"https://api.github.com/repos/bitly/pynsq/pulls/117","_links":{"self":{"href":"https://api.github.com/repos/bitly/pynsq/pulls/comments/35678028"},"html":{"href":"https://github.com/bitly/pynsq/pull/117#discussion_r35678028"},"pull_request":{"href":"https://api.github.com/repos/bitly/pynsq/pulls/117"}}},"pull_request":{"url":"https://api.github.com/repos/bitly/pynsq/pulls/117","id":35185376,"html_url":"https://github.com/bitly/pynsq/pull/117","diff_url":"https://github.com/bitly/pynsq/pull/117.diff","patch_url":"https://github.com/bitly/pynsq/pull/117.patch","issue_url":"https://api.github.com/repos/bitly/pynsq/issues/117","number":117,"state":"open","locked":false,"title":"nsq.Reader.disabled() no longer effective","user":{"login":"jehiah","id":45028,"avatar_url":"https://avatars.githubusercontent.com/u/45028?v=3","gravatar_id":"","url":"https://api.github.com/users/jehiah","html_url":"https://github.com/jehiah","followers_url":"https://api.github.com/users/jehiah/followers","following_url":"https://api.github.com/users/jehiah/following{/other_user}","gists_url":"https://api.github.com/users/jehiah/gists{/gist_id}","starred_url":"https://api.github.com/users/jehiah/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jehiah/subscriptions","organizations_url":"https://api.github.com/users/jehiah/orgs","repos_url":"https://api.github.com/users/jehiah/repos","events_url":"https://api.github.com/users/jehiah/events{/privacy}","received_events_url":"https://api.github.com/users/jehiah/received_events","type":"User","site_admin":false},"body":"Due to the \"don't decrement rdy\" change to nsqd behavior (https://github.com/bitly/nsq/pull/404), the current effect of `disabled()` returning `True` in `nsq.Reader`, of not sending any ready count (never calling `_send_rdy()`), fails to reduce the ready count to zero on the nsqd side.","created_at":"2015-05-12T01:15:32Z","updated_at":"2015-07-28T17:53:28Z","closed_at":null,"merged_at":null,"merge_commit_sha":"9f9424819c56faf35ad0422cf3f77430132a5e8e","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/bitly/pynsq/pulls/117/commits","review_comments_url":"https://api.github.com/repos/bitly/pynsq/pulls/117/comments","review_comment_url":"https://api.github.com/repos/bitly/pynsq/pulls/comments{/number}","comments_url":"https://api.github.com/repos/bitly/pynsq/issues/117/comments","statuses_url":"https://api.github.com/repos/bitly/pynsq/statuses/8ba964635053a5c7c8f436e64d27e61527031308","head":{"label":"jehiah:nsq_reader_117","ref":"nsq_reader_117","sha":"8ba964635053a5c7c8f436e64d27e61527031308","user":{"login":"jehiah","id":45028,"avatar_url":"https://avatars.githubusercontent.com/u/45028?v=3","gravatar_id":"","url":"https://api.github.com/users/jehiah","html_url":"https://github.com/jehiah","followers_url":"https://api.github.com/users/jehiah/followers","following_url":"https://api.github.com/users/jehiah/following{/other_user}","gists_url":"https://api.github.com/users/jehiah/gists{/gist_id}","starred_url":"https://api.github.com/users/jehiah/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jehiah/subscriptions","organizations_url":"https://api.github.com/users/jehiah/orgs","repos_url":"https://api.github.com/users/jehiah/repos","events_url":"https://api.github.com/users/jehiah/events{/privacy}","received_events_url":"https://api.github.com/users/jehiah/received_events","type":"User","site_admin":false},"repo":{"id":6843732,"name":"pynsq","full_name":"jehiah/pynsq","owner":{"login":"jehiah","id":45028,"avatar_url":"https://avatars.githubusercontent.com/u/45028?v=3","gravatar_id":"","url":"https://api.github.com/users/jehiah","html_url":"https://github.com/jehiah","followers_url":"https://api.github.com/users/jehiah/followers","following_url":"https://api.github.com/users/jehiah/following{/other_user}","gists_url":"https://api.github.com/users/jehiah/gists{/gist_id}","starred_url":"https://api.github.com/users/jehiah/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jehiah/subscriptions","organizations_url":"https://api.github.com/users/jehiah/orgs","repos_url":"https://api.github.com/users/jehiah/repos","events_url":"https://api.github.com/users/jehiah/events{/privacy}","received_events_url":"https://api.github.com/users/jehiah/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jehiah/pynsq","description":"official Python client library for NSQ","fork":true,"url":"https://api.github.com/repos/jehiah/pynsq","forks_url":"https://api.github.com/repos/jehiah/pynsq/forks","keys_url":"https://api.github.com/repos/jehiah/pynsq/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jehiah/pynsq/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jehiah/pynsq/teams","hooks_url":"https://api.github.com/repos/jehiah/pynsq/hooks","issue_events_url":"https://api.github.com/repos/jehiah/pynsq/issues/events{/number}","events_url":"https://api.github.com/repos/jehiah/pynsq/events","assignees_url":"https://api.github.com/repos/jehiah/pynsq/assignees{/user}","branches_url":"https://api.github.com/repos/jehiah/pynsq/branches{/branch}","tags_url":"https://api.github.com/repos/jehiah/pynsq/tags","blobs_url":"https://api.github.com/repos/jehiah/pynsq/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jehiah/pynsq/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jehiah/pynsq/git/refs{/sha}","trees_url":"https://api.github.com/repos/jehiah/pynsq/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jehiah/pynsq/statuses/{sha}","languages_url":"https://api.github.com/repos/jehiah/pynsq/languages","stargazers_url":"https://api.github.com/repos/jehiah/pynsq/stargazers","contributors_url":"https://api.github.com/repos/jehiah/pynsq/contributors","subscribers_url":"https://api.github.com/repos/jehiah/pynsq/subscribers","subscription_url":"https://api.github.com/repos/jehiah/pynsq/subscription","commits_url":"https://api.github.com/repos/jehiah/pynsq/commits{/sha}","git_commits_url":"https://api.github.com/repos/jehiah/pynsq/git/commits{/sha}","comments_url":"https://api.github.com/repos/jehiah/pynsq/comments{/number}","issue_comment_url":"https://api.github.com/repos/jehiah/pynsq/issues/comments{/number}","contents_url":"https://api.github.com/repos/jehiah/pynsq/contents/{+path}","compare_url":"https://api.github.com/repos/jehiah/pynsq/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jehiah/pynsq/merges","archive_url":"https://api.github.com/repos/jehiah/pynsq/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jehiah/pynsq/downloads","issues_url":"https://api.github.com/repos/jehiah/pynsq/issues{/number}","pulls_url":"https://api.github.com/repos/jehiah/pynsq/pulls{/number}","milestones_url":"https://api.github.com/repos/jehiah/pynsq/milestones{/number}","notifications_url":"https://api.github.com/repos/jehiah/pynsq/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jehiah/pynsq/labels{/name}","releases_url":"https://api.github.com/repos/jehiah/pynsq/releases{/id}","created_at":"2012-11-24T19:55:46Z","updated_at":"2015-06-11T20:58:02Z","pushed_at":"2015-07-27T16:13:51Z","git_url":"git://github.com/jehiah/pynsq.git","ssh_url":"git@github.com:jehiah/pynsq.git","clone_url":"https://github.com/jehiah/pynsq.git","svn_url":"https://github.com/jehiah/pynsq","homepage":null,"size":583,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":false,"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":"bitly:master","ref":"master","sha":"899b60a8ce77ed6c8ab899fbdfd7adbc1b450c96","user":{"login":"bitly","id":251133,"avatar_url":"https://avatars.githubusercontent.com/u/251133?v=3","gravatar_id":"","url":"https://api.github.com/users/bitly","html_url":"https://github.com/bitly","followers_url":"https://api.github.com/users/bitly/followers","following_url":"https://api.github.com/users/bitly/following{/other_user}","gists_url":"https://api.github.com/users/bitly/gists{/gist_id}","starred_url":"https://api.github.com/users/bitly/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bitly/subscriptions","organizations_url":"https://api.github.com/users/bitly/orgs","repos_url":"https://api.github.com/users/bitly/repos","events_url":"https://api.github.com/users/bitly/events{/privacy}","received_events_url":"https://api.github.com/users/bitly/received_events","type":"Organization","site_admin":false},"repo":{"id":6475842,"name":"pynsq","full_name":"bitly/pynsq","owner":{"login":"bitly","id":251133,"avatar_url":"https://avatars.githubusercontent.com/u/251133?v=3","gravatar_id":"","url":"https://api.github.com/users/bitly","html_url":"https://github.com/bitly","followers_url":"https://api.github.com/users/bitly/followers","following_url":"https://api.github.com/users/bitly/following{/other_user}","gists_url":"https://api.github.com/users/bitly/gists{/gist_id}","starred_url":"https://api.github.com/users/bitly/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bitly/subscriptions","organizations_url":"https://api.github.com/users/bitly/orgs","repos_url":"https://api.github.com/users/bitly/repos","events_url":"https://api.github.com/users/bitly/events{/privacy}","received_events_url":"https://api.github.com/users/bitly/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/bitly/pynsq","description":"official Python client library for NSQ","fork":false,"url":"https://api.github.com/repos/bitly/pynsq","forks_url":"https://api.github.com/repos/bitly/pynsq/forks","keys_url":"https://api.github.com/repos/bitly/pynsq/keys{/key_id}","collaborators_url":"https://api.github.com/repos/bitly/pynsq/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/bitly/pynsq/teams","hooks_url":"https://api.github.com/repos/bitly/pynsq/hooks","issue_events_url":"https://api.github.com/repos/bitly/pynsq/issues/events{/number}","events_url":"https://api.github.com/repos/bitly/pynsq/events","assignees_url":"https://api.github.com/repos/bitly/pynsq/assignees{/user}","branches_url":"https://api.github.com/repos/bitly/pynsq/branches{/branch}","tags_url":"https://api.github.com/repos/bitly/pynsq/tags","blobs_url":"https://api.github.com/repos/bitly/pynsq/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/bitly/pynsq/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/bitly/pynsq/git/refs{/sha}","trees_url":"https://api.github.com/repos/bitly/pynsq/git/trees{/sha}","statuses_url":"https://api.github.com/repos/bitly/pynsq/statuses/{sha}","languages_url":"https://api.github.com/repos/bitly/pynsq/languages","stargazers_url":"https://api.github.com/repos/bitly/pynsq/stargazers","contributors_url":"https://api.github.com/repos/bitly/pynsq/contributors","subscribers_url":"https://api.github.com/repos/bitly/pynsq/subscribers","subscription_url":"https://api.github.com/repos/bitly/pynsq/subscription","commits_url":"https://api.github.com/repos/bitly/pynsq/commits{/sha}","git_commits_url":"https://api.github.com/repos/bitly/pynsq/git/commits{/sha}","comments_url":"https://api.github.com/repos/bitly/pynsq/comments{/number}","issue_comment_url":"https://api.github.com/repos/bitly/pynsq/issues/comments{/number}","contents_url":"https://api.github.com/repos/bitly/pynsq/contents/{+path}","compare_url":"https://api.github.com/repos/bitly/pynsq/compare/{base}...{head}","merges_url":"https://api.github.com/repos/bitly/pynsq/merges","archive_url":"https://api.github.com/repos/bitly/pynsq/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/bitly/pynsq/downloads","issues_url":"https://api.github.com/repos/bitly/pynsq/issues{/number}","pulls_url":"https://api.github.com/repos/bitly/pynsq/pulls{/number}","milestones_url":"https://api.github.com/repos/bitly/pynsq/milestones{/number}","notifications_url":"https://api.github.com/repos/bitly/pynsq/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/bitly/pynsq/labels{/name}","releases_url":"https://api.github.com/repos/bitly/pynsq/releases{/id}","created_at":"2012-10-31T15:09:40Z","updated_at":"2015-07-20T09:58:15Z","pushed_at":"2015-07-27T16:13:52Z","git_url":"git://github.com/bitly/pynsq.git","ssh_url":"git@github.com:bitly/pynsq.git","clone_url":"https://github.com/bitly/pynsq.git","svn_url":"https://github.com/bitly/pynsq","homepage":null,"size":1202,"stargazers_count":138,"watchers_count":138,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":56,"mirror_url":null,"open_issues_count":6,"forks":56,"open_issues":6,"watchers":138,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/bitly/pynsq/pulls/117"},"html":{"href":"https://github.com/bitly/pynsq/pull/117"},"issue":{"href":"https://api.github.com/repos/bitly/pynsq/issues/117"},"comments":{"href":"https://api.github.com/repos/bitly/pynsq/issues/117/comments"},"review_comments":{"href":"https://api.github.com/repos/bitly/pynsq/pulls/117/comments"},"review_comment":{"href":"https://api.github.com/repos/bitly/pynsq/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/bitly/pynsq/pulls/117/commits"},"statuses":{"href":"https://api.github.com/repos/bitly/pynsq/statuses/8ba964635053a5c7c8f436e64d27e61527031308"}}}}