{"action":"created","comment":{"url":"https://api.github.com/repos/CTPUG/pygame_cffi/pulls/comments/47138322","id":47138322,"diff_hunk":"@@ -17,7 +69,18 @@ def rwops_encode_file_path(filepath):\n \n \n def rwops_from_file(fileobj):\n-    rwops = sdl.SDL_RWFromFP(fileobj, 0)\n+    try:\n+        # We try use the SDL helper first, since\n+        # it's the simplest code path\n+        rwops = sdl.SDL_RWFromFP(fileobj, 0)\n+    except (TypeError, IOError):","path":"pygame/rwobject.py","position":73,"original_position":73,"commit_id":"8a8ba71dbbc58cee6fb7cfd6c607363d5f0061be","original_commit_id":"8a8ba71dbbc58cee6fb7cfd6c607363d5f0061be","user":{"login":"hodgestar","id":165551,"avatar_url":"https://avatars.githubusercontent.com/u/165551?v=3","gravatar_id":"","url":"https://api.github.com/users/hodgestar","html_url":"https://github.com/hodgestar","followers_url":"https://api.github.com/users/hodgestar/followers","following_url":"https://api.github.com/users/hodgestar/following{/other_user}","gists_url":"https://api.github.com/users/hodgestar/gists{/gist_id}","starred_url":"https://api.github.com/users/hodgestar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hodgestar/subscriptions","organizations_url":"https://api.github.com/users/hodgestar/orgs","repos_url":"https://api.github.com/users/hodgestar/repos","events_url":"https://api.github.com/users/hodgestar/events{/privacy}","received_events_url":"https://api.github.com/users/hodgestar/received_events","type":"User","site_admin":false},"body":"Wonder a bit about how the two cases are checked here. If this matches what pygame does then bleh, but okay. Otherwise, I'm wondering whether this check isn't the cause of the two tests that we used to expect failures from not passing? Do we really need to catch both TypeError and IOError? IOError seems to imply that there is enough of the right type of object to attempt IO.","created_at":"2015-12-09T19:23:48Z","updated_at":"2015-12-09T19:23:48Z","html_url":"https://github.com/CTPUG/pygame_cffi/pull/37#discussion_r47138322","pull_request_url":"https://api.github.com/repos/CTPUG/pygame_cffi/pulls/37","_links":{"self":{"href":"https://api.github.com/repos/CTPUG/pygame_cffi/pulls/comments/47138322"},"html":{"href":"https://github.com/CTPUG/pygame_cffi/pull/37#discussion_r47138322"},"pull_request":{"href":"https://api.github.com/repos/CTPUG/pygame_cffi/pulls/37"}}},"pull_request":{"url":"https://api.github.com/repos/CTPUG/pygame_cffi/pulls/37","id":53112693,"html_url":"https://github.com/CTPUG/pygame_cffi/pull/37","diff_url":"https://github.com/CTPUG/pygame_cffi/pull/37.diff","patch_url":"https://github.com/CTPUG/pygame_cffi/pull/37.patch","issue_url":"https://api.github.com/repos/CTPUG/pygame_cffi/issues/37","number":37,"state":"open","locked":false,"title":"Bugs/issue 35 load stringio","user":{"login":"drnlm","id":642056,"avatar_url":"https://avatars.githubusercontent.com/u/642056?v=3","gravatar_id":"","url":"https://api.github.com/users/drnlm","html_url":"https://github.com/drnlm","followers_url":"https://api.github.com/users/drnlm/followers","following_url":"https://api.github.com/users/drnlm/following{/other_user}","gists_url":"https://api.github.com/users/drnlm/gists{/gist_id}","starred_url":"https://api.github.com/users/drnlm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/drnlm/subscriptions","organizations_url":"https://api.github.com/users/drnlm/orgs","repos_url":"https://api.github.com/users/drnlm/repos","events_url":"https://api.github.com/users/drnlm/events{/privacy}","received_events_url":"https://api.github.com/users/drnlm/received_events","type":"User","site_admin":false},"body":"This adds support for loading images from file-like objects such as BytesIO.\r\n\r\nThis should close #35 \r\n\r\nThis implementation may break on windows, as noted in the FIXME in sdl_c_build.py. Since I'm not in a postiion to test possible workarounds, I've left this as something to be fixed later.\r\n","created_at":"2015-12-09T12:31:37Z","updated_at":"2015-12-09T19:23:48Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a41265dce8843a5bd1bf3af03cffbec129a2fa8e","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/CTPUG/pygame_cffi/pulls/37/commits","review_comments_url":"https://api.github.com/repos/CTPUG/pygame_cffi/pulls/37/comments","review_comment_url":"https://api.github.com/repos/CTPUG/pygame_cffi/pulls/comments{/number}","comments_url":"https://api.github.com/repos/CTPUG/pygame_cffi/issues/37/comments","statuses_url":"https://api.github.com/repos/CTPUG/pygame_cffi/statuses/8a8ba71dbbc58cee6fb7cfd6c607363d5f0061be","head":{"label":"CTPUG:bugs/issue-35-load-stringio","ref":"bugs/issue-35-load-stringio","sha":"8a8ba71dbbc58cee6fb7cfd6c607363d5f0061be","user":{"login":"CTPUG","id":647522,"avatar_url":"https://avatars.githubusercontent.com/u/647522?v=3","gravatar_id":"","url":"https://api.github.com/users/CTPUG","html_url":"https://github.com/CTPUG","followers_url":"https://api.github.com/users/CTPUG/followers","following_url":"https://api.github.com/users/CTPUG/following{/other_user}","gists_url":"https://api.github.com/users/CTPUG/gists{/gist_id}","starred_url":"https://api.github.com/users/CTPUG/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CTPUG/subscriptions","organizations_url":"https://api.github.com/users/CTPUG/orgs","repos_url":"https://api.github.com/users/CTPUG/repos","events_url":"https://api.github.com/users/CTPUG/events{/privacy}","received_events_url":"https://api.github.com/users/CTPUG/received_events","type":"Organization","site_admin":false},"repo":{"id":14987914,"name":"pygame_cffi","full_name":"CTPUG/pygame_cffi","owner":{"login":"CTPUG","id":647522,"avatar_url":"https://avatars.githubusercontent.com/u/647522?v=3","gravatar_id":"","url":"https://api.github.com/users/CTPUG","html_url":"https://github.com/CTPUG","followers_url":"https://api.github.com/users/CTPUG/followers","following_url":"https://api.github.com/users/CTPUG/following{/other_user}","gists_url":"https://api.github.com/users/CTPUG/gists{/gist_id}","starred_url":"https://api.github.com/users/CTPUG/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CTPUG/subscriptions","organizations_url":"https://api.github.com/users/CTPUG/orgs","repos_url":"https://api.github.com/users/CTPUG/repos","events_url":"https://api.github.com/users/CTPUG/events{/privacy}","received_events_url":"https://api.github.com/users/CTPUG/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/CTPUG/pygame_cffi","description":"A cffi-based SDL wrapper that copies the pygame API.","fork":false,"url":"https://api.github.com/repos/CTPUG/pygame_cffi","forks_url":"https://api.github.com/repos/CTPUG/pygame_cffi/forks","keys_url":"https://api.github.com/repos/CTPUG/pygame_cffi/keys{/key_id}","collaborators_url":"https://api.github.com/repos/CTPUG/pygame_cffi/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/CTPUG/pygame_cffi/teams","hooks_url":"https://api.github.com/repos/CTPUG/pygame_cffi/hooks","issue_events_url":"https://api.github.com/repos/CTPUG/pygame_cffi/issues/events{/number}","events_url":"https://api.github.com/repos/CTPUG/pygame_cffi/events","assignees_url":"https://api.github.com/repos/CTPUG/pygame_cffi/assignees{/user}","branches_url":"https://api.github.com/repos/CTPUG/pygame_cffi/branches{/branch}","tags_url":"https://api.github.com/repos/CTPUG/pygame_cffi/tags","blobs_url":"https://api.github.com/repos/CTPUG/pygame_cffi/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/CTPUG/pygame_cffi/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/CTPUG/pygame_cffi/git/refs{/sha}","trees_url":"https://api.github.com/repos/CTPUG/pygame_cffi/git/trees{/sha}","statuses_url":"https://api.github.com/repos/CTPUG/pygame_cffi/statuses/{sha}","languages_url":"https://api.github.com/repos/CTPUG/pygame_cffi/languages","stargazers_url":"https://api.github.com/repos/CTPUG/pygame_cffi/stargazers","contributors_url":"https://api.github.com/repos/CTPUG/pygame_cffi/contributors","subscribers_url":"https://api.github.com/repos/CTPUG/pygame_cffi/subscribers","subscription_url":"https://api.github.com/repos/CTPUG/pygame_cffi/subscription","commits_url":"https://api.github.com/repos/CTPUG/pygame_cffi/commits{/sha}","git_commits_url":"https://api.github.com/repos/CTPUG/pygame_cffi/git/commits{/sha}","comments_url":"https://api.github.com/repos/CTPUG/pygame_cffi/comments{/number}","issue_comment_url":"https://api.github.com/repos/CTPUG/pygame_cffi/issues/comments{/number}","contents_url":"https://api.github.com/repos/CTPUG/pygame_cffi/contents/{+path}","compare_url":"https://api.github.com/repos/CTPUG/pygame_cffi/compare/{base}...{head}","merges_url":"https://api.github.com/repos/CTPUG/pygame_cffi/merges","archive_url":"https://api.github.com/repos/CTPUG/pygame_cffi/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/CTPUG/pygame_cffi/downloads","issues_url":"https://api.github.com/repos/CTPUG/pygame_cffi/issues{/number}","pulls_url":"https://api.github.com/repos/CTPUG/pygame_cffi/pulls{/number}","milestones_url":"https://api.github.com/repos/CTPUG/pygame_cffi/milestones{/number}","notifications_url":"https://api.github.com/repos/CTPUG/pygame_cffi/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/CTPUG/pygame_cffi/labels{/name}","releases_url":"https://api.github.com/repos/CTPUG/pygame_cffi/releases{/id}","created_at":"2013-12-06T16:40:01Z","updated_at":"2015-12-08T14:38:54Z","pushed_at":"2015-12-09T12:31:37Z","git_url":"git://github.com/CTPUG/pygame_cffi.git","ssh_url":"git@github.com:CTPUG/pygame_cffi.git","clone_url":"https://github.com/CTPUG/pygame_cffi.git","svn_url":"https://github.com/CTPUG/pygame_cffi","homepage":null,"size":1582,"stargazers_count":43,"watchers_count":43,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":8,"mirror_url":null,"open_issues_count":6,"forks":8,"open_issues":6,"watchers":43,"default_branch":"master"}},"base":{"label":"CTPUG:master","ref":"master","sha":"9c79f4db2cb153aadab013c74f7454e06ec7b69c","user":{"login":"CTPUG","id":647522,"avatar_url":"https://avatars.githubusercontent.com/u/647522?v=3","gravatar_id":"","url":"https://api.github.com/users/CTPUG","html_url":"https://github.com/CTPUG","followers_url":"https://api.github.com/users/CTPUG/followers","following_url":"https://api.github.com/users/CTPUG/following{/other_user}","gists_url":"https://api.github.com/users/CTPUG/gists{/gist_id}","starred_url":"https://api.github.com/users/CTPUG/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CTPUG/subscriptions","organizations_url":"https://api.github.com/users/CTPUG/orgs","repos_url":"https://api.github.com/users/CTPUG/repos","events_url":"https://api.github.com/users/CTPUG/events{/privacy}","received_events_url":"https://api.github.com/users/CTPUG/received_events","type":"Organization","site_admin":false},"repo":{"id":14987914,"name":"pygame_cffi","full_name":"CTPUG/pygame_cffi","owner":{"login":"CTPUG","id":647522,"avatar_url":"https://avatars.githubusercontent.com/u/647522?v=3","gravatar_id":"","url":"https://api.github.com/users/CTPUG","html_url":"https://github.com/CTPUG","followers_url":"https://api.github.com/users/CTPUG/followers","following_url":"https://api.github.com/users/CTPUG/following{/other_user}","gists_url":"https://api.github.com/users/CTPUG/gists{/gist_id}","starred_url":"https://api.github.com/users/CTPUG/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CTPUG/subscriptions","organizations_url":"https://api.github.com/users/CTPUG/orgs","repos_url":"https://api.github.com/users/CTPUG/repos","events_url":"https://api.github.com/users/CTPUG/events{/privacy}","received_events_url":"https://api.github.com/users/CTPUG/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/CTPUG/pygame_cffi","description":"A cffi-based SDL wrapper that copies the pygame API.","fork":false,"url":"https://api.github.com/repos/CTPUG/pygame_cffi","forks_url":"https://api.github.com/repos/CTPUG/pygame_cffi/forks","keys_url":"https://api.github.com/repos/CTPUG/pygame_cffi/keys{/key_id}","collaborators_url":"https://api.github.com/repos/CTPUG/pygame_cffi/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/CTPUG/pygame_cffi/teams","hooks_url":"https://api.github.com/repos/CTPUG/pygame_cffi/hooks","issue_events_url":"https://api.github.com/repos/CTPUG/pygame_cffi/issues/events{/number}","events_url":"https://api.github.com/repos/CTPUG/pygame_cffi/events","assignees_url":"https://api.github.com/repos/CTPUG/pygame_cffi/assignees{/user}","branches_url":"https://api.github.com/repos/CTPUG/pygame_cffi/branches{/branch}","tags_url":"https://api.github.com/repos/CTPUG/pygame_cffi/tags","blobs_url":"https://api.github.com/repos/CTPUG/pygame_cffi/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/CTPUG/pygame_cffi/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/CTPUG/pygame_cffi/git/refs{/sha}","trees_url":"https://api.github.com/repos/CTPUG/pygame_cffi/git/trees{/sha}","statuses_url":"https://api.github.com/repos/CTPUG/pygame_cffi/statuses/{sha}","languages_url":"https://api.github.com/repos/CTPUG/pygame_cffi/languages","stargazers_url":"https://api.github.com/repos/CTPUG/pygame_cffi/stargazers","contributors_url":"https://api.github.com/repos/CTPUG/pygame_cffi/contributors","subscribers_url":"https://api.github.com/repos/CTPUG/pygame_cffi/subscribers","subscription_url":"https://api.github.com/repos/CTPUG/pygame_cffi/subscription","commits_url":"https://api.github.com/repos/CTPUG/pygame_cffi/commits{/sha}","git_commits_url":"https://api.github.com/repos/CTPUG/pygame_cffi/git/commits{/sha}","comments_url":"https://api.github.com/repos/CTPUG/pygame_cffi/comments{/number}","issue_comment_url":"https://api.github.com/repos/CTPUG/pygame_cffi/issues/comments{/number}","contents_url":"https://api.github.com/repos/CTPUG/pygame_cffi/contents/{+path}","compare_url":"https://api.github.com/repos/CTPUG/pygame_cffi/compare/{base}...{head}","merges_url":"https://api.github.com/repos/CTPUG/pygame_cffi/merges","archive_url":"https://api.github.com/repos/CTPUG/pygame_cffi/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/CTPUG/pygame_cffi/downloads","issues_url":"https://api.github.com/repos/CTPUG/pygame_cffi/issues{/number}","pulls_url":"https://api.github.com/repos/CTPUG/pygame_cffi/pulls{/number}","milestones_url":"https://api.github.com/repos/CTPUG/pygame_cffi/milestones{/number}","notifications_url":"https://api.github.com/repos/CTPUG/pygame_cffi/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/CTPUG/pygame_cffi/labels{/name}","releases_url":"https://api.github.com/repos/CTPUG/pygame_cffi/releases{/id}","created_at":"2013-12-06T16:40:01Z","updated_at":"2015-12-08T14:38:54Z","pushed_at":"2015-12-09T12:31:37Z","git_url":"git://github.com/CTPUG/pygame_cffi.git","ssh_url":"git@github.com:CTPUG/pygame_cffi.git","clone_url":"https://github.com/CTPUG/pygame_cffi.git","svn_url":"https://github.com/CTPUG/pygame_cffi","homepage":null,"size":1582,"stargazers_count":43,"watchers_count":43,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":8,"mirror_url":null,"open_issues_count":6,"forks":8,"open_issues":6,"watchers":43,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/CTPUG/pygame_cffi/pulls/37"},"html":{"href":"https://github.com/CTPUG/pygame_cffi/pull/37"},"issue":{"href":"https://api.github.com/repos/CTPUG/pygame_cffi/issues/37"},"comments":{"href":"https://api.github.com/repos/CTPUG/pygame_cffi/issues/37/comments"},"review_comments":{"href":"https://api.github.com/repos/CTPUG/pygame_cffi/pulls/37/comments"},"review_comment":{"href":"https://api.github.com/repos/CTPUG/pygame_cffi/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/CTPUG/pygame_cffi/pulls/37/commits"},"statuses":{"href":"https://api.github.com/repos/CTPUG/pygame_cffi/statuses/8a8ba71dbbc58cee6fb7cfd6c607363d5f0061be"}}}}