{"action":"created","comment":{"url":"https://api.github.com/repos/dask/dask/pulls/comments/59793796","id":59793796,"diff_hunk":"@@ -388,6 +388,9 @@ def file_size(fn, compression=None):\n         with open(fn, 'rb') as f:\n             f.seek(-4, 2)\n             result = struct.unpack('I', f.read(4))[0]\n+    elif compression:\n+        with open(fn, 'rb', compression) as f:\n+            result = f.seek(0, 2)","path":"dask/utils.py","position":6,"original_position":6,"commit_id":"e7ee1b653a4966e4575697a68025563a0b953a07","original_commit_id":"e7ee1b653a4966e4575697a68025563a0b953a07","user":{"login":"mrocklin","id":306380,"avatar_url":"https://avatars.githubusercontent.com/u/306380?v=3","gravatar_id":"","url":"https://api.github.com/users/mrocklin","html_url":"https://github.com/mrocklin","followers_url":"https://api.github.com/users/mrocklin/followers","following_url":"https://api.github.com/users/mrocklin/following{/other_user}","gists_url":"https://api.github.com/users/mrocklin/gists{/gist_id}","starred_url":"https://api.github.com/users/mrocklin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mrocklin/subscriptions","organizations_url":"https://api.github.com/users/mrocklin/orgs","repos_url":"https://api.github.com/users/mrocklin/repos","events_url":"https://api.github.com/users/mrocklin/events{/privacy}","received_events_url":"https://api.github.com/users/mrocklin/received_events","type":"User","site_admin":false},"body":"Is this true for all compression formats that aren't gzip?","created_at":"2016-04-14T21:19:14Z","updated_at":"2016-04-14T21:19:14Z","html_url":"https://github.com/dask/dask/pull/1097#discussion_r59793796","pull_request_url":"https://api.github.com/repos/dask/dask/pulls/1097","_links":{"self":{"href":"https://api.github.com/repos/dask/dask/pulls/comments/59793796"},"html":{"href":"https://github.com/dask/dask/pull/1097#discussion_r59793796"},"pull_request":{"href":"https://api.github.com/repos/dask/dask/pulls/1097"}}},"pull_request":{"url":"https://api.github.com/repos/dask/dask/pulls/1097","id":66270554,"html_url":"https://github.com/dask/dask/pull/1097","diff_url":"https://github.com/dask/dask/pull/1097.diff","patch_url":"https://github.com/dask/dask/pull/1097.patch","issue_url":"https://api.github.com/repos/dask/dask/issues/1097","number":1097,"state":"open","locked":false,"title":"File size bug","user":{"login":"wabu","id":39164,"avatar_url":"https://avatars.githubusercontent.com/u/39164?v=3","gravatar_id":"","url":"https://api.github.com/users/wabu","html_url":"https://github.com/wabu","followers_url":"https://api.github.com/users/wabu/followers","following_url":"https://api.github.com/users/wabu/following{/other_user}","gists_url":"https://api.github.com/users/wabu/gists{/gist_id}","starred_url":"https://api.github.com/users/wabu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wabu/subscriptions","organizations_url":"https://api.github.com/users/wabu/orgs","repos_url":"https://api.github.com/users/wabu/repos","events_url":"https://api.github.com/users/wabu/events{/privacy}","received_events_url":"https://api.github.com/users/wabu/received_events","type":"User","site_admin":false},"body":"Found bug in `utils.file_size` giving wrong results with compressed files, resulting in `dataframe.read_csv` truncating bz2 and xz compressed files.\r\n\r\nMy easy fix is not efficient for bz2 and only efficient with using libaffi for xz (#1096) support.","created_at":"2016-04-13T06:15:12Z","updated_at":"2016-04-14T21:19:14Z","closed_at":null,"merged_at":null,"merge_commit_sha":"1e02e171bba266133a5ebab8b733a33485a1c336","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/dask/dask/pulls/1097/commits","review_comments_url":"https://api.github.com/repos/dask/dask/pulls/1097/comments","review_comment_url":"https://api.github.com/repos/dask/dask/pulls/comments{/number}","comments_url":"https://api.github.com/repos/dask/dask/issues/1097/comments","statuses_url":"https://api.github.com/repos/dask/dask/statuses/e7ee1b653a4966e4575697a68025563a0b953a07","head":{"label":"gameduell:file_size-bug","ref":"file_size-bug","sha":"e7ee1b653a4966e4575697a68025563a0b953a07","user":{"login":"gameduell","id":7631889,"avatar_url":"https://avatars.githubusercontent.com/u/7631889?v=3","gravatar_id":"","url":"https://api.github.com/users/gameduell","html_url":"https://github.com/gameduell","followers_url":"https://api.github.com/users/gameduell/followers","following_url":"https://api.github.com/users/gameduell/following{/other_user}","gists_url":"https://api.github.com/users/gameduell/gists{/gist_id}","starred_url":"https://api.github.com/users/gameduell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gameduell/subscriptions","organizations_url":"https://api.github.com/users/gameduell/orgs","repos_url":"https://api.github.com/users/gameduell/repos","events_url":"https://api.github.com/users/gameduell/events{/privacy}","received_events_url":"https://api.github.com/users/gameduell/received_events","type":"Organization","site_admin":false},"repo":{"id":54955860,"name":"dask","full_name":"gameduell/dask","owner":{"login":"gameduell","id":7631889,"avatar_url":"https://avatars.githubusercontent.com/u/7631889?v=3","gravatar_id":"","url":"https://api.github.com/users/gameduell","html_url":"https://github.com/gameduell","followers_url":"https://api.github.com/users/gameduell/followers","following_url":"https://api.github.com/users/gameduell/following{/other_user}","gists_url":"https://api.github.com/users/gameduell/gists{/gist_id}","starred_url":"https://api.github.com/users/gameduell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gameduell/subscriptions","organizations_url":"https://api.github.com/users/gameduell/orgs","repos_url":"https://api.github.com/users/gameduell/repos","events_url":"https://api.github.com/users/gameduell/events{/privacy}","received_events_url":"https://api.github.com/users/gameduell/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/gameduell/dask","description":"Task scheduling and blocked algorithms for parallel processing","fork":true,"url":"https://api.github.com/repos/gameduell/dask","forks_url":"https://api.github.com/repos/gameduell/dask/forks","keys_url":"https://api.github.com/repos/gameduell/dask/keys{/key_id}","collaborators_url":"https://api.github.com/repos/gameduell/dask/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/gameduell/dask/teams","hooks_url":"https://api.github.com/repos/gameduell/dask/hooks","issue_events_url":"https://api.github.com/repos/gameduell/dask/issues/events{/number}","events_url":"https://api.github.com/repos/gameduell/dask/events","assignees_url":"https://api.github.com/repos/gameduell/dask/assignees{/user}","branches_url":"https://api.github.com/repos/gameduell/dask/branches{/branch}","tags_url":"https://api.github.com/repos/gameduell/dask/tags","blobs_url":"https://api.github.com/repos/gameduell/dask/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/gameduell/dask/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/gameduell/dask/git/refs{/sha}","trees_url":"https://api.github.com/repos/gameduell/dask/git/trees{/sha}","statuses_url":"https://api.github.com/repos/gameduell/dask/statuses/{sha}","languages_url":"https://api.github.com/repos/gameduell/dask/languages","stargazers_url":"https://api.github.com/repos/gameduell/dask/stargazers","contributors_url":"https://api.github.com/repos/gameduell/dask/contributors","subscribers_url":"https://api.github.com/repos/gameduell/dask/subscribers","subscription_url":"https://api.github.com/repos/gameduell/dask/subscription","commits_url":"https://api.github.com/repos/gameduell/dask/commits{/sha}","git_commits_url":"https://api.github.com/repos/gameduell/dask/git/commits{/sha}","comments_url":"https://api.github.com/repos/gameduell/dask/comments{/number}","issue_comment_url":"https://api.github.com/repos/gameduell/dask/issues/comments{/number}","contents_url":"https://api.github.com/repos/gameduell/dask/contents/{+path}","compare_url":"https://api.github.com/repos/gameduell/dask/compare/{base}...{head}","merges_url":"https://api.github.com/repos/gameduell/dask/merges","archive_url":"https://api.github.com/repos/gameduell/dask/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/gameduell/dask/downloads","issues_url":"https://api.github.com/repos/gameduell/dask/issues{/number}","pulls_url":"https://api.github.com/repos/gameduell/dask/pulls{/number}","milestones_url":"https://api.github.com/repos/gameduell/dask/milestones{/number}","notifications_url":"https://api.github.com/repos/gameduell/dask/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/gameduell/dask/labels{/name}","releases_url":"https://api.github.com/repos/gameduell/dask/releases{/id}","deployments_url":"https://api.github.com/repos/gameduell/dask/deployments","created_at":"2016-03-29T07:39:10Z","updated_at":"2016-03-29T07:39:11Z","pushed_at":"2016-04-14T07:12:34Z","git_url":"git://github.com/gameduell/dask.git","ssh_url":"git@github.com:gameduell/dask.git","clone_url":"https://github.com/gameduell/dask.git","svn_url":"https://github.com/gameduell/dask","homepage":"http://dask.pydata.org","size":9664,"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":"dask:master","ref":"master","sha":"7dba9ede5cac25b299b85a4f7a003652d70a7a71","user":{"login":"dask","id":17131925,"avatar_url":"https://avatars.githubusercontent.com/u/17131925?v=3","gravatar_id":"","url":"https://api.github.com/users/dask","html_url":"https://github.com/dask","followers_url":"https://api.github.com/users/dask/followers","following_url":"https://api.github.com/users/dask/following{/other_user}","gists_url":"https://api.github.com/users/dask/gists{/gist_id}","starred_url":"https://api.github.com/users/dask/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dask/subscriptions","organizations_url":"https://api.github.com/users/dask/orgs","repos_url":"https://api.github.com/users/dask/repos","events_url":"https://api.github.com/users/dask/events{/privacy}","received_events_url":"https://api.github.com/users/dask/received_events","type":"Organization","site_admin":false},"repo":{"id":28782747,"name":"dask","full_name":"dask/dask","owner":{"login":"dask","id":17131925,"avatar_url":"https://avatars.githubusercontent.com/u/17131925?v=3","gravatar_id":"","url":"https://api.github.com/users/dask","html_url":"https://github.com/dask","followers_url":"https://api.github.com/users/dask/followers","following_url":"https://api.github.com/users/dask/following{/other_user}","gists_url":"https://api.github.com/users/dask/gists{/gist_id}","starred_url":"https://api.github.com/users/dask/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dask/subscriptions","organizations_url":"https://api.github.com/users/dask/orgs","repos_url":"https://api.github.com/users/dask/repos","events_url":"https://api.github.com/users/dask/events{/privacy}","received_events_url":"https://api.github.com/users/dask/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/dask/dask","description":"Task scheduling and blocked algorithms for parallel processing","fork":false,"url":"https://api.github.com/repos/dask/dask","forks_url":"https://api.github.com/repos/dask/dask/forks","keys_url":"https://api.github.com/repos/dask/dask/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dask/dask/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dask/dask/teams","hooks_url":"https://api.github.com/repos/dask/dask/hooks","issue_events_url":"https://api.github.com/repos/dask/dask/issues/events{/number}","events_url":"https://api.github.com/repos/dask/dask/events","assignees_url":"https://api.github.com/repos/dask/dask/assignees{/user}","branches_url":"https://api.github.com/repos/dask/dask/branches{/branch}","tags_url":"https://api.github.com/repos/dask/dask/tags","blobs_url":"https://api.github.com/repos/dask/dask/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dask/dask/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dask/dask/git/refs{/sha}","trees_url":"https://api.github.com/repos/dask/dask/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dask/dask/statuses/{sha}","languages_url":"https://api.github.com/repos/dask/dask/languages","stargazers_url":"https://api.github.com/repos/dask/dask/stargazers","contributors_url":"https://api.github.com/repos/dask/dask/contributors","subscribers_url":"https://api.github.com/repos/dask/dask/subscribers","subscription_url":"https://api.github.com/repos/dask/dask/subscription","commits_url":"https://api.github.com/repos/dask/dask/commits{/sha}","git_commits_url":"https://api.github.com/repos/dask/dask/git/commits{/sha}","comments_url":"https://api.github.com/repos/dask/dask/comments{/number}","issue_comment_url":"https://api.github.com/repos/dask/dask/issues/comments{/number}","contents_url":"https://api.github.com/repos/dask/dask/contents/{+path}","compare_url":"https://api.github.com/repos/dask/dask/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dask/dask/merges","archive_url":"https://api.github.com/repos/dask/dask/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dask/dask/downloads","issues_url":"https://api.github.com/repos/dask/dask/issues{/number}","pulls_url":"https://api.github.com/repos/dask/dask/pulls{/number}","milestones_url":"https://api.github.com/repos/dask/dask/milestones{/number}","notifications_url":"https://api.github.com/repos/dask/dask/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dask/dask/labels{/name}","releases_url":"https://api.github.com/repos/dask/dask/releases{/id}","deployments_url":"https://api.github.com/repos/dask/dask/deployments","created_at":"2015-01-04T18:50:00Z","updated_at":"2016-04-14T07:49:05Z","pushed_at":"2016-04-14T20:56:19Z","git_url":"git://github.com/dask/dask.git","ssh_url":"git@github.com:dask/dask.git","clone_url":"https://github.com/dask/dask.git","svn_url":"https://github.com/dask/dask","homepage":"http://dask.pydata.org","size":10771,"stargazers_count":656,"watchers_count":656,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":101,"mirror_url":null,"open_issues_count":97,"forks":101,"open_issues":97,"watchers":656,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/dask/dask/pulls/1097"},"html":{"href":"https://github.com/dask/dask/pull/1097"},"issue":{"href":"https://api.github.com/repos/dask/dask/issues/1097"},"comments":{"href":"https://api.github.com/repos/dask/dask/issues/1097/comments"},"review_comments":{"href":"https://api.github.com/repos/dask/dask/pulls/1097/comments"},"review_comment":{"href":"https://api.github.com/repos/dask/dask/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/dask/dask/pulls/1097/commits"},"statuses":{"href":"https://api.github.com/repos/dask/dask/statuses/e7ee1b653a4966e4575697a68025563a0b953a07"}}}}