{"action":"created","comment":{"url":"https://api.github.com/repos/ethereum/py-evm/pulls/comments/202697457","pull_request_review_id":137444230,"id":202697457,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIwMjY5NzQ1Nw==","diff_hunk":"@@ -879,6 +891,24 @@ def get_peers(self, min_td: int) -> List[BasePeer]:\n                 break\n \n \n+class ConnectedPeersIterator(AsyncIterator[BasePeer]):\n+\n+    def __init__(self, peers: Tuple[BasePeer, ...]) -> None:\n+        self.iter = iter(peers)\n+\n+    async def __anext__(self) -> BasePeer:","path":"p2p/peer.py","position":78,"original_position":78,"commit_id":"5086d4db3bd84fe691402fb0812ff7417fcda656","original_commit_id":"5086d4db3bd84fe691402fb0812ff7417fcda656","user":{"login":"cburgdorf","id":521109,"node_id":"MDQ6VXNlcjUyMTEwOQ==","avatar_url":"https://avatars2.githubusercontent.com/u/521109?v=4","gravatar_id":"","url":"https://api.github.com/users/cburgdorf","html_url":"https://github.com/cburgdorf","followers_url":"https://api.github.com/users/cburgdorf/followers","following_url":"https://api.github.com/users/cburgdorf/following{/other_user}","gists_url":"https://api.github.com/users/cburgdorf/gists{/gist_id}","starred_url":"https://api.github.com/users/cburgdorf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cburgdorf/subscriptions","organizations_url":"https://api.github.com/users/cburgdorf/orgs","repos_url":"https://api.github.com/users/cburgdorf/repos","events_url":"https://api.github.com/users/cburgdorf/events{/privacy}","received_events_url":"https://api.github.com/users/cburgdorf/received_events","type":"User","site_admin":false},"body":"Could this be written as an [Asynchronous Generator](https://www.python.org/dev/peps/pep-0525/#improvements-over-asynchronous-iterators) instead of an `AsyncIterator`?\r\n\r\nThey seem to be lighter in syntax while being 2.3x as fast.","created_at":"2018-07-16T14:13:08Z","updated_at":"2018-07-16T14:13:08Z","html_url":"https://github.com/ethereum/py-evm/pull/1022#discussion_r202697457","pull_request_url":"https://api.github.com/repos/ethereum/py-evm/pulls/1022","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/ethereum/py-evm/pulls/comments/202697457"},"html":{"href":"https://github.com/ethereum/py-evm/pull/1022#discussion_r202697457"},"pull_request":{"href":"https://api.github.com/repos/ethereum/py-evm/pulls/1022"}}},"pull_request":{"url":"https://api.github.com/repos/ethereum/py-evm/pulls/1022","id":201619730,"node_id":"MDExOlB1bGxSZXF1ZXN0MjAxNjE5NzMw","html_url":"https://github.com/ethereum/py-evm/pull/1022","diff_url":"https://github.com/ethereum/py-evm/pull/1022.diff","patch_url":"https://github.com/ethereum/py-evm/pull/1022.patch","issue_url":"https://api.github.com/repos/ethereum/py-evm/issues/1022","number":1022,"state":"open","locked":false,"title":"PeerPool is now an asynchronous iterable","user":{"login":"gsalgado","id":412274,"node_id":"MDQ6VXNlcjQxMjI3NA==","avatar_url":"https://avatars2.githubusercontent.com/u/412274?v=4","gravatar_id":"","url":"https://api.github.com/users/gsalgado","html_url":"https://github.com/gsalgado","followers_url":"https://api.github.com/users/gsalgado/followers","following_url":"https://api.github.com/users/gsalgado/following{/other_user}","gists_url":"https://api.github.com/users/gsalgado/gists{/gist_id}","starred_url":"https://api.github.com/users/gsalgado/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gsalgado/subscriptions","organizations_url":"https://api.github.com/users/gsalgado/orgs","repos_url":"https://api.github.com/users/gsalgado/repos","events_url":"https://api.github.com/users/gsalgado/events{/privacy}","received_events_url":"https://api.github.com/users/gsalgado/received_events","type":"User","site_admin":false},"body":"This way callsites are less likely to get a list of peers and hold them while making blocking calls, as these peers may disconnect in the meantime.\r\n\r\nCloses: #1016","created_at":"2018-07-16T12:19:22Z","updated_at":"2018-07-16T14:13:08Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a5c077326d694a79f8b270da312b26c0ef69a80a","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/ethereum/py-evm/pulls/1022/commits","review_comments_url":"https://api.github.com/repos/ethereum/py-evm/pulls/1022/comments","review_comment_url":"https://api.github.com/repos/ethereum/py-evm/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ethereum/py-evm/issues/1022/comments","statuses_url":"https://api.github.com/repos/ethereum/py-evm/statuses/5086d4db3bd84fe691402fb0812ff7417fcda656","head":{"label":"gsalgado:peer-pool-aiter","ref":"peer-pool-aiter","sha":"5086d4db3bd84fe691402fb0812ff7417fcda656","user":{"login":"gsalgado","id":412274,"node_id":"MDQ6VXNlcjQxMjI3NA==","avatar_url":"https://avatars2.githubusercontent.com/u/412274?v=4","gravatar_id":"","url":"https://api.github.com/users/gsalgado","html_url":"https://github.com/gsalgado","followers_url":"https://api.github.com/users/gsalgado/followers","following_url":"https://api.github.com/users/gsalgado/following{/other_user}","gists_url":"https://api.github.com/users/gsalgado/gists{/gist_id}","starred_url":"https://api.github.com/users/gsalgado/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gsalgado/subscriptions","organizations_url":"https://api.github.com/users/gsalgado/orgs","repos_url":"https://api.github.com/users/gsalgado/repos","events_url":"https://api.github.com/users/gsalgado/events{/privacy}","received_events_url":"https://api.github.com/users/gsalgado/received_events","type":"User","site_admin":false},"repo":{"id":94995992,"node_id":"MDEwOlJlcG9zaXRvcnk5NDk5NTk5Mg==","name":"py-evm","full_name":"gsalgado/py-evm","owner":{"login":"gsalgado","id":412274,"node_id":"MDQ6VXNlcjQxMjI3NA==","avatar_url":"https://avatars2.githubusercontent.com/u/412274?v=4","gravatar_id":"","url":"https://api.github.com/users/gsalgado","html_url":"https://github.com/gsalgado","followers_url":"https://api.github.com/users/gsalgado/followers","following_url":"https://api.github.com/users/gsalgado/following{/other_user}","gists_url":"https://api.github.com/users/gsalgado/gists{/gist_id}","starred_url":"https://api.github.com/users/gsalgado/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gsalgado/subscriptions","organizations_url":"https://api.github.com/users/gsalgado/orgs","repos_url":"https://api.github.com/users/gsalgado/repos","events_url":"https://api.github.com/users/gsalgado/events{/privacy}","received_events_url":"https://api.github.com/users/gsalgado/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/gsalgado/py-evm","description":"An alternative Ethereum Virtual Machine implementation","fork":true,"url":"https://api.github.com/repos/gsalgado/py-evm","forks_url":"https://api.github.com/repos/gsalgado/py-evm/forks","keys_url":"https://api.github.com/repos/gsalgado/py-evm/keys{/key_id}","collaborators_url":"https://api.github.com/repos/gsalgado/py-evm/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/gsalgado/py-evm/teams","hooks_url":"https://api.github.com/repos/gsalgado/py-evm/hooks","issue_events_url":"https://api.github.com/repos/gsalgado/py-evm/issues/events{/number}","events_url":"https://api.github.com/repos/gsalgado/py-evm/events","assignees_url":"https://api.github.com/repos/gsalgado/py-evm/assignees{/user}","branches_url":"https://api.github.com/repos/gsalgado/py-evm/branches{/branch}","tags_url":"https://api.github.com/repos/gsalgado/py-evm/tags","blobs_url":"https://api.github.com/repos/gsalgado/py-evm/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/gsalgado/py-evm/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/gsalgado/py-evm/git/refs{/sha}","trees_url":"https://api.github.com/repos/gsalgado/py-evm/git/trees{/sha}","statuses_url":"https://api.github.com/repos/gsalgado/py-evm/statuses/{sha}","languages_url":"https://api.github.com/repos/gsalgado/py-evm/languages","stargazers_url":"https://api.github.com/repos/gsalgado/py-evm/stargazers","contributors_url":"https://api.github.com/repos/gsalgado/py-evm/contributors","subscribers_url":"https://api.github.com/repos/gsalgado/py-evm/subscribers","subscription_url":"https://api.github.com/repos/gsalgado/py-evm/subscription","commits_url":"https://api.github.com/repos/gsalgado/py-evm/commits{/sha}","git_commits_url":"https://api.github.com/repos/gsalgado/py-evm/git/commits{/sha}","comments_url":"https://api.github.com/repos/gsalgado/py-evm/comments{/number}","issue_comment_url":"https://api.github.com/repos/gsalgado/py-evm/issues/comments{/number}","contents_url":"https://api.github.com/repos/gsalgado/py-evm/contents/{+path}","compare_url":"https://api.github.com/repos/gsalgado/py-evm/compare/{base}...{head}","merges_url":"https://api.github.com/repos/gsalgado/py-evm/merges","archive_url":"https://api.github.com/repos/gsalgado/py-evm/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/gsalgado/py-evm/downloads","issues_url":"https://api.github.com/repos/gsalgado/py-evm/issues{/number}","pulls_url":"https://api.github.com/repos/gsalgado/py-evm/pulls{/number}","milestones_url":"https://api.github.com/repos/gsalgado/py-evm/milestones{/number}","notifications_url":"https://api.github.com/repos/gsalgado/py-evm/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/gsalgado/py-evm/labels{/name}","releases_url":"https://api.github.com/repos/gsalgado/py-evm/releases{/id}","deployments_url":"https://api.github.com/repos/gsalgado/py-evm/deployments","created_at":"2017-06-21T11:16:04Z","updated_at":"2018-07-16T12:19:01Z","pushed_at":"2018-07-16T13:57:35Z","git_url":"git://github.com/gsalgado/py-evm.git","ssh_url":"git@github.com:gsalgado/py-evm.git","clone_url":"https://github.com/gsalgado/py-evm.git","svn_url":"https://github.com/gsalgado/py-evm","homepage":"","size":4243,"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":1,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"ethereum:master","ref":"master","sha":"3b6c1df1b6193b48454ad977b71e41f02ee84edf","user":{"login":"ethereum","id":6250754,"node_id":"MDEyOk9yZ2FuaXphdGlvbjYyNTA3NTQ=","avatar_url":"https://avatars3.githubusercontent.com/u/6250754?v=4","gravatar_id":"","url":"https://api.github.com/users/ethereum","html_url":"https://github.com/ethereum","followers_url":"https://api.github.com/users/ethereum/followers","following_url":"https://api.github.com/users/ethereum/following{/other_user}","gists_url":"https://api.github.com/users/ethereum/gists{/gist_id}","starred_url":"https://api.github.com/users/ethereum/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ethereum/subscriptions","organizations_url":"https://api.github.com/users/ethereum/orgs","repos_url":"https://api.github.com/users/ethereum/repos","events_url":"https://api.github.com/users/ethereum/events{/privacy}","received_events_url":"https://api.github.com/users/ethereum/received_events","type":"Organization","site_admin":false},"repo":{"id":77478378,"node_id":"MDEwOlJlcG9zaXRvcnk3NzQ3ODM3OA==","name":"py-evm","full_name":"ethereum/py-evm","owner":{"login":"ethereum","id":6250754,"node_id":"MDEyOk9yZ2FuaXphdGlvbjYyNTA3NTQ=","avatar_url":"https://avatars3.githubusercontent.com/u/6250754?v=4","gravatar_id":"","url":"https://api.github.com/users/ethereum","html_url":"https://github.com/ethereum","followers_url":"https://api.github.com/users/ethereum/followers","following_url":"https://api.github.com/users/ethereum/following{/other_user}","gists_url":"https://api.github.com/users/ethereum/gists{/gist_id}","starred_url":"https://api.github.com/users/ethereum/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ethereum/subscriptions","organizations_url":"https://api.github.com/users/ethereum/orgs","repos_url":"https://api.github.com/users/ethereum/repos","events_url":"https://api.github.com/users/ethereum/events{/privacy}","received_events_url":"https://api.github.com/users/ethereum/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ethereum/py-evm","description":"A Python implementation of the Ethereum Virtual Machine","fork":false,"url":"https://api.github.com/repos/ethereum/py-evm","forks_url":"https://api.github.com/repos/ethereum/py-evm/forks","keys_url":"https://api.github.com/repos/ethereum/py-evm/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ethereum/py-evm/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ethereum/py-evm/teams","hooks_url":"https://api.github.com/repos/ethereum/py-evm/hooks","issue_events_url":"https://api.github.com/repos/ethereum/py-evm/issues/events{/number}","events_url":"https://api.github.com/repos/ethereum/py-evm/events","assignees_url":"https://api.github.com/repos/ethereum/py-evm/assignees{/user}","branches_url":"https://api.github.com/repos/ethereum/py-evm/branches{/branch}","tags_url":"https://api.github.com/repos/ethereum/py-evm/tags","blobs_url":"https://api.github.com/repos/ethereum/py-evm/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ethereum/py-evm/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ethereum/py-evm/git/refs{/sha}","trees_url":"https://api.github.com/repos/ethereum/py-evm/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ethereum/py-evm/statuses/{sha}","languages_url":"https://api.github.com/repos/ethereum/py-evm/languages","stargazers_url":"https://api.github.com/repos/ethereum/py-evm/stargazers","contributors_url":"https://api.github.com/repos/ethereum/py-evm/contributors","subscribers_url":"https://api.github.com/repos/ethereum/py-evm/subscribers","subscription_url":"https://api.github.com/repos/ethereum/py-evm/subscription","commits_url":"https://api.github.com/repos/ethereum/py-evm/commits{/sha}","git_commits_url":"https://api.github.com/repos/ethereum/py-evm/git/commits{/sha}","comments_url":"https://api.github.com/repos/ethereum/py-evm/comments{/number}","issue_comment_url":"https://api.github.com/repos/ethereum/py-evm/issues/comments{/number}","contents_url":"https://api.github.com/repos/ethereum/py-evm/contents/{+path}","compare_url":"https://api.github.com/repos/ethereum/py-evm/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ethereum/py-evm/merges","archive_url":"https://api.github.com/repos/ethereum/py-evm/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ethereum/py-evm/downloads","issues_url":"https://api.github.com/repos/ethereum/py-evm/issues{/number}","pulls_url":"https://api.github.com/repos/ethereum/py-evm/pulls{/number}","milestones_url":"https://api.github.com/repos/ethereum/py-evm/milestones{/number}","notifications_url":"https://api.github.com/repos/ethereum/py-evm/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ethereum/py-evm/labels{/name}","releases_url":"https://api.github.com/repos/ethereum/py-evm/releases{/id}","deployments_url":"https://api.github.com/repos/ethereum/py-evm/deployments","created_at":"2016-12-27T19:36:00Z","updated_at":"2018-07-16T14:08:51Z","pushed_at":"2018-07-16T13:57:37Z","git_url":"git://github.com/ethereum/py-evm.git","ssh_url":"git@github.com:ethereum/py-evm.git","clone_url":"https://github.com/ethereum/py-evm.git","svn_url":"https://github.com/ethereum/py-evm","homepage":"http://py-evm.readthedocs.io/en/latest/","size":4265,"stargazers_count":542,"watchers_count":542,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":239,"mirror_url":null,"archived":false,"open_issues_count":114,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":239,"open_issues":114,"watchers":542,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ethereum/py-evm/pulls/1022"},"html":{"href":"https://github.com/ethereum/py-evm/pull/1022"},"issue":{"href":"https://api.github.com/repos/ethereum/py-evm/issues/1022"},"comments":{"href":"https://api.github.com/repos/ethereum/py-evm/issues/1022/comments"},"review_comments":{"href":"https://api.github.com/repos/ethereum/py-evm/pulls/1022/comments"},"review_comment":{"href":"https://api.github.com/repos/ethereum/py-evm/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ethereum/py-evm/pulls/1022/commits"},"statuses":{"href":"https://api.github.com/repos/ethereum/py-evm/statuses/5086d4db3bd84fe691402fb0812ff7417fcda656"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"cburgdorf"}}