GitHub PullRequestReviewCommentEvent at 2014-09-26 12:07:07
Repository: OpenBazaar
Actor: Renelvon
Payload: {"action":"created","comment":{"url":"https://api.github.com/repos/OpenBazaar/OpenBazaar/pulls/comments/18085444","id":18085444,"diff_hunk":"@@ -49,18 +43,17 @@ def __init__(self, market_id, my_ip, my_port, my_guid, nickname=None):\n         self.market_id = market_id\n         self.nickname = nickname\n         self.handler = None\n-\n-        try:\n-            socket.inet_pton(socket.AF_INET6, my_ip)\n-            my_uri = 'tcp://[%s]:%s' % (self.ip, self.port)\n-        except (socket.error, ValueError):\n-            my_uri = 'tcp://%s:%s' % (self.ip, self.port)\n-        self.uri = my_uri\n+        self.uri = network_util.get_peer_url(self.ip, self.port)","path":"node/transport.py","position":43,"original_position":43,"commit_id":"9541f200094d2bca49de11c25aad380ed9187368","original_commit_id":"9541f200094d2bca49de11c25aad380ed9187368","user":{"login":"Renelvon","id":860034,"avatar_url":"https://avatars.githubusercontent.com/u/860034?v=2","gravatar_id":"","url":"https://api.github.com/users/Renelvon","html_url":"https://github.com/Renelvon","followers_url":"https://api.github.com/users/Renelvon/followers","following_url":"https://api.github.com/users/Renelvon/following{/other_user}","gists_url":"https://api.github.com/users/Renelvon/gists{/gist_id}","starred_url":"https://api.github.com/users/Renelvon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Renelvon/subscriptions","organizations_url":"https://api.github.com/users/Renelvon/orgs","repos_url":"https://api.github.com/users/Renelvon/repos","events_url":"https://api.github.com/users/Renelvon/events{/privacy}","received_events_url":"https://api.github.com/users/Renelvon/received_events","type":"User","site_admin":false},"body":"Bravo!","created_at":"2014-09-26T12:07:07Z","updated_at":"2014-09-26T12:07:07Z","html_url":"https://github.com/OpenBazaar/OpenBazaar/pull/678#discussion_r18085444","pull_request_url":"https://api.github.com/repos/OpenBazaar/OpenBazaar/pulls/678","_links":{"self":{"href":"https://api.github.com/repos/OpenBazaar/OpenBazaar/pulls/comments/18085444"},"html":{"href":"https://github.com/OpenBazaar/OpenBazaar/pull/678#discussion_r18085444"},"pull_request":{"href":"https://api.github.com/repos/OpenBazaar/OpenBazaar/pulls/678"}}},"pull_request":{"url":"https://api.github.com/repos/OpenBazaar/OpenBazaar/pulls/678","id":21779667,"html_url":"https://github.com/OpenBazaar/OpenBazaar/pull/678","diff_url":"https://github.com/OpenBazaar/OpenBazaar/pull/678.diff","patch_url":"https://github.com/OpenBazaar/OpenBazaar/pull/678.patch","issue_url":"https://api.github.com/repos/OpenBazaar/OpenBazaar/issues/678","number":678,"state":"open","locked":false,"title":"Listener refactor","user":{"login":"yagoulas","id":7785499,"avatar_url":"https://avatars.githubusercontent.com/u/7785499?v=2","gravatar_id":"","url":"https://api.github.com/users/yagoulas","html_url":"https://github.com/yagoulas","followers_url":"https://api.github.com/users/yagoulas/followers","following_url":"https://api.github.com/users/yagoulas/following{/other_user}","gists_url":"https://api.github.com/users/yagoulas/gists{/gist_id}","starred_url":"https://api.github.com/users/yagoulas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yagoulas/subscriptions","organizations_url":"https://api.github.com/users/yagoulas/orgs","repos_url":"https://api.github.com/users/yagoulas/repos","events_url":"https://api.github.com/users/yagoulas/events{/privacy}","received_events_url":"https://api.github.com/users/yagoulas/received_events","type":"User","site_admin":false},"body":"### Motivation:\r\nIt turns out everyone uses `TransportLayer` as a dump for every method or attribute whose proper place is undetermined. As a result, this class is bloated with all sorts of code: managing sockets, listening for requests and handling various pieces of crypto code.\r\n\r\nThis is the first of a series of attempts to reduce the bloat of `TransportLayer` and factor the code into several smaller and simpler classes, more amenable to testing and maintenance.\r\n\r\nThe new `Listener` classes mirror the pattern of `PeerSender` and `CryptoPeerSender` but are designed cleanly and follow good practices such as defining all members in constructors. They are also completely independent from `dht.py` and `transport.py`, whereas `Sender` classes still have this problem and should be refactored in the future.\r\n\r\n### Changelog:\r\n* Factor classes `PeerListener` and `CryptoPeerListener` out of `TransportLayer` and `CryptoTransportLayer`, respectively.\r\n* As the `Sender` classes get a `dict` that is then encrypted, compressed and sent, the listener classes do the inverse actions and receive, decompress and decrypt the messages, relaying the sent `dict`s to the receiver.","created_at":"2014-09-25T12:40:15Z","updated_at":"2014-09-26T12:07:07Z","closed_at":null,"merged_at":null,"merge_commit_sha":"14a4031dc16cf433fd2c8d5ed004d05515c8d87a","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/OpenBazaar/OpenBazaar/pulls/678/commits","review_comments_url":"https://api.github.com/repos/OpenBazaar/OpenBazaar/pulls/678/comments","review_comment_url":"https://api.github.com/repos/OpenBazaar/OpenBazaar/pulls/comments/{number}","comments_url":"https://api.github.com/repos/OpenBazaar/OpenBazaar/issues/678/comments","statuses_url":"https://api.github.com/repos/OpenBazaar/OpenBazaar/statuses/9541f200094d2bca49de11c25aad380ed9187368","head":{"label":"yagoulas:listener-refactor","ref":"listener-refactor","sha":"9541f200094d2bca49de11c25aad380ed9187368","user":{"login":"yagoulas","id":7785499,"avatar_url":"https://avatars.githubusercontent.com/u/7785499?v=2","gravatar_id":"","url":"https://api.github.com/users/yagoulas","html_url":"https://github.com/yagoulas","followers_url":"https://api.github.com/users/yagoulas/followers","following_url":"https://api.github.com/users/yagoulas/following{/other_user}","gists_url":"https://api.github.com/users/yagoulas/gists{/gist_id}","starred_url":"https://api.github.com/users/yagoulas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yagoulas/subscriptions","organizations_url":"https://api.github.com/users/yagoulas/orgs","repos_url":"https://api.github.com/users/yagoulas/repos","events_url":"https://api.github.com/users/yagoulas/events{/privacy}","received_events_url":"https://api.github.com/users/yagoulas/received_events","type":"User","site_admin":false},"repo":{"id":24156837,"name":"OpenBazaar","full_name":"yagoulas/OpenBazaar","owner":{"login":"yagoulas","id":7785499,"avatar_url":"https://avatars.githubusercontent.com/u/7785499?v=2","gravatar_id":"","url":"https://api.github.com/users/yagoulas","html_url":"https://github.com/yagoulas","followers_url":"https://api.github.com/users/yagoulas/followers","following_url":"https://api.github.com/users/yagoulas/following{/other_user}","gists_url":"https://api.github.com/users/yagoulas/gists{/gist_id}","starred_url":"https://api.github.com/users/yagoulas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yagoulas/subscriptions","organizations_url":"https://api.github.com/users/yagoulas/orgs","repos_url":"https://api.github.com/users/yagoulas/repos","events_url":"https://api.github.com/users/yagoulas/events{/privacy}","received_events_url":"https://api.github.com/users/yagoulas/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/yagoulas/OpenBazaar","description":"A decentralized marketplace","fork":true,"url":"https://api.github.com/repos/yagoulas/OpenBazaar","forks_url":"https://api.github.com/repos/yagoulas/OpenBazaar/forks","keys_url":"https://api.github.com/repos/yagoulas/OpenBazaar/keys{/key_id}","collaborators_url":"https://api.github.com/repos/yagoulas/OpenBazaar/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/yagoulas/OpenBazaar/teams","hooks_url":"https://api.github.com/repos/yagoulas/OpenBazaar/hooks","issue_events_url":"https://api.github.com/repos/yagoulas/OpenBazaar/issues/events{/number}","events_url":"https://api.github.com/repos/yagoulas/OpenBazaar/events","assignees_url":"https://api.github.com/repos/yagoulas/OpenBazaar/assignees{/user}","branches_url":"https://api.github.com/repos/yagoulas/OpenBazaar/branches{/branch}","tags_url":"https://api.github.com/repos/yagoulas/OpenBazaar/tags","blobs_url":"https://api.github.com/repos/yagoulas/OpenBazaar/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/yagoulas/OpenBazaar/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/yagoulas/OpenBazaar/git/refs{/sha}","trees_url":"https://api.github.com/repos/yagoulas/OpenBazaar/git/trees{/sha}","statuses_url":"https://api.github.com/repos/yagoulas/OpenBazaar/statuses/{sha}","languages_url":"https://api.github.com/repos/yagoulas/OpenBazaar/languages","stargazers_url":"https://api.github.com/repos/yagoulas/OpenBazaar/stargazers","contributors_url":"https://api.github.com/repos/yagoulas/OpenBazaar/contributors","subscribers_url":"https://api.github.com/repos/yagoulas/OpenBazaar/subscribers","subscription_url":"https://api.github.com/repos/yagoulas/OpenBazaar/subscription","commits_url":"https://api.github.com/repos/yagoulas/OpenBazaar/commits{/sha}","git_commits_url":"https://api.github.com/repos/yagoulas/OpenBazaar/git/commits{/sha}","comments_url":"https://api.github.com/repos/yagoulas/OpenBazaar/comments{/number}","issue_comment_url":"https://api.github.com/repos/yagoulas/OpenBazaar/issues/comments/{number}","contents_url":"https://api.github.com/repos/yagoulas/OpenBazaar/contents/{+path}","compare_url":"https://api.github.com/repos/yagoulas/OpenBazaar/compare/{base}...{head}","merges_url":"https://api.github.com/repos/yagoulas/OpenBazaar/merges","archive_url":"https://api.github.com/repos/yagoulas/OpenBazaar/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/yagoulas/OpenBazaar/downloads","issues_url":"https://api.github.com/repos/yagoulas/OpenBazaar/issues{/number}","pulls_url":"https://api.github.com/repos/yagoulas/OpenBazaar/pulls{/number}","milestones_url":"https://api.github.com/repos/yagoulas/OpenBazaar/milestones{/number}","notifications_url":"https://api.github.com/repos/yagoulas/OpenBazaar/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/yagoulas/OpenBazaar/labels{/name}","releases_url":"https://api.github.com/repos/yagoulas/OpenBazaar/releases{/id}","created_at":"2014-09-17T18:26:32Z","updated_at":"2014-09-17T19:23:29Z","pushed_at":"2014-09-25T12:18:52Z","git_url":"git://github.com/yagoulas/OpenBazaar.git","ssh_url":"git@github.com:yagoulas/OpenBazaar.git","clone_url":"https://github.com/yagoulas/OpenBazaar.git","svn_url":"https://github.com/yagoulas/OpenBazaar","homepage":"http://forum.openbazaar.org","size":16172,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":true,"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":"OpenBazaar:develop","ref":"develop","sha":"7ed50916c21f64dd123ef839608ec1a691e9c94d","user":{"login":"OpenBazaar","id":7438770,"avatar_url":"https://avatars.githubusercontent.com/u/7438770?v=2","gravatar_id":"","url":"https://api.github.com/users/OpenBazaar","html_url":"https://github.com/OpenBazaar","followers_url":"https://api.github.com/users/OpenBazaar/followers","following_url":"https://api.github.com/users/OpenBazaar/following{/other_user}","gists_url":"https://api.github.com/users/OpenBazaar/gists{/gist_id}","starred_url":"https://api.github.com/users/OpenBazaar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/OpenBazaar/subscriptions","organizations_url":"https://api.github.com/users/OpenBazaar/orgs","repos_url":"https://api.github.com/users/OpenBazaar/repos","events_url":"https://api.github.com/users/OpenBazaar/events{/privacy}","received_events_url":"https://api.github.com/users/OpenBazaar/received_events","type":"Organization","site_admin":false},"repo":{"id":19147609,"name":"OpenBazaar","full_name":"OpenBazaar/OpenBazaar","owner":{"login":"OpenBazaar","id":7438770,"avatar_url":"https://avatars.githubusercontent.com/u/7438770?v=2","gravatar_id":"","url":"https://api.github.com/users/OpenBazaar","html_url":"https://github.com/OpenBazaar","followers_url":"https://api.github.com/users/OpenBazaar/followers","following_url":"https://api.github.com/users/OpenBazaar/following{/other_user}","gists_url":"https://api.github.com/users/OpenBazaar/gists{/gist_id}","starred_url":"https://api.github.com/users/OpenBazaar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/OpenBazaar/subscriptions","organizations_url":"https://api.github.com/users/OpenBazaar/orgs","repos_url":"https://api.github.com/users/OpenBazaar/repos","events_url":"https://api.github.com/users/OpenBazaar/events{/privacy}","received_events_url":"https://api.github.com/users/OpenBazaar/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/OpenBazaar/OpenBazaar","description":"A decentralized marketplace","fork":false,"url":"https://api.github.com/repos/OpenBazaar/OpenBazaar","forks_url":"https://api.github.com/repos/OpenBazaar/OpenBazaar/forks","keys_url":"https://api.github.com/repos/OpenBazaar/OpenBazaar/keys{/key_id}","collaborators_url":"https://api.github.com/repos/OpenBazaar/OpenBazaar/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/OpenBazaar/OpenBazaar/teams","hooks_url":"https://api.github.com/repos/OpenBazaar/OpenBazaar/hooks","issue_events_url":"https://api.github.com/repos/OpenBazaar/OpenBazaar/issues/events{/number}","events_url":"https://api.github.com/repos/OpenBazaar/OpenBazaar/events","assignees_url":"https://api.github.com/repos/OpenBazaar/OpenBazaar/assignees{/user}","branches_url":"https://api.github.com/repos/OpenBazaar/OpenBazaar/branches{/branch}","tags_url":"https://api.github.com/repos/OpenBazaar/OpenBazaar/tags","blobs_url":"https://api.github.com/repos/OpenBazaar/OpenBazaar/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/OpenBazaar/OpenBazaar/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/OpenBazaar/OpenBazaar/git/refs{/sha}","trees_url":"https://api.github.com/repos/OpenBazaar/OpenBazaar/git/trees{/sha}","statuses_url":"https://api.github.com/repos/OpenBazaar/OpenBazaar/statuses/{sha}","languages_url":"https://api.github.com/repos/OpenBazaar/OpenBazaar/languages","stargazers_url":"https://api.github.com/repos/OpenBazaar/OpenBazaar/stargazers","contributors_url":"https://api.github.com/repos/OpenBazaar/OpenBazaar/contributors","subscribers_url":"https://api.github.com/repos/OpenBazaar/OpenBazaar/subscribers","subscription_url":"https://api.github.com/repos/OpenBazaar/OpenBazaar/subscription","commits_url":"https://api.github.com/repos/OpenBazaar/OpenBazaar/commits{/sha}","git_commits_url":"https://api.github.com/repos/OpenBazaar/OpenBazaar/git/commits{/sha}","comments_url":"https://api.github.com/repos/OpenBazaar/OpenBazaar/comments{/number}","issue_comment_url":"https://api.github.com/repos/OpenBazaar/OpenBazaar/issues/comments/{number}","contents_url":"https://api.github.com/repos/OpenBazaar/OpenBazaar/contents/{+path}","compare_url":"https://api.github.com/repos/OpenBazaar/OpenBazaar/compare/{base}...{head}","merges_url":"https://api.github.com/repos/OpenBazaar/OpenBazaar/merges","archive_url":"https://api.github.com/repos/OpenBazaar/OpenBazaar/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/OpenBazaar/OpenBazaar/downloads","issues_url":"https://api.github.com/repos/OpenBazaar/OpenBazaar/issues{/number}","pulls_url":"https://api.github.com/repos/OpenBazaar/OpenBazaar/pulls{/number}","milestones_url":"https://api.github.com/repos/OpenBazaar/OpenBazaar/milestones{/number}","notifications_url":"https://api.github.com/repos/OpenBazaar/OpenBazaar/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/OpenBazaar/OpenBazaar/labels{/name}","releases_url":"https://api.github.com/repos/OpenBazaar/OpenBazaar/releases{/id}","created_at":"2014-04-25T13:49:36Z","updated_at":"2014-09-26T10:36:49Z","pushed_at":"2014-09-26T11:58:40Z","git_url":"git://github.com/OpenBazaar/OpenBazaar.git","ssh_url":"git@github.com:OpenBazaar/OpenBazaar.git","clone_url":"https://github.com/OpenBazaar/OpenBazaar.git","svn_url":"https://github.com/OpenBazaar/OpenBazaar","homepage":"http://forum.openbazaar.org","size":36451,"stargazers_count":607,"watchers_count":607,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":177,"mirror_url":null,"open_issues_count":164,"forks":177,"open_issues":164,"watchers":607,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/OpenBazaar/OpenBazaar/pulls/678"},"html":{"href":"https://github.com/OpenBazaar/OpenBazaar/pull/678"},"issue":{"href":"https://api.github.com/repos/OpenBazaar/OpenBazaar/issues/678"},"comments":{"href":"https://api.github.com/repos/OpenBazaar/OpenBazaar/issues/678/comments"},"review_comments":{"href":"https://api.github.com/repos/OpenBazaar/OpenBazaar/pulls/678/comments"},"review_comment":{"href":"https://api.github.com/repos/OpenBazaar/OpenBazaar/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/OpenBazaar/OpenBazaar/pulls/678/commits"},"statuses":{"href":"https://api.github.com/repos/OpenBazaar/OpenBazaar/statuses/9541f200094d2bca49de11c25aad380ed9187368"}}}}