{"action":"created","comment":{"url":"https://api.github.com/repos/civisanalytics/civis-python/pulls/comments/154401485","pull_request_review_id":80223992,"id":154401485,"diff_hunk":"@@ -129,3 +129,19 @@ def f_retry(*args, **kwargs):\n         return f_retry\n \n     return deco_retry\n+\n+\n+class BufferedPartialReader(object):\n+    def __init__(self, buf, max_bytes):\n+        self.max_bytes = max_bytes\n+        self.bytes_read = 0\n+        self.buf = buf\n+        self.len = max_bytes\n+\n+    def read(self, size=-1):","path":"civis/_utils.py","position":13,"original_position":13,"commit_id":"62ef3ee3f211f01e60f030e7ee559f9e8dbb31ad","original_commit_id":"62ef3ee3f211f01e60f030e7ee559f9e8dbb31ad","user":{"login":"stephen-hoover","id":8355977,"avatar_url":"https://avatars1.githubusercontent.com/u/8355977?v=4","gravatar_id":"","url":"https://api.github.com/users/stephen-hoover","html_url":"https://github.com/stephen-hoover","followers_url":"https://api.github.com/users/stephen-hoover/followers","following_url":"https://api.github.com/users/stephen-hoover/following{/other_user}","gists_url":"https://api.github.com/users/stephen-hoover/gists{/gist_id}","starred_url":"https://api.github.com/users/stephen-hoover/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stephen-hoover/subscriptions","organizations_url":"https://api.github.com/users/stephen-hoover/orgs","repos_url":"https://api.github.com/users/stephen-hoover/repos","events_url":"https://api.github.com/users/stephen-hoover/events{/privacy}","received_events_url":"https://api.github.com/users/stephen-hoover/received_events","type":"User","site_admin":false},"body":"This defaults `size` to `-1`, but doesn't seem to handle the size=-1 case. `size=-1` should set `size` to `bytes_left`, right?","created_at":"2017-12-01T17:27:17Z","updated_at":"2017-12-01T17:53:18Z","html_url":"https://github.com/civisanalytics/civis-python/pull/189#discussion_r154401485","pull_request_url":"https://api.github.com/repos/civisanalytics/civis-python/pulls/189","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/civisanalytics/civis-python/pulls/comments/154401485"},"html":{"href":"https://github.com/civisanalytics/civis-python/pull/189#discussion_r154401485"},"pull_request":{"href":"https://api.github.com/repos/civisanalytics/civis-python/pulls/189"}}},"pull_request":{"url":"https://api.github.com/repos/civisanalytics/civis-python/pulls/189","id":155508054,"html_url":"https://github.com/civisanalytics/civis-python/pull/189","diff_url":"https://github.com/civisanalytics/civis-python/pull/189.diff","patch_url":"https://github.com/civisanalytics/civis-python/pull/189.patch","issue_url":"https://api.github.com/repos/civisanalytics/civis-python/issues/189","number":189,"state":"open","locked":false,"title":"[CIVP-13616] doubled disk usage in multipart upload","user":{"login":"jkulzick","id":4155284,"avatar_url":"https://avatars0.githubusercontent.com/u/4155284?v=4","gravatar_id":"","url":"https://api.github.com/users/jkulzick","html_url":"https://github.com/jkulzick","followers_url":"https://api.github.com/users/jkulzick/followers","following_url":"https://api.github.com/users/jkulzick/following{/other_user}","gists_url":"https://api.github.com/users/jkulzick/gists{/gist_id}","starred_url":"https://api.github.com/users/jkulzick/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jkulzick/subscriptions","organizations_url":"https://api.github.com/users/jkulzick/orgs","repos_url":"https://api.github.com/users/jkulzick/repos","events_url":"https://api.github.com/users/jkulzick/events{/privacy}","received_events_url":"https://api.github.com/users/jkulzick/received_events","type":"User","site_admin":false},"body":"- `dataframe_to_civis` now writes the dataframe to disk instead of an in memory buffer\r\n- `file_to_civis` will re-write buffers that are not instances of io.BufferedReader to disk\r\n- `_multipart_upload` will no longer re-write file parts to disk; instead it will open new file handles","created_at":"2017-11-30T03:05:32Z","updated_at":"2017-12-01T17:53:18Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e00438465676063d961e3a62889b2516d1f6a360","assignee":{"login":"stephen-hoover","id":8355977,"avatar_url":"https://avatars1.githubusercontent.com/u/8355977?v=4","gravatar_id":"","url":"https://api.github.com/users/stephen-hoover","html_url":"https://github.com/stephen-hoover","followers_url":"https://api.github.com/users/stephen-hoover/followers","following_url":"https://api.github.com/users/stephen-hoover/following{/other_user}","gists_url":"https://api.github.com/users/stephen-hoover/gists{/gist_id}","starred_url":"https://api.github.com/users/stephen-hoover/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stephen-hoover/subscriptions","organizations_url":"https://api.github.com/users/stephen-hoover/orgs","repos_url":"https://api.github.com/users/stephen-hoover/repos","events_url":"https://api.github.com/users/stephen-hoover/events{/privacy}","received_events_url":"https://api.github.com/users/stephen-hoover/received_events","type":"User","site_admin":false},"assignees":[{"login":"stephen-hoover","id":8355977,"avatar_url":"https://avatars1.githubusercontent.com/u/8355977?v=4","gravatar_id":"","url":"https://api.github.com/users/stephen-hoover","html_url":"https://github.com/stephen-hoover","followers_url":"https://api.github.com/users/stephen-hoover/followers","following_url":"https://api.github.com/users/stephen-hoover/following{/other_user}","gists_url":"https://api.github.com/users/stephen-hoover/gists{/gist_id}","starred_url":"https://api.github.com/users/stephen-hoover/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stephen-hoover/subscriptions","organizations_url":"https://api.github.com/users/stephen-hoover/orgs","repos_url":"https://api.github.com/users/stephen-hoover/repos","events_url":"https://api.github.com/users/stephen-hoover/events{/privacy}","received_events_url":"https://api.github.com/users/stephen-hoover/received_events","type":"User","site_admin":false}],"requested_reviewers":[],"milestone":{"url":"https://api.github.com/repos/civisanalytics/civis-python/milestones/13","html_url":"https://github.com/civisanalytics/civis-python/milestone/13","labels_url":"https://api.github.com/repos/civisanalytics/civis-python/milestones/13/labels","id":2941627,"number":13,"title":"v1.8.0","description":null,"creator":{"login":"stephen-hoover","id":8355977,"avatar_url":"https://avatars1.githubusercontent.com/u/8355977?v=4","gravatar_id":"","url":"https://api.github.com/users/stephen-hoover","html_url":"https://github.com/stephen-hoover","followers_url":"https://api.github.com/users/stephen-hoover/followers","following_url":"https://api.github.com/users/stephen-hoover/following{/other_user}","gists_url":"https://api.github.com/users/stephen-hoover/gists{/gist_id}","starred_url":"https://api.github.com/users/stephen-hoover/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stephen-hoover/subscriptions","organizations_url":"https://api.github.com/users/stephen-hoover/orgs","repos_url":"https://api.github.com/users/stephen-hoover/repos","events_url":"https://api.github.com/users/stephen-hoover/events{/privacy}","received_events_url":"https://api.github.com/users/stephen-hoover/received_events","type":"User","site_admin":false},"open_issues":1,"closed_issues":2,"state":"open","created_at":"2017-11-27T23:11:09Z","updated_at":"2017-11-30T15:35:24Z","due_on":null,"closed_at":null},"commits_url":"https://api.github.com/repos/civisanalytics/civis-python/pulls/189/commits","review_comments_url":"https://api.github.com/repos/civisanalytics/civis-python/pulls/189/comments","review_comment_url":"https://api.github.com/repos/civisanalytics/civis-python/pulls/comments{/number}","comments_url":"https://api.github.com/repos/civisanalytics/civis-python/issues/189/comments","statuses_url":"https://api.github.com/repos/civisanalytics/civis-python/statuses/62ef3ee3f211f01e60f030e7ee559f9e8dbb31ad","head":{"label":"jkulzick:fix-disk-usage","ref":"fix-disk-usage","sha":"62ef3ee3f211f01e60f030e7ee559f9e8dbb31ad","user":{"login":"jkulzick","id":4155284,"avatar_url":"https://avatars0.githubusercontent.com/u/4155284?v=4","gravatar_id":"","url":"https://api.github.com/users/jkulzick","html_url":"https://github.com/jkulzick","followers_url":"https://api.github.com/users/jkulzick/followers","following_url":"https://api.github.com/users/jkulzick/following{/other_user}","gists_url":"https://api.github.com/users/jkulzick/gists{/gist_id}","starred_url":"https://api.github.com/users/jkulzick/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jkulzick/subscriptions","organizations_url":"https://api.github.com/users/jkulzick/orgs","repos_url":"https://api.github.com/users/jkulzick/repos","events_url":"https://api.github.com/users/jkulzick/events{/privacy}","received_events_url":"https://api.github.com/users/jkulzick/received_events","type":"User","site_admin":false},"repo":{"id":97612740,"name":"civis-python","full_name":"jkulzick/civis-python","owner":{"login":"jkulzick","id":4155284,"avatar_url":"https://avatars0.githubusercontent.com/u/4155284?v=4","gravatar_id":"","url":"https://api.github.com/users/jkulzick","html_url":"https://github.com/jkulzick","followers_url":"https://api.github.com/users/jkulzick/followers","following_url":"https://api.github.com/users/jkulzick/following{/other_user}","gists_url":"https://api.github.com/users/jkulzick/gists{/gist_id}","starred_url":"https://api.github.com/users/jkulzick/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jkulzick/subscriptions","organizations_url":"https://api.github.com/users/jkulzick/orgs","repos_url":"https://api.github.com/users/jkulzick/repos","events_url":"https://api.github.com/users/jkulzick/events{/privacy}","received_events_url":"https://api.github.com/users/jkulzick/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jkulzick/civis-python","description":"Civis API Client for Python: https://civisanalytics.com/products/civis-platform/","fork":true,"url":"https://api.github.com/repos/jkulzick/civis-python","forks_url":"https://api.github.com/repos/jkulzick/civis-python/forks","keys_url":"https://api.github.com/repos/jkulzick/civis-python/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jkulzick/civis-python/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jkulzick/civis-python/teams","hooks_url":"https://api.github.com/repos/jkulzick/civis-python/hooks","issue_events_url":"https://api.github.com/repos/jkulzick/civis-python/issues/events{/number}","events_url":"https://api.github.com/repos/jkulzick/civis-python/events","assignees_url":"https://api.github.com/repos/jkulzick/civis-python/assignees{/user}","branches_url":"https://api.github.com/repos/jkulzick/civis-python/branches{/branch}","tags_url":"https://api.github.com/repos/jkulzick/civis-python/tags","blobs_url":"https://api.github.com/repos/jkulzick/civis-python/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jkulzick/civis-python/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jkulzick/civis-python/git/refs{/sha}","trees_url":"https://api.github.com/repos/jkulzick/civis-python/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jkulzick/civis-python/statuses/{sha}","languages_url":"https://api.github.com/repos/jkulzick/civis-python/languages","stargazers_url":"https://api.github.com/repos/jkulzick/civis-python/stargazers","contributors_url":"https://api.github.com/repos/jkulzick/civis-python/contributors","subscribers_url":"https://api.github.com/repos/jkulzick/civis-python/subscribers","subscription_url":"https://api.github.com/repos/jkulzick/civis-python/subscription","commits_url":"https://api.github.com/repos/jkulzick/civis-python/commits{/sha}","git_commits_url":"https://api.github.com/repos/jkulzick/civis-python/git/commits{/sha}","comments_url":"https://api.github.com/repos/jkulzick/civis-python/comments{/number}","issue_comment_url":"https://api.github.com/repos/jkulzick/civis-python/issues/comments{/number}","contents_url":"https://api.github.com/repos/jkulzick/civis-python/contents/{+path}","compare_url":"https://api.github.com/repos/jkulzick/civis-python/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jkulzick/civis-python/merges","archive_url":"https://api.github.com/repos/jkulzick/civis-python/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jkulzick/civis-python/downloads","issues_url":"https://api.github.com/repos/jkulzick/civis-python/issues{/number}","pulls_url":"https://api.github.com/repos/jkulzick/civis-python/pulls{/number}","milestones_url":"https://api.github.com/repos/jkulzick/civis-python/milestones{/number}","notifications_url":"https://api.github.com/repos/jkulzick/civis-python/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jkulzick/civis-python/labels{/name}","releases_url":"https://api.github.com/repos/jkulzick/civis-python/releases{/id}","deployments_url":"https://api.github.com/repos/jkulzick/civis-python/deployments","created_at":"2017-07-18T15:07:09Z","updated_at":"2017-07-18T15:07:11Z","pushed_at":"2017-11-30T03:02:43Z","git_url":"git://github.com/jkulzick/civis-python.git","ssh_url":"git@github.com:jkulzick/civis-python.git","clone_url":"https://github.com/jkulzick/civis-python.git","svn_url":"https://github.com/jkulzick/civis-python","homepage":null,"size":1488,"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":null,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"civisanalytics:master","ref":"master","sha":"f5e2ec1a6733b4f679b1f5e1dea17f203344065a","user":{"login":"civisanalytics","id":3299743,"avatar_url":"https://avatars3.githubusercontent.com/u/3299743?v=4","gravatar_id":"","url":"https://api.github.com/users/civisanalytics","html_url":"https://github.com/civisanalytics","followers_url":"https://api.github.com/users/civisanalytics/followers","following_url":"https://api.github.com/users/civisanalytics/following{/other_user}","gists_url":"https://api.github.com/users/civisanalytics/gists{/gist_id}","starred_url":"https://api.github.com/users/civisanalytics/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/civisanalytics/subscriptions","organizations_url":"https://api.github.com/users/civisanalytics/orgs","repos_url":"https://api.github.com/users/civisanalytics/repos","events_url":"https://api.github.com/users/civisanalytics/events{/privacy}","received_events_url":"https://api.github.com/users/civisanalytics/received_events","type":"Organization","site_admin":false},"repo":{"id":72446085,"name":"civis-python","full_name":"civisanalytics/civis-python","owner":{"login":"civisanalytics","id":3299743,"avatar_url":"https://avatars3.githubusercontent.com/u/3299743?v=4","gravatar_id":"","url":"https://api.github.com/users/civisanalytics","html_url":"https://github.com/civisanalytics","followers_url":"https://api.github.com/users/civisanalytics/followers","following_url":"https://api.github.com/users/civisanalytics/following{/other_user}","gists_url":"https://api.github.com/users/civisanalytics/gists{/gist_id}","starred_url":"https://api.github.com/users/civisanalytics/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/civisanalytics/subscriptions","organizations_url":"https://api.github.com/users/civisanalytics/orgs","repos_url":"https://api.github.com/users/civisanalytics/repos","events_url":"https://api.github.com/users/civisanalytics/events{/privacy}","received_events_url":"https://api.github.com/users/civisanalytics/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/civisanalytics/civis-python","description":"Civis API Client for Python: https://civisanalytics.com/products/civis-platform/","fork":false,"url":"https://api.github.com/repos/civisanalytics/civis-python","forks_url":"https://api.github.com/repos/civisanalytics/civis-python/forks","keys_url":"https://api.github.com/repos/civisanalytics/civis-python/keys{/key_id}","collaborators_url":"https://api.github.com/repos/civisanalytics/civis-python/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/civisanalytics/civis-python/teams","hooks_url":"https://api.github.com/repos/civisanalytics/civis-python/hooks","issue_events_url":"https://api.github.com/repos/civisanalytics/civis-python/issues/events{/number}","events_url":"https://api.github.com/repos/civisanalytics/civis-python/events","assignees_url":"https://api.github.com/repos/civisanalytics/civis-python/assignees{/user}","branches_url":"https://api.github.com/repos/civisanalytics/civis-python/branches{/branch}","tags_url":"https://api.github.com/repos/civisanalytics/civis-python/tags","blobs_url":"https://api.github.com/repos/civisanalytics/civis-python/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/civisanalytics/civis-python/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/civisanalytics/civis-python/git/refs{/sha}","trees_url":"https://api.github.com/repos/civisanalytics/civis-python/git/trees{/sha}","statuses_url":"https://api.github.com/repos/civisanalytics/civis-python/statuses/{sha}","languages_url":"https://api.github.com/repos/civisanalytics/civis-python/languages","stargazers_url":"https://api.github.com/repos/civisanalytics/civis-python/stargazers","contributors_url":"https://api.github.com/repos/civisanalytics/civis-python/contributors","subscribers_url":"https://api.github.com/repos/civisanalytics/civis-python/subscribers","subscription_url":"https://api.github.com/repos/civisanalytics/civis-python/subscription","commits_url":"https://api.github.com/repos/civisanalytics/civis-python/commits{/sha}","git_commits_url":"https://api.github.com/repos/civisanalytics/civis-python/git/commits{/sha}","comments_url":"https://api.github.com/repos/civisanalytics/civis-python/comments{/number}","issue_comment_url":"https://api.github.com/repos/civisanalytics/civis-python/issues/comments{/number}","contents_url":"https://api.github.com/repos/civisanalytics/civis-python/contents/{+path}","compare_url":"https://api.github.com/repos/civisanalytics/civis-python/compare/{base}...{head}","merges_url":"https://api.github.com/repos/civisanalytics/civis-python/merges","archive_url":"https://api.github.com/repos/civisanalytics/civis-python/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/civisanalytics/civis-python/downloads","issues_url":"https://api.github.com/repos/civisanalytics/civis-python/issues{/number}","pulls_url":"https://api.github.com/repos/civisanalytics/civis-python/pulls{/number}","milestones_url":"https://api.github.com/repos/civisanalytics/civis-python/milestones{/number}","notifications_url":"https://api.github.com/repos/civisanalytics/civis-python/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/civisanalytics/civis-python/labels{/name}","releases_url":"https://api.github.com/repos/civisanalytics/civis-python/releases{/id}","deployments_url":"https://api.github.com/repos/civisanalytics/civis-python/deployments","created_at":"2016-10-31T14:46:08Z","updated_at":"2017-11-09T18:24:37Z","pushed_at":"2017-11-30T03:05:33Z","git_url":"git://github.com/civisanalytics/civis-python.git","ssh_url":"git@github.com:civisanalytics/civis-python.git","clone_url":"https://github.com/civisanalytics/civis-python.git","svn_url":"https://github.com/civisanalytics/civis-python","homepage":null,"size":1482,"stargazers_count":12,"watchers_count":12,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":20,"mirror_url":null,"archived":false,"open_issues_count":11,"license":{"key":"bsd-3-clause","name":"BSD 3-clause \"New\" or \"Revised\" License","spdx_id":"BSD-3-Clause","url":"https://api.github.com/licenses/bsd-3-clause"},"forks":20,"open_issues":11,"watchers":12,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/civisanalytics/civis-python/pulls/189"},"html":{"href":"https://github.com/civisanalytics/civis-python/pull/189"},"issue":{"href":"https://api.github.com/repos/civisanalytics/civis-python/issues/189"},"comments":{"href":"https://api.github.com/repos/civisanalytics/civis-python/issues/189/comments"},"review_comments":{"href":"https://api.github.com/repos/civisanalytics/civis-python/pulls/189/comments"},"review_comment":{"href":"https://api.github.com/repos/civisanalytics/civis-python/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/civisanalytics/civis-python/pulls/189/commits"},"statuses":{"href":"https://api.github.com/repos/civisanalytics/civis-python/statuses/62ef3ee3f211f01e60f030e7ee559f9e8dbb31ad"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"stephen-hoover"}}