{"action":"created","issue":{"url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-python/issues/675","labels_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-python/issues/675/labels{/name}","comments_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-python/issues/675/comments","events_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-python/issues/675/events","html_url":"https://github.com/GoogleCloudPlatform/gcloud-python/pull/675","id":58447233,"number":675,"title":"Fix py2->3 string issues","user":{"login":"foozlevazquez","id":1350902,"avatar_url":"https://avatars.githubusercontent.com/u/1350902?v=3","gravatar_id":"","url":"https://api.github.com/users/foozlevazquez","html_url":"https://github.com/foozlevazquez","followers_url":"https://api.github.com/users/foozlevazquez/followers","following_url":"https://api.github.com/users/foozlevazquez/following{/other_user}","gists_url":"https://api.github.com/users/foozlevazquez/gists{/gist_id}","starred_url":"https://api.github.com/users/foozlevazquez/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/foozlevazquez/subscriptions","organizations_url":"https://api.github.com/users/foozlevazquez/orgs","repos_url":"https://api.github.com/users/foozlevazquez/repos","events_url":"https://api.github.com/users/foozlevazquez/events{/privacy}","received_events_url":"https://api.github.com/users/foozlevazquez/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-python/labels/cla:%20yes","name":"cla: yes","color":"009800"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-02-21T07:00:27Z","updated_at":"2015-02-21T23:07:14Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-python/pulls/675","html_url":"https://github.com/GoogleCloudPlatform/gcloud-python/pull/675","diff_url":"https://github.com/GoogleCloudPlatform/gcloud-python/pull/675.diff","patch_url":"https://github.com/GoogleCloudPlatform/gcloud-python/pull/675.patch"},"body":"* Handle exceptions with binary string content. Added test.\r\n* Handle api_requests with binary content correctly in Python 3. Added test."},"comment":{"url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-python/issues/comments/75398315","html_url":"https://github.com/GoogleCloudPlatform/gcloud-python/pull/675#issuecomment-75398315","issue_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-python/issues/675","id":75398315,"user":{"login":"dhermes","id":520669,"avatar_url":"https://avatars.githubusercontent.com/u/520669?v=3","gravatar_id":"","url":"https://api.github.com/users/dhermes","html_url":"https://github.com/dhermes","followers_url":"https://api.github.com/users/dhermes/followers","following_url":"https://api.github.com/users/dhermes/following{/other_user}","gists_url":"https://api.github.com/users/dhermes/gists{/gist_id}","starred_url":"https://api.github.com/users/dhermes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dhermes/subscriptions","organizations_url":"https://api.github.com/users/dhermes/orgs","repos_url":"https://api.github.com/users/dhermes/repos","events_url":"https://api.github.com/users/dhermes/events{/privacy}","received_events_url":"https://api.github.com/users/dhermes/received_events","type":"User","site_admin":false},"created_at":"2015-02-21T23:07:14Z","updated_at":"2015-02-21T23:07:14Z","body":"It's unclear which of these fixes were needed.\r\n\r\nThere are only two uses of `http.request` in our code:\r\n\r\n```\r\n$ git log -1 --pretty=%H  # Current HEAD\r\n56f60bb94b313c397f5aeadee1f0e1f6e5b5290c\r\n$ git grep -n 'http\\.request' | egrep -v test | egrep -v -e '^_gcloud_vendor'\r\ngcloud/datastore/connection.py:80:        headers, content = self.http.request(\r\ngcloud/storage/connection.py:169:        return self.http.request(uri=url, method=method, headers=headers,\r\n```\r\n\r\nThe auth issue should be fixed upstream in `oauth2client`.\r\n\r\nThe only change here is one in `storage.Connection` but it doesn't seem to address the headers.\r\n\r\nWDYT? How did you determine these fixes were needed? (FWIW the `isinstance(content, six.string_types)` is needed.)"}}