{"action":"opened","number":231,"pull_request":{"url":"https://api.github.com/repos/celery/py-amqp/pulls/231","id":241391660,"node_id":"MDExOlB1bGxSZXF1ZXN0MjQxMzkxNjYw","html_url":"https://github.com/celery/py-amqp/pull/231","diff_url":"https://github.com/celery/py-amqp/pull/231.diff","patch_url":"https://github.com/celery/py-amqp/pull/231.patch","issue_url":"https://api.github.com/repos/celery/py-amqp/issues/231","number":231,"state":"open","locked":false,"title":"Improved empty AMQPError string representation","user":{"login":"matusvalo","id":827060,"node_id":"MDQ6VXNlcjgyNzA2MA==","avatar_url":"https://avatars1.githubusercontent.com/u/827060?v=4","gravatar_id":"","url":"https://api.github.com/users/matusvalo","html_url":"https://github.com/matusvalo","followers_url":"https://api.github.com/users/matusvalo/followers","following_url":"https://api.github.com/users/matusvalo/following{/other_user}","gists_url":"https://api.github.com/users/matusvalo/gists{/gist_id}","starred_url":"https://api.github.com/users/matusvalo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/matusvalo/subscriptions","organizations_url":"https://api.github.com/users/matusvalo/orgs","repos_url":"https://api.github.com/users/matusvalo/repos","events_url":"https://api.github.com/users/matusvalo/events{/privacy}","received_events_url":"https://api.github.com/users/matusvalo/received_events","type":"User","site_admin":false},"body":"Currently, `AMQPError` and all its subclasses created without parameters has same string representation:\r\n```python\r\n>>> import amqp\r\n>>> raise amqp.AMQPError()\r\nTraceback (most recent call last):\r\n  File \"<stdin>\", line 1, in <module>\r\namqp.exceptions.AMQPError: <AMQPError: unknown error>\r\n>>> raise amqp.ChannelError()\r\nTraceback (most recent call last):\r\n  File \"<stdin>\", line 1, in <module>\r\namqp.exceptions.ChannelError: <AMQPError: unknown error>\r\n```\r\nThis can be confusing in logs for users - see comments # 28, # 19... in [1].\r\n\r\nThis PR proposes to generate current class of exception in each subclass of `AMQPError`:\r\n```python\r\n>>> import amqp\r\n>>> raise amqp.AMQPError()\r\nTraceback (most recent call last):\r\n  File \"<stdin>\", line 1, in <module>\r\namqp.exceptions.AMQPError: <AMQPError: unknown error>\r\n>>> raise amqp.ChannelError()\r\nTraceback (most recent call last):\r\n  File \"<stdin>\", line 1, in <module>\r\namqp.exceptions.ChannelError: <ChannelError: unknown error>\r\n```\r\n\r\n[1] https://bugs.launchpad.net/oslo.messaging/+bug/1800957","created_at":"2018-12-28T20:30:29Z","updated_at":"2018-12-28T20:30:29Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/celery/py-amqp/pulls/231/commits","review_comments_url":"https://api.github.com/repos/celery/py-amqp/pulls/231/comments","review_comment_url":"https://api.github.com/repos/celery/py-amqp/pulls/comments{/number}","comments_url":"https://api.github.com/repos/celery/py-amqp/issues/231/comments","statuses_url":"https://api.github.com/repos/celery/py-amqp/statuses/fbc14ce0102a971bf4426ee8d285ac3d18f384e7","head":{"label":"matusvalo:amqp_exception_str","ref":"amqp_exception_str","sha":"fbc14ce0102a971bf4426ee8d285ac3d18f384e7","user":{"login":"matusvalo","id":827060,"node_id":"MDQ6VXNlcjgyNzA2MA==","avatar_url":"https://avatars1.githubusercontent.com/u/827060?v=4","gravatar_id":"","url":"https://api.github.com/users/matusvalo","html_url":"https://github.com/matusvalo","followers_url":"https://api.github.com/users/matusvalo/followers","following_url":"https://api.github.com/users/matusvalo/following{/other_user}","gists_url":"https://api.github.com/users/matusvalo/gists{/gist_id}","starred_url":"https://api.github.com/users/matusvalo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/matusvalo/subscriptions","organizations_url":"https://api.github.com/users/matusvalo/orgs","repos_url":"https://api.github.com/users/matusvalo/repos","events_url":"https://api.github.com/users/matusvalo/events{/privacy}","received_events_url":"https://api.github.com/users/matusvalo/received_events","type":"User","site_admin":false},"repo":{"id":151387497,"node_id":"MDEwOlJlcG9zaXRvcnkxNTEzODc0OTc=","name":"py-amqp","full_name":"matusvalo/py-amqp","private":false,"owner":{"login":"matusvalo","id":827060,"node_id":"MDQ6VXNlcjgyNzA2MA==","avatar_url":"https://avatars1.githubusercontent.com/u/827060?v=4","gravatar_id":"","url":"https://api.github.com/users/matusvalo","html_url":"https://github.com/matusvalo","followers_url":"https://api.github.com/users/matusvalo/followers","following_url":"https://api.github.com/users/matusvalo/following{/other_user}","gists_url":"https://api.github.com/users/matusvalo/gists{/gist_id}","starred_url":"https://api.github.com/users/matusvalo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/matusvalo/subscriptions","organizations_url":"https://api.github.com/users/matusvalo/orgs","repos_url":"https://api.github.com/users/matusvalo/repos","events_url":"https://api.github.com/users/matusvalo/events{/privacy}","received_events_url":"https://api.github.com/users/matusvalo/received_events","type":"User","site_admin":false},"html_url":"https://github.com/matusvalo/py-amqp","description":"amqplib fork","fork":true,"url":"https://api.github.com/repos/matusvalo/py-amqp","forks_url":"https://api.github.com/repos/matusvalo/py-amqp/forks","keys_url":"https://api.github.com/repos/matusvalo/py-amqp/keys{/key_id}","collaborators_url":"https://api.github.com/repos/matusvalo/py-amqp/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/matusvalo/py-amqp/teams","hooks_url":"https://api.github.com/repos/matusvalo/py-amqp/hooks","issue_events_url":"https://api.github.com/repos/matusvalo/py-amqp/issues/events{/number}","events_url":"https://api.github.com/repos/matusvalo/py-amqp/events","assignees_url":"https://api.github.com/repos/matusvalo/py-amqp/assignees{/user}","branches_url":"https://api.github.com/repos/matusvalo/py-amqp/branches{/branch}","tags_url":"https://api.github.com/repos/matusvalo/py-amqp/tags","blobs_url":"https://api.github.com/repos/matusvalo/py-amqp/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/matusvalo/py-amqp/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/matusvalo/py-amqp/git/refs{/sha}","trees_url":"https://api.github.com/repos/matusvalo/py-amqp/git/trees{/sha}","statuses_url":"https://api.github.com/repos/matusvalo/py-amqp/statuses/{sha}","languages_url":"https://api.github.com/repos/matusvalo/py-amqp/languages","stargazers_url":"https://api.github.com/repos/matusvalo/py-amqp/stargazers","contributors_url":"https://api.github.com/repos/matusvalo/py-amqp/contributors","subscribers_url":"https://api.github.com/repos/matusvalo/py-amqp/subscribers","subscription_url":"https://api.github.com/repos/matusvalo/py-amqp/subscription","commits_url":"https://api.github.com/repos/matusvalo/py-amqp/commits{/sha}","git_commits_url":"https://api.github.com/repos/matusvalo/py-amqp/git/commits{/sha}","comments_url":"https://api.github.com/repos/matusvalo/py-amqp/comments{/number}","issue_comment_url":"https://api.github.com/repos/matusvalo/py-amqp/issues/comments{/number}","contents_url":"https://api.github.com/repos/matusvalo/py-amqp/contents/{+path}","compare_url":"https://api.github.com/repos/matusvalo/py-amqp/compare/{base}...{head}","merges_url":"https://api.github.com/repos/matusvalo/py-amqp/merges","archive_url":"https://api.github.com/repos/matusvalo/py-amqp/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/matusvalo/py-amqp/downloads","issues_url":"https://api.github.com/repos/matusvalo/py-amqp/issues{/number}","pulls_url":"https://api.github.com/repos/matusvalo/py-amqp/pulls{/number}","milestones_url":"https://api.github.com/repos/matusvalo/py-amqp/milestones{/number}","notifications_url":"https://api.github.com/repos/matusvalo/py-amqp/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/matusvalo/py-amqp/labels{/name}","releases_url":"https://api.github.com/repos/matusvalo/py-amqp/releases{/id}","deployments_url":"https://api.github.com/repos/matusvalo/py-amqp/deployments","created_at":"2018-10-03T09:12:58Z","updated_at":"2018-12-16T20:23:16Z","pushed_at":"2018-12-28T20:21:19Z","git_url":"git://github.com/matusvalo/py-amqp.git","ssh_url":"git@github.com:matusvalo/py-amqp.git","clone_url":"https://github.com/matusvalo/py-amqp.git","svn_url":"https://github.com/matusvalo/py-amqp","homepage":null,"size":1858,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"other","name":"Other","spdx_id":"NOASSERTION","url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"celery:master","ref":"master","sha":"f16df2a17630c9804a6da614443c5e862271823f","user":{"login":"celery","id":319983,"node_id":"MDEyOk9yZ2FuaXphdGlvbjMxOTk4Mw==","avatar_url":"https://avatars2.githubusercontent.com/u/319983?v=4","gravatar_id":"","url":"https://api.github.com/users/celery","html_url":"https://github.com/celery","followers_url":"https://api.github.com/users/celery/followers","following_url":"https://api.github.com/users/celery/following{/other_user}","gists_url":"https://api.github.com/users/celery/gists{/gist_id}","starred_url":"https://api.github.com/users/celery/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/celery/subscriptions","organizations_url":"https://api.github.com/users/celery/orgs","repos_url":"https://api.github.com/users/celery/repos","events_url":"https://api.github.com/users/celery/events{/privacy}","received_events_url":"https://api.github.com/users/celery/received_events","type":"Organization","site_admin":false},"repo":{"id":5152372,"node_id":"MDEwOlJlcG9zaXRvcnk1MTUyMzcy","name":"py-amqp","full_name":"celery/py-amqp","private":false,"owner":{"login":"celery","id":319983,"node_id":"MDEyOk9yZ2FuaXphdGlvbjMxOTk4Mw==","avatar_url":"https://avatars2.githubusercontent.com/u/319983?v=4","gravatar_id":"","url":"https://api.github.com/users/celery","html_url":"https://github.com/celery","followers_url":"https://api.github.com/users/celery/followers","following_url":"https://api.github.com/users/celery/following{/other_user}","gists_url":"https://api.github.com/users/celery/gists{/gist_id}","starred_url":"https://api.github.com/users/celery/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/celery/subscriptions","organizations_url":"https://api.github.com/users/celery/orgs","repos_url":"https://api.github.com/users/celery/repos","events_url":"https://api.github.com/users/celery/events{/privacy}","received_events_url":"https://api.github.com/users/celery/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/celery/py-amqp","description":"amqplib fork","fork":false,"url":"https://api.github.com/repos/celery/py-amqp","forks_url":"https://api.github.com/repos/celery/py-amqp/forks","keys_url":"https://api.github.com/repos/celery/py-amqp/keys{/key_id}","collaborators_url":"https://api.github.com/repos/celery/py-amqp/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/celery/py-amqp/teams","hooks_url":"https://api.github.com/repos/celery/py-amqp/hooks","issue_events_url":"https://api.github.com/repos/celery/py-amqp/issues/events{/number}","events_url":"https://api.github.com/repos/celery/py-amqp/events","assignees_url":"https://api.github.com/repos/celery/py-amqp/assignees{/user}","branches_url":"https://api.github.com/repos/celery/py-amqp/branches{/branch}","tags_url":"https://api.github.com/repos/celery/py-amqp/tags","blobs_url":"https://api.github.com/repos/celery/py-amqp/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/celery/py-amqp/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/celery/py-amqp/git/refs{/sha}","trees_url":"https://api.github.com/repos/celery/py-amqp/git/trees{/sha}","statuses_url":"https://api.github.com/repos/celery/py-amqp/statuses/{sha}","languages_url":"https://api.github.com/repos/celery/py-amqp/languages","stargazers_url":"https://api.github.com/repos/celery/py-amqp/stargazers","contributors_url":"https://api.github.com/repos/celery/py-amqp/contributors","subscribers_url":"https://api.github.com/repos/celery/py-amqp/subscribers","subscription_url":"https://api.github.com/repos/celery/py-amqp/subscription","commits_url":"https://api.github.com/repos/celery/py-amqp/commits{/sha}","git_commits_url":"https://api.github.com/repos/celery/py-amqp/git/commits{/sha}","comments_url":"https://api.github.com/repos/celery/py-amqp/comments{/number}","issue_comment_url":"https://api.github.com/repos/celery/py-amqp/issues/comments{/number}","contents_url":"https://api.github.com/repos/celery/py-amqp/contents/{+path}","compare_url":"https://api.github.com/repos/celery/py-amqp/compare/{base}...{head}","merges_url":"https://api.github.com/repos/celery/py-amqp/merges","archive_url":"https://api.github.com/repos/celery/py-amqp/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/celery/py-amqp/downloads","issues_url":"https://api.github.com/repos/celery/py-amqp/issues{/number}","pulls_url":"https://api.github.com/repos/celery/py-amqp/pulls{/number}","milestones_url":"https://api.github.com/repos/celery/py-amqp/milestones{/number}","notifications_url":"https://api.github.com/repos/celery/py-amqp/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/celery/py-amqp/labels{/name}","releases_url":"https://api.github.com/repos/celery/py-amqp/releases{/id}","deployments_url":"https://api.github.com/repos/celery/py-amqp/deployments","created_at":"2012-07-23T13:50:57Z","updated_at":"2018-12-23T02:57:30Z","pushed_at":"2018-12-28T18:48:28Z","git_url":"git://github.com/celery/py-amqp.git","ssh_url":"git@github.com:celery/py-amqp.git","clone_url":"https://github.com/celery/py-amqp.git","svn_url":"https://github.com/celery/py-amqp","homepage":null,"size":1847,"stargazers_count":179,"watchers_count":179,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":139,"mirror_url":null,"archived":false,"open_issues_count":17,"license":{"key":"other","name":"Other","spdx_id":"NOASSERTION","url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":139,"open_issues":17,"watchers":179,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/celery/py-amqp/pulls/231"},"html":{"href":"https://github.com/celery/py-amqp/pull/231"},"issue":{"href":"https://api.github.com/repos/celery/py-amqp/issues/231"},"comments":{"href":"https://api.github.com/repos/celery/py-amqp/issues/231/comments"},"review_comments":{"href":"https://api.github.com/repos/celery/py-amqp/pulls/231/comments"},"review_comment":{"href":"https://api.github.com/repos/celery/py-amqp/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/celery/py-amqp/pulls/231/commits"},"statuses":{"href":"https://api.github.com/repos/celery/py-amqp/statuses/fbc14ce0102a971bf4426ee8d285ac3d18f384e7"}},"author_association":"CONTRIBUTOR","merged":false,"mergeable":null,"rebaseable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"maintainer_can_modify":true,"commits":1,"additions":26,"deletions":3,"changed_files":2}}
{"actor":{"display_login":"matusvalo"}}