{"action":"created","comment":{"url":"https://api.github.com/repos/pyca/cryptography/pulls/comments/44219213","id":44219213,"diff_hunk":"@@ -66,15 +68,28 @@ def download_artifacts(session):\n         response.raise_for_status()\n         for artifact in response.json()[\"artifacts\"]:\n             response = session.get(\n-                \"{0}artifact/{1}\".format(run[\"url\"], artifact[\"relativePath\"])\n+                \"{0}artifact/{1}\".format(run[\"url\"], artifact[\"relativePath\"]),\n+                stream=True\n+            )\n+            assert response.headers[\"content-length\"]\n+            print(\"Downloading {0}\".format(artifact[\"fileName\"]))\n+            bar = ProgressBar(\n+                expected_size=int(response.headers[\"content-length\"]),\n+                filled_char=\"=\"\n             )\n+            content = b''\n+            for data in response.iter_content(chunk_size=8192):\n+                content += data","path":"tasks.py","position":25,"original_position":25,"commit_id":"e0e90a819bcd7bb13f377732ca871068cbf5cd25","original_commit_id":"e0e90a819bcd7bb13f377732ca871068cbf5cd25","user":{"login":"alex","id":772,"avatar_url":"https://avatars.githubusercontent.com/u/772?v=3","gravatar_id":"","url":"https://api.github.com/users/alex","html_url":"https://github.com/alex","followers_url":"https://api.github.com/users/alex/followers","following_url":"https://api.github.com/users/alex/following{/other_user}","gists_url":"https://api.github.com/users/alex/gists{/gist_id}","starred_url":"https://api.github.com/users/alex/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alex/subscriptions","organizations_url":"https://api.github.com/users/alex/orgs","repos_url":"https://api.github.com/users/alex/repos","events_url":"https://api.github.com/users/alex/events{/privacy}","received_events_url":"https://api.github.com/users/alex/received_events","type":"User","site_admin":false},"body":"`io.BytesIO` is a good solution\n\nOn Sat, Nov 7, 2015 at 7:45 PM, Paul Kehrer <notifications@github.com>\nwrote:\n\n> In tasks.py\n> <https://github.com/pyca/cryptography/pull/2469#discussion_r44219198>:\n>\n> >              )\n> > +            content = b''\n> > +            for data in response.iter_content(chunk_size=8192):\n> > +                content += data\n>\n> Yeah I figured it was gonna be bad since it'll copy every time. I\n> originally had this as an array and then it only gets concatenated at the\n> end, but got lazy since I wanted the length. I'll refactor it quickly to be\n> a separate length value.\n>\n> —\n> Reply to this email directly or view it on GitHub\n> <https://github.com/pyca/cryptography/pull/2469/files#r44219198>.\n>\n\n\n\n-- \n\"I disapprove of what you say, but I will defend to the death your right to\nsay it.\" -- Evelyn Beatrice Hall (summarizing Voltaire)\n\"The people's good is the highest law.\" -- Cicero\nGPG Key fingerprint: 125F 5C67 DFE9 4084\n","created_at":"2015-11-08T00:46:32Z","updated_at":"2015-11-08T00:46:32Z","html_url":"https://github.com/pyca/cryptography/pull/2469#discussion_r44219213","pull_request_url":"https://api.github.com/repos/pyca/cryptography/pulls/2469","_links":{"self":{"href":"https://api.github.com/repos/pyca/cryptography/pulls/comments/44219213"},"html":{"href":"https://github.com/pyca/cryptography/pull/2469#discussion_r44219213"},"pull_request":{"href":"https://api.github.com/repos/pyca/cryptography/pulls/2469"}}},"pull_request":{"url":"https://api.github.com/repos/pyca/cryptography/pulls/2469","id":50049532,"html_url":"https://github.com/pyca/cryptography/pull/2469","diff_url":"https://github.com/pyca/cryptography/pull/2469.diff","patch_url":"https://github.com/pyca/cryptography/pull/2469.patch","issue_url":"https://api.github.com/repos/pyca/cryptography/issues/2469","number":2469,"state":"open","locked":false,"title":"add progress bar to wheel downloads","user":{"login":"reaperhulk","id":161495,"avatar_url":"https://avatars.githubusercontent.com/u/161495?v=3","gravatar_id":"","url":"https://api.github.com/users/reaperhulk","html_url":"https://github.com/reaperhulk","followers_url":"https://api.github.com/users/reaperhulk/followers","following_url":"https://api.github.com/users/reaperhulk/following{/other_user}","gists_url":"https://api.github.com/users/reaperhulk/gists{/gist_id}","starred_url":"https://api.github.com/users/reaperhulk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/reaperhulk/subscriptions","organizations_url":"https://api.github.com/users/reaperhulk/orgs","repos_url":"https://api.github.com/users/reaperhulk/repos","events_url":"https://api.github.com/users/reaperhulk/events{/privacy}","received_events_url":"https://api.github.com/users/reaperhulk/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-11-08T00:39:26Z","updated_at":"2015-11-08T00:46:32Z","closed_at":null,"merged_at":null,"merge_commit_sha":"1571ab0b2d7ae3cfdfc2bcd3a71ccd5a89fdf77b","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/pyca/cryptography/pulls/2469/commits","review_comments_url":"https://api.github.com/repos/pyca/cryptography/pulls/2469/comments","review_comment_url":"https://api.github.com/repos/pyca/cryptography/pulls/comments{/number}","comments_url":"https://api.github.com/repos/pyca/cryptography/issues/2469/comments","statuses_url":"https://api.github.com/repos/pyca/cryptography/statuses/e0e90a819bcd7bb13f377732ca871068cbf5cd25","head":{"label":"reaperhulk:progress-bars","ref":"progress-bars","sha":"e0e90a819bcd7bb13f377732ca871068cbf5cd25","user":{"login":"reaperhulk","id":161495,"avatar_url":"https://avatars.githubusercontent.com/u/161495?v=3","gravatar_id":"","url":"https://api.github.com/users/reaperhulk","html_url":"https://github.com/reaperhulk","followers_url":"https://api.github.com/users/reaperhulk/followers","following_url":"https://api.github.com/users/reaperhulk/following{/other_user}","gists_url":"https://api.github.com/users/reaperhulk/gists{/gist_id}","starred_url":"https://api.github.com/users/reaperhulk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/reaperhulk/subscriptions","organizations_url":"https://api.github.com/users/reaperhulk/orgs","repos_url":"https://api.github.com/users/reaperhulk/repos","events_url":"https://api.github.com/users/reaperhulk/events{/privacy}","received_events_url":"https://api.github.com/users/reaperhulk/received_events","type":"User","site_admin":false},"repo":{"id":12704352,"name":"cryptography","full_name":"reaperhulk/cryptography","owner":{"login":"reaperhulk","id":161495,"avatar_url":"https://avatars.githubusercontent.com/u/161495?v=3","gravatar_id":"","url":"https://api.github.com/users/reaperhulk","html_url":"https://github.com/reaperhulk","followers_url":"https://api.github.com/users/reaperhulk/followers","following_url":"https://api.github.com/users/reaperhulk/following{/other_user}","gists_url":"https://api.github.com/users/reaperhulk/gists{/gist_id}","starred_url":"https://api.github.com/users/reaperhulk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/reaperhulk/subscriptions","organizations_url":"https://api.github.com/users/reaperhulk/orgs","repos_url":"https://api.github.com/users/reaperhulk/repos","events_url":"https://api.github.com/users/reaperhulk/events{/privacy}","received_events_url":"https://api.github.com/users/reaperhulk/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/reaperhulk/cryptography","description":"cryptography is a package designed to expose cryptographic primitives and recipes to Python developers.","fork":true,"url":"https://api.github.com/repos/reaperhulk/cryptography","forks_url":"https://api.github.com/repos/reaperhulk/cryptography/forks","keys_url":"https://api.github.com/repos/reaperhulk/cryptography/keys{/key_id}","collaborators_url":"https://api.github.com/repos/reaperhulk/cryptography/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/reaperhulk/cryptography/teams","hooks_url":"https://api.github.com/repos/reaperhulk/cryptography/hooks","issue_events_url":"https://api.github.com/repos/reaperhulk/cryptography/issues/events{/number}","events_url":"https://api.github.com/repos/reaperhulk/cryptography/events","assignees_url":"https://api.github.com/repos/reaperhulk/cryptography/assignees{/user}","branches_url":"https://api.github.com/repos/reaperhulk/cryptography/branches{/branch}","tags_url":"https://api.github.com/repos/reaperhulk/cryptography/tags","blobs_url":"https://api.github.com/repos/reaperhulk/cryptography/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/reaperhulk/cryptography/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/reaperhulk/cryptography/git/refs{/sha}","trees_url":"https://api.github.com/repos/reaperhulk/cryptography/git/trees{/sha}","statuses_url":"https://api.github.com/repos/reaperhulk/cryptography/statuses/{sha}","languages_url":"https://api.github.com/repos/reaperhulk/cryptography/languages","stargazers_url":"https://api.github.com/repos/reaperhulk/cryptography/stargazers","contributors_url":"https://api.github.com/repos/reaperhulk/cryptography/contributors","subscribers_url":"https://api.github.com/repos/reaperhulk/cryptography/subscribers","subscription_url":"https://api.github.com/repos/reaperhulk/cryptography/subscription","commits_url":"https://api.github.com/repos/reaperhulk/cryptography/commits{/sha}","git_commits_url":"https://api.github.com/repos/reaperhulk/cryptography/git/commits{/sha}","comments_url":"https://api.github.com/repos/reaperhulk/cryptography/comments{/number}","issue_comment_url":"https://api.github.com/repos/reaperhulk/cryptography/issues/comments{/number}","contents_url":"https://api.github.com/repos/reaperhulk/cryptography/contents/{+path}","compare_url":"https://api.github.com/repos/reaperhulk/cryptography/compare/{base}...{head}","merges_url":"https://api.github.com/repos/reaperhulk/cryptography/merges","archive_url":"https://api.github.com/repos/reaperhulk/cryptography/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/reaperhulk/cryptography/downloads","issues_url":"https://api.github.com/repos/reaperhulk/cryptography/issues{/number}","pulls_url":"https://api.github.com/repos/reaperhulk/cryptography/pulls{/number}","milestones_url":"https://api.github.com/repos/reaperhulk/cryptography/milestones{/number}","notifications_url":"https://api.github.com/repos/reaperhulk/cryptography/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/reaperhulk/cryptography/labels{/name}","releases_url":"https://api.github.com/repos/reaperhulk/cryptography/releases{/id}","created_at":"2013-09-09T14:59:27Z","updated_at":"2015-10-08T21:28:40Z","pushed_at":"2015-11-08T00:38:51Z","git_url":"git://github.com/reaperhulk/cryptography.git","ssh_url":"git@github.com:reaperhulk/cryptography.git","clone_url":"https://github.com/reaperhulk/cryptography.git","svn_url":"https://github.com/reaperhulk/cryptography","homepage":"","size":36214,"stargazers_count":1,"watchers_count":1,"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":1,"default_branch":"master"}},"base":{"label":"pyca:master","ref":"master","sha":"8d3168b9a64609e9d447b2048ce77a223d377778","user":{"login":"pyca","id":5615737,"avatar_url":"https://avatars.githubusercontent.com/u/5615737?v=3","gravatar_id":"","url":"https://api.github.com/users/pyca","html_url":"https://github.com/pyca","followers_url":"https://api.github.com/users/pyca/followers","following_url":"https://api.github.com/users/pyca/following{/other_user}","gists_url":"https://api.github.com/users/pyca/gists{/gist_id}","starred_url":"https://api.github.com/users/pyca/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pyca/subscriptions","organizations_url":"https://api.github.com/users/pyca/orgs","repos_url":"https://api.github.com/users/pyca/repos","events_url":"https://api.github.com/users/pyca/events{/privacy}","received_events_url":"https://api.github.com/users/pyca/received_events","type":"Organization","site_admin":false},"repo":{"id":11939484,"name":"cryptography","full_name":"pyca/cryptography","owner":{"login":"pyca","id":5615737,"avatar_url":"https://avatars.githubusercontent.com/u/5615737?v=3","gravatar_id":"","url":"https://api.github.com/users/pyca","html_url":"https://github.com/pyca","followers_url":"https://api.github.com/users/pyca/followers","following_url":"https://api.github.com/users/pyca/following{/other_user}","gists_url":"https://api.github.com/users/pyca/gists{/gist_id}","starred_url":"https://api.github.com/users/pyca/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pyca/subscriptions","organizations_url":"https://api.github.com/users/pyca/orgs","repos_url":"https://api.github.com/users/pyca/repos","events_url":"https://api.github.com/users/pyca/events{/privacy}","received_events_url":"https://api.github.com/users/pyca/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/pyca/cryptography","description":"cryptography is a package designed to expose cryptographic primitives and recipes to Python developers.","fork":false,"url":"https://api.github.com/repos/pyca/cryptography","forks_url":"https://api.github.com/repos/pyca/cryptography/forks","keys_url":"https://api.github.com/repos/pyca/cryptography/keys{/key_id}","collaborators_url":"https://api.github.com/repos/pyca/cryptography/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/pyca/cryptography/teams","hooks_url":"https://api.github.com/repos/pyca/cryptography/hooks","issue_events_url":"https://api.github.com/repos/pyca/cryptography/issues/events{/number}","events_url":"https://api.github.com/repos/pyca/cryptography/events","assignees_url":"https://api.github.com/repos/pyca/cryptography/assignees{/user}","branches_url":"https://api.github.com/repos/pyca/cryptography/branches{/branch}","tags_url":"https://api.github.com/repos/pyca/cryptography/tags","blobs_url":"https://api.github.com/repos/pyca/cryptography/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/pyca/cryptography/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/pyca/cryptography/git/refs{/sha}","trees_url":"https://api.github.com/repos/pyca/cryptography/git/trees{/sha}","statuses_url":"https://api.github.com/repos/pyca/cryptography/statuses/{sha}","languages_url":"https://api.github.com/repos/pyca/cryptography/languages","stargazers_url":"https://api.github.com/repos/pyca/cryptography/stargazers","contributors_url":"https://api.github.com/repos/pyca/cryptography/contributors","subscribers_url":"https://api.github.com/repos/pyca/cryptography/subscribers","subscription_url":"https://api.github.com/repos/pyca/cryptography/subscription","commits_url":"https://api.github.com/repos/pyca/cryptography/commits{/sha}","git_commits_url":"https://api.github.com/repos/pyca/cryptography/git/commits{/sha}","comments_url":"https://api.github.com/repos/pyca/cryptography/comments{/number}","issue_comment_url":"https://api.github.com/repos/pyca/cryptography/issues/comments{/number}","contents_url":"https://api.github.com/repos/pyca/cryptography/contents/{+path}","compare_url":"https://api.github.com/repos/pyca/cryptography/compare/{base}...{head}","merges_url":"https://api.github.com/repos/pyca/cryptography/merges","archive_url":"https://api.github.com/repos/pyca/cryptography/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/pyca/cryptography/downloads","issues_url":"https://api.github.com/repos/pyca/cryptography/issues{/number}","pulls_url":"https://api.github.com/repos/pyca/cryptography/pulls{/number}","milestones_url":"https://api.github.com/repos/pyca/cryptography/milestones{/number}","notifications_url":"https://api.github.com/repos/pyca/cryptography/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/pyca/cryptography/labels{/name}","releases_url":"https://api.github.com/repos/pyca/cryptography/releases{/id}","created_at":"2013-08-07T02:23:38Z","updated_at":"2015-11-07T20:00:14Z","pushed_at":"2015-11-08T00:39:27Z","git_url":"git://github.com/pyca/cryptography.git","ssh_url":"git@github.com:pyca/cryptography.git","clone_url":"https://github.com/pyca/cryptography.git","svn_url":"https://github.com/pyca/cryptography","homepage":"https://cryptography.io/","size":46909,"stargazers_count":865,"watchers_count":865,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":207,"mirror_url":null,"open_issues_count":83,"forks":207,"open_issues":83,"watchers":865,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/pyca/cryptography/pulls/2469"},"html":{"href":"https://github.com/pyca/cryptography/pull/2469"},"issue":{"href":"https://api.github.com/repos/pyca/cryptography/issues/2469"},"comments":{"href":"https://api.github.com/repos/pyca/cryptography/issues/2469/comments"},"review_comments":{"href":"https://api.github.com/repos/pyca/cryptography/pulls/2469/comments"},"review_comment":{"href":"https://api.github.com/repos/pyca/cryptography/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/pyca/cryptography/pulls/2469/commits"},"statuses":{"href":"https://api.github.com/repos/pyca/cryptography/statuses/e0e90a819bcd7bb13f377732ca871068cbf5cd25"}}}}