{"action":"created","comment":{"url":"https://api.github.com/repos/google/oauth2client/pulls/comments/79705410","id":79705410,"diff_hunk":"@@ -44,32 +44,31 @@ def get_http_object(*args, **kwargs):\n     return httplib2.Http(*args, **kwargs)\n \n \n-def inject_credentials(credentials, http, refresh_status_codes):\n-    \"\"\"Prepares an HTTP object's request method for auth.\n-\n-    Wraps HTTP requests with logic to catch auth failures (typically\n-    identified via a 401 status code). In the event of failure, tries\n-    to refresh the token used and then retry the original request.\n-\n-    Args:\n-        credentials: Credentials, the credentials used to identify\n-                     the authenticated user.\n-        http: httplib2.Http, an http object to be used to make\n-              auth requests.\n+class AuthorizedHttp(object):\n+    \"\"\"A httplib2.Http-like object that provides credentials to requests.\n+\n+    A new class is used because you can't create a new OAuth subclass of\n+    httplib2.Authentication because it never gets passed the absolute URI,\n+    which is needed for signing. So instead we have to overload 'request'\n+    and add in the Authorization header and then calls the original\n+    version of :func:`request`.\n     \"\"\"\n-    orig_request_method = http.request\n+    def __init__(self, http, credentials, refresh_status_codes):\n+        self.http = http\n+        self.credentials = credentials\n+        self.refresh_status_codes = refresh_status_codes","path":"oauth2client/transport/httplib2.py","position":29,"original_position":29,"commit_id":"04632f29416728d42c6283e676ed4bba9373c526","original_commit_id":"04632f29416728d42c6283e676ed4bba9373c526","user":{"login":"jonparrott","id":250995,"avatar_url":"https://avatars.githubusercontent.com/u/250995?v=3","gravatar_id":"","url":"https://api.github.com/users/jonparrott","html_url":"https://github.com/jonparrott","followers_url":"https://api.github.com/users/jonparrott/followers","following_url":"https://api.github.com/users/jonparrott/following{/other_user}","gists_url":"https://api.github.com/users/jonparrott/gists{/gist_id}","starred_url":"https://api.github.com/users/jonparrott/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jonparrott/subscriptions","organizations_url":"https://api.github.com/users/jonparrott/orgs","repos_url":"https://api.github.com/users/jonparrott/repos","events_url":"https://api.github.com/users/jonparrott/events{/privacy}","received_events_url":"https://api.github.com/users/jonparrott/received_events","type":"User","site_admin":false},"body":"@dhermes yep, it does. I actually only noticed one test that does this. Anyways, now instead of `http.request.credentials` you can just use `http.credentials`.","created_at":"2016-09-20T20:33:58Z","updated_at":"2016-09-20T20:33:58Z","html_url":"https://github.com/google/oauth2client/pull/653#discussion_r79705410","pull_request_url":"https://api.github.com/repos/google/oauth2client/pulls/653","_links":{"self":{"href":"https://api.github.com/repos/google/oauth2client/pulls/comments/79705410"},"html":{"href":"https://github.com/google/oauth2client/pull/653#discussion_r79705410"},"pull_request":{"href":"https://api.github.com/repos/google/oauth2client/pulls/653"}}},"pull_request":{"url":"https://api.github.com/repos/google/oauth2client/pulls/653","id":86045350,"html_url":"https://github.com/google/oauth2client/pull/653","diff_url":"https://github.com/google/oauth2client/pull/653.diff","patch_url":"https://github.com/google/oauth2client/pull/653.patch","issue_url":"https://api.github.com/repos/google/oauth2client/issues/653","number":653,"state":"open","locked":false,"title":"Remove httplib2 monkeypatching","user":{"login":"jonparrott","id":250995,"avatar_url":"https://avatars.githubusercontent.com/u/250995?v=3","gravatar_id":"","url":"https://api.github.com/users/jonparrott","html_url":"https://github.com/jonparrott","followers_url":"https://api.github.com/users/jonparrott/followers","following_url":"https://api.github.com/users/jonparrott/following{/other_user}","gists_url":"https://api.github.com/users/jonparrott/gists{/gist_id}","starred_url":"https://api.github.com/users/jonparrott/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jonparrott/subscriptions","organizations_url":"https://api.github.com/users/jonparrott/orgs","repos_url":"https://api.github.com/users/jonparrott/repos","events_url":"https://api.github.com/users/jonparrott/events{/privacy}","received_events_url":"https://api.github.com/users/jonparrott/received_events","type":"User","site_admin":false},"body":"Additionally:\r\n\r\n* Update `credentials.authorize` docstring to fit new behavior.\r\n* Rename `inject_credentials` to `make_authorized_http`.","created_at":"2016-09-20T19:57:47Z","updated_at":"2016-09-20T20:33:58Z","closed_at":null,"merged_at":null,"merge_commit_sha":"1a97419242b8fce8fbd0c99319dd5a22cea019b6","assignee":{"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},"assignees":[{"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},{"login":"nathanielmanistaatgoogle","id":10131044,"avatar_url":"https://avatars.githubusercontent.com/u/10131044?v=3","gravatar_id":"","url":"https://api.github.com/users/nathanielmanistaatgoogle","html_url":"https://github.com/nathanielmanistaatgoogle","followers_url":"https://api.github.com/users/nathanielmanistaatgoogle/followers","following_url":"https://api.github.com/users/nathanielmanistaatgoogle/following{/other_user}","gists_url":"https://api.github.com/users/nathanielmanistaatgoogle/gists{/gist_id}","starred_url":"https://api.github.com/users/nathanielmanistaatgoogle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nathanielmanistaatgoogle/subscriptions","organizations_url":"https://api.github.com/users/nathanielmanistaatgoogle/orgs","repos_url":"https://api.github.com/users/nathanielmanistaatgoogle/repos","events_url":"https://api.github.com/users/nathanielmanistaatgoogle/events{/privacy}","received_events_url":"https://api.github.com/users/nathanielmanistaatgoogle/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/google/oauth2client/pulls/653/commits","review_comments_url":"https://api.github.com/repos/google/oauth2client/pulls/653/comments","review_comment_url":"https://api.github.com/repos/google/oauth2client/pulls/comments{/number}","comments_url":"https://api.github.com/repos/google/oauth2client/issues/653/comments","statuses_url":"https://api.github.com/repos/google/oauth2client/statuses/04632f29416728d42c6283e676ed4bba9373c526","head":{"label":"jonparrott:tr-3-http-wrap","ref":"tr-3-http-wrap","sha":"04632f29416728d42c6283e676ed4bba9373c526","user":{"login":"jonparrott","id":250995,"avatar_url":"https://avatars.githubusercontent.com/u/250995?v=3","gravatar_id":"","url":"https://api.github.com/users/jonparrott","html_url":"https://github.com/jonparrott","followers_url":"https://api.github.com/users/jonparrott/followers","following_url":"https://api.github.com/users/jonparrott/following{/other_user}","gists_url":"https://api.github.com/users/jonparrott/gists{/gist_id}","starred_url":"https://api.github.com/users/jonparrott/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jonparrott/subscriptions","organizations_url":"https://api.github.com/users/jonparrott/orgs","repos_url":"https://api.github.com/users/jonparrott/repos","events_url":"https://api.github.com/users/jonparrott/events{/privacy}","received_events_url":"https://api.github.com/users/jonparrott/received_events","type":"User","site_admin":false},"repo":{"id":35853207,"name":"oauth2client","full_name":"jonparrott/oauth2client","owner":{"login":"jonparrott","id":250995,"avatar_url":"https://avatars.githubusercontent.com/u/250995?v=3","gravatar_id":"","url":"https://api.github.com/users/jonparrott","html_url":"https://github.com/jonparrott","followers_url":"https://api.github.com/users/jonparrott/followers","following_url":"https://api.github.com/users/jonparrott/following{/other_user}","gists_url":"https://api.github.com/users/jonparrott/gists{/gist_id}","starred_url":"https://api.github.com/users/jonparrott/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jonparrott/subscriptions","organizations_url":"https://api.github.com/users/jonparrott/orgs","repos_url":"https://api.github.com/users/jonparrott/repos","events_url":"https://api.github.com/users/jonparrott/events{/privacy}","received_events_url":"https://api.github.com/users/jonparrott/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jonparrott/oauth2client","description":"This is a python library for accessing resources protected by OAuth 2.0.","fork":true,"url":"https://api.github.com/repos/jonparrott/oauth2client","forks_url":"https://api.github.com/repos/jonparrott/oauth2client/forks","keys_url":"https://api.github.com/repos/jonparrott/oauth2client/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jonparrott/oauth2client/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jonparrott/oauth2client/teams","hooks_url":"https://api.github.com/repos/jonparrott/oauth2client/hooks","issue_events_url":"https://api.github.com/repos/jonparrott/oauth2client/issues/events{/number}","events_url":"https://api.github.com/repos/jonparrott/oauth2client/events","assignees_url":"https://api.github.com/repos/jonparrott/oauth2client/assignees{/user}","branches_url":"https://api.github.com/repos/jonparrott/oauth2client/branches{/branch}","tags_url":"https://api.github.com/repos/jonparrott/oauth2client/tags","blobs_url":"https://api.github.com/repos/jonparrott/oauth2client/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jonparrott/oauth2client/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jonparrott/oauth2client/git/refs{/sha}","trees_url":"https://api.github.com/repos/jonparrott/oauth2client/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jonparrott/oauth2client/statuses/{sha}","languages_url":"https://api.github.com/repos/jonparrott/oauth2client/languages","stargazers_url":"https://api.github.com/repos/jonparrott/oauth2client/stargazers","contributors_url":"https://api.github.com/repos/jonparrott/oauth2client/contributors","subscribers_url":"https://api.github.com/repos/jonparrott/oauth2client/subscribers","subscription_url":"https://api.github.com/repos/jonparrott/oauth2client/subscription","commits_url":"https://api.github.com/repos/jonparrott/oauth2client/commits{/sha}","git_commits_url":"https://api.github.com/repos/jonparrott/oauth2client/git/commits{/sha}","comments_url":"https://api.github.com/repos/jonparrott/oauth2client/comments{/number}","issue_comment_url":"https://api.github.com/repos/jonparrott/oauth2client/issues/comments{/number}","contents_url":"https://api.github.com/repos/jonparrott/oauth2client/contents/{+path}","compare_url":"https://api.github.com/repos/jonparrott/oauth2client/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jonparrott/oauth2client/merges","archive_url":"https://api.github.com/repos/jonparrott/oauth2client/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jonparrott/oauth2client/downloads","issues_url":"https://api.github.com/repos/jonparrott/oauth2client/issues{/number}","pulls_url":"https://api.github.com/repos/jonparrott/oauth2client/pulls{/number}","milestones_url":"https://api.github.com/repos/jonparrott/oauth2client/milestones{/number}","notifications_url":"https://api.github.com/repos/jonparrott/oauth2client/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jonparrott/oauth2client/labels{/name}","releases_url":"https://api.github.com/repos/jonparrott/oauth2client/releases{/id}","deployments_url":"https://api.github.com/repos/jonparrott/oauth2client/deployments","created_at":"2015-05-19T01:57:46Z","updated_at":"2016-01-11T17:32:07Z","pushed_at":"2016-09-20T20:02:48Z","git_url":"git://github.com/jonparrott/oauth2client.git","ssh_url":"git@github.com:jonparrott/oauth2client.git","clone_url":"https://github.com/jonparrott/oauth2client.git","svn_url":"https://github.com/jonparrott/oauth2client","homepage":"","size":23573,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":false,"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":"google:transport-refactor","ref":"transport-refactor","sha":"c3db8893e848cbe3f83a855b063db1ca75b7ffb3","user":{"login":"google","id":1342004,"avatar_url":"https://avatars.githubusercontent.com/u/1342004?v=3","gravatar_id":"","url":"https://api.github.com/users/google","html_url":"https://github.com/google","followers_url":"https://api.github.com/users/google/followers","following_url":"https://api.github.com/users/google/following{/other_user}","gists_url":"https://api.github.com/users/google/gists{/gist_id}","starred_url":"https://api.github.com/users/google/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/google/subscriptions","organizations_url":"https://api.github.com/users/google/orgs","repos_url":"https://api.github.com/users/google/repos","events_url":"https://api.github.com/users/google/events{/privacy}","received_events_url":"https://api.github.com/users/google/received_events","type":"Organization","site_admin":false},"repo":{"id":14211461,"name":"oauth2client","full_name":"google/oauth2client","owner":{"login":"google","id":1342004,"avatar_url":"https://avatars.githubusercontent.com/u/1342004?v=3","gravatar_id":"","url":"https://api.github.com/users/google","html_url":"https://github.com/google","followers_url":"https://api.github.com/users/google/followers","following_url":"https://api.github.com/users/google/following{/other_user}","gists_url":"https://api.github.com/users/google/gists{/gist_id}","starred_url":"https://api.github.com/users/google/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/google/subscriptions","organizations_url":"https://api.github.com/users/google/orgs","repos_url":"https://api.github.com/users/google/repos","events_url":"https://api.github.com/users/google/events{/privacy}","received_events_url":"https://api.github.com/users/google/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/google/oauth2client","description":"This is a Python library for accessing resources protected by OAuth 2.0.","fork":false,"url":"https://api.github.com/repos/google/oauth2client","forks_url":"https://api.github.com/repos/google/oauth2client/forks","keys_url":"https://api.github.com/repos/google/oauth2client/keys{/key_id}","collaborators_url":"https://api.github.com/repos/google/oauth2client/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/google/oauth2client/teams","hooks_url":"https://api.github.com/repos/google/oauth2client/hooks","issue_events_url":"https://api.github.com/repos/google/oauth2client/issues/events{/number}","events_url":"https://api.github.com/repos/google/oauth2client/events","assignees_url":"https://api.github.com/repos/google/oauth2client/assignees{/user}","branches_url":"https://api.github.com/repos/google/oauth2client/branches{/branch}","tags_url":"https://api.github.com/repos/google/oauth2client/tags","blobs_url":"https://api.github.com/repos/google/oauth2client/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/google/oauth2client/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/google/oauth2client/git/refs{/sha}","trees_url":"https://api.github.com/repos/google/oauth2client/git/trees{/sha}","statuses_url":"https://api.github.com/repos/google/oauth2client/statuses/{sha}","languages_url":"https://api.github.com/repos/google/oauth2client/languages","stargazers_url":"https://api.github.com/repos/google/oauth2client/stargazers","contributors_url":"https://api.github.com/repos/google/oauth2client/contributors","subscribers_url":"https://api.github.com/repos/google/oauth2client/subscribers","subscription_url":"https://api.github.com/repos/google/oauth2client/subscription","commits_url":"https://api.github.com/repos/google/oauth2client/commits{/sha}","git_commits_url":"https://api.github.com/repos/google/oauth2client/git/commits{/sha}","comments_url":"https://api.github.com/repos/google/oauth2client/comments{/number}","issue_comment_url":"https://api.github.com/repos/google/oauth2client/issues/comments{/number}","contents_url":"https://api.github.com/repos/google/oauth2client/contents/{+path}","compare_url":"https://api.github.com/repos/google/oauth2client/compare/{base}...{head}","merges_url":"https://api.github.com/repos/google/oauth2client/merges","archive_url":"https://api.github.com/repos/google/oauth2client/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/google/oauth2client/downloads","issues_url":"https://api.github.com/repos/google/oauth2client/issues{/number}","pulls_url":"https://api.github.com/repos/google/oauth2client/pulls{/number}","milestones_url":"https://api.github.com/repos/google/oauth2client/milestones{/number}","notifications_url":"https://api.github.com/repos/google/oauth2client/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/google/oauth2client/labels{/name}","releases_url":"https://api.github.com/repos/google/oauth2client/releases{/id}","deployments_url":"https://api.github.com/repos/google/oauth2client/deployments","created_at":"2013-11-07T18:03:04Z","updated_at":"2016-09-19T23:30:24Z","pushed_at":"2016-09-20T20:02:49Z","git_url":"git://github.com/google/oauth2client.git","ssh_url":"git@github.com:google/oauth2client.git","clone_url":"https://github.com/google/oauth2client.git","svn_url":"https://github.com/google/oauth2client","homepage":"","size":25058,"stargazers_count":436,"watchers_count":436,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":225,"mirror_url":null,"open_issues_count":83,"forks":225,"open_issues":83,"watchers":436,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/google/oauth2client/pulls/653"},"html":{"href":"https://github.com/google/oauth2client/pull/653"},"issue":{"href":"https://api.github.com/repos/google/oauth2client/issues/653"},"comments":{"href":"https://api.github.com/repos/google/oauth2client/issues/653/comments"},"review_comments":{"href":"https://api.github.com/repos/google/oauth2client/pulls/653/comments"},"review_comment":{"href":"https://api.github.com/repos/google/oauth2client/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/google/oauth2client/pulls/653/commits"},"statuses":{"href":"https://api.github.com/repos/google/oauth2client/statuses/04632f29416728d42c6283e676ed4bba9373c526"}}}}
{"actor":{"display_login":"jonparrott"}}