{"action":"created","comment":{"url":"https://api.github.com/repos/fedora-infra/python-fedora/pulls/comments/41571038","id":41571038,"diff_hunk":"@@ -154,6 +160,20 @@ def __init__(self, base_url, login_url=None, useragent=None, debug=False,\n \n         # python-requests session.  Holds onto cookies\n         self._session = requests.session()\n+\n+        # Also hold on to retry logic.\n+        # http://www.coglib.com/~icordasc/blog/2014/12/retries-in-requests.html\n+        if retries is not None:\n+            prefixes = ['http://', 'https://']\n+            for prefix in prefixes:\n+                self._session.mount(prefix, requests.adapters.HTTPAdapter(\n+                    max_retries=Retry(\n+                        total=retries,\n+                        status_forcelist=[500],\n+                        backoff_factor=retry_backoff_factor,\n+                    ),\n+                ))\n+","path":"fedora/client/openidbaseclient.py","position":48,"original_position":48,"commit_id":"1dbbd816c7272f05ddf264c6ffd9e726b5552e2b","original_commit_id":"1dbbd816c7272f05ddf264c6ffd9e726b5552e2b","user":{"login":"ralphbean","id":331338,"avatar_url":"https://avatars.githubusercontent.com/u/331338?v=3","gravatar_id":"","url":"https://api.github.com/users/ralphbean","html_url":"https://github.com/ralphbean","followers_url":"https://api.github.com/users/ralphbean/followers","following_url":"https://api.github.com/users/ralphbean/following{/other_user}","gists_url":"https://api.github.com/users/ralphbean/gists{/gist_id}","starred_url":"https://api.github.com/users/ralphbean/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ralphbean/subscriptions","organizations_url":"https://api.github.com/users/ralphbean/orgs","repos_url":"https://api.github.com/users/ralphbean/repos","events_url":"https://api.github.com/users/ralphbean/events{/privacy}","received_events_url":"https://api.github.com/users/ralphbean/received_events","type":"User","site_admin":false},"body":"Correct! Which is different than how #152 does it.  the requests API kind of imposes that on us, given how you mount an Adapter on the session, but I like it in terms of the python-fedora API too.  it's more simple.","created_at":"2015-10-08T21:24:24Z","updated_at":"2015-10-08T21:24:24Z","html_url":"https://github.com/fedora-infra/python-fedora/pull/153#discussion_r41571038","pull_request_url":"https://api.github.com/repos/fedora-infra/python-fedora/pulls/153","_links":{"self":{"href":"https://api.github.com/repos/fedora-infra/python-fedora/pulls/comments/41571038"},"html":{"href":"https://github.com/fedora-infra/python-fedora/pull/153#discussion_r41571038"},"pull_request":{"href":"https://api.github.com/repos/fedora-infra/python-fedora/pulls/153"}}},"pull_request":{"url":"https://api.github.com/repos/fedora-infra/python-fedora/pulls/153","id":47199149,"html_url":"https://github.com/fedora-infra/python-fedora/pull/153","diff_url":"https://github.com/fedora-infra/python-fedora/pull/153.diff","patch_url":"https://github.com/fedora-infra/python-fedora/pull/153.patch","issue_url":"https://api.github.com/repos/fedora-infra/python-fedora/issues/153","number":153,"state":"open","locked":false,"title":"Use requests HTTPAdapters to specify retry logic.","user":{"login":"ralphbean","id":331338,"avatar_url":"https://avatars.githubusercontent.com/u/331338?v=3","gravatar_id":"","url":"https://api.github.com/users/ralphbean","html_url":"https://github.com/ralphbean","followers_url":"https://api.github.com/users/ralphbean/followers","following_url":"https://api.github.com/users/ralphbean/following{/other_user}","gists_url":"https://api.github.com/users/ralphbean/gists{/gist_id}","starred_url":"https://api.github.com/users/ralphbean/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ralphbean/subscriptions","organizations_url":"https://api.github.com/users/ralphbean/orgs","repos_url":"https://api.github.com/users/ralphbean/repos","events_url":"https://api.github.com/users/ralphbean/events{/privacy}","received_events_url":"https://api.github.com/users/ralphbean/received_events","type":"User","site_admin":false},"body":"This is way more simple that #152.\n\nDefinitely pull this down and try it to see if it works.","created_at":"2015-10-08T20:01:30Z","updated_at":"2015-10-08T21:24:24Z","closed_at":null,"merged_at":null,"merge_commit_sha":"70aafdc99dd5995333f989b2bb70064fd089d13d","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/fedora-infra/python-fedora/pulls/153/commits","review_comments_url":"https://api.github.com/repos/fedora-infra/python-fedora/pulls/153/comments","review_comment_url":"https://api.github.com/repos/fedora-infra/python-fedora/pulls/comments{/number}","comments_url":"https://api.github.com/repos/fedora-infra/python-fedora/issues/153/comments","statuses_url":"https://api.github.com/repos/fedora-infra/python-fedora/statuses/1dbbd816c7272f05ddf264c6ffd9e726b5552e2b","head":{"label":"fedora-infra:feature/retry_on_timeout2","ref":"feature/retry_on_timeout2","sha":"1dbbd816c7272f05ddf264c6ffd9e726b5552e2b","user":{"login":"fedora-infra","id":3316637,"avatar_url":"https://avatars.githubusercontent.com/u/3316637?v=3","gravatar_id":"","url":"https://api.github.com/users/fedora-infra","html_url":"https://github.com/fedora-infra","followers_url":"https://api.github.com/users/fedora-infra/followers","following_url":"https://api.github.com/users/fedora-infra/following{/other_user}","gists_url":"https://api.github.com/users/fedora-infra/gists{/gist_id}","starred_url":"https://api.github.com/users/fedora-infra/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fedora-infra/subscriptions","organizations_url":"https://api.github.com/users/fedora-infra/orgs","repos_url":"https://api.github.com/users/fedora-infra/repos","events_url":"https://api.github.com/users/fedora-infra/events{/privacy}","received_events_url":"https://api.github.com/users/fedora-infra/received_events","type":"Organization","site_admin":false},"repo":{"id":7708613,"name":"python-fedora","full_name":"fedora-infra/python-fedora","owner":{"login":"fedora-infra","id":3316637,"avatar_url":"https://avatars.githubusercontent.com/u/3316637?v=3","gravatar_id":"","url":"https://api.github.com/users/fedora-infra","html_url":"https://github.com/fedora-infra","followers_url":"https://api.github.com/users/fedora-infra/followers","following_url":"https://api.github.com/users/fedora-infra/following{/other_user}","gists_url":"https://api.github.com/users/fedora-infra/gists{/gist_id}","starred_url":"https://api.github.com/users/fedora-infra/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fedora-infra/subscriptions","organizations_url":"https://api.github.com/users/fedora-infra/orgs","repos_url":"https://api.github.com/users/fedora-infra/repos","events_url":"https://api.github.com/users/fedora-infra/events{/privacy}","received_events_url":"https://api.github.com/users/fedora-infra/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/fedora-infra/python-fedora","description":"A Python library for interacting with, and connecting to, Fedora services.","fork":false,"url":"https://api.github.com/repos/fedora-infra/python-fedora","forks_url":"https://api.github.com/repos/fedora-infra/python-fedora/forks","keys_url":"https://api.github.com/repos/fedora-infra/python-fedora/keys{/key_id}","collaborators_url":"https://api.github.com/repos/fedora-infra/python-fedora/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/fedora-infra/python-fedora/teams","hooks_url":"https://api.github.com/repos/fedora-infra/python-fedora/hooks","issue_events_url":"https://api.github.com/repos/fedora-infra/python-fedora/issues/events{/number}","events_url":"https://api.github.com/repos/fedora-infra/python-fedora/events","assignees_url":"https://api.github.com/repos/fedora-infra/python-fedora/assignees{/user}","branches_url":"https://api.github.com/repos/fedora-infra/python-fedora/branches{/branch}","tags_url":"https://api.github.com/repos/fedora-infra/python-fedora/tags","blobs_url":"https://api.github.com/repos/fedora-infra/python-fedora/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/fedora-infra/python-fedora/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/fedora-infra/python-fedora/git/refs{/sha}","trees_url":"https://api.github.com/repos/fedora-infra/python-fedora/git/trees{/sha}","statuses_url":"https://api.github.com/repos/fedora-infra/python-fedora/statuses/{sha}","languages_url":"https://api.github.com/repos/fedora-infra/python-fedora/languages","stargazers_url":"https://api.github.com/repos/fedora-infra/python-fedora/stargazers","contributors_url":"https://api.github.com/repos/fedora-infra/python-fedora/contributors","subscribers_url":"https://api.github.com/repos/fedora-infra/python-fedora/subscribers","subscription_url":"https://api.github.com/repos/fedora-infra/python-fedora/subscription","commits_url":"https://api.github.com/repos/fedora-infra/python-fedora/commits{/sha}","git_commits_url":"https://api.github.com/repos/fedora-infra/python-fedora/git/commits{/sha}","comments_url":"https://api.github.com/repos/fedora-infra/python-fedora/comments{/number}","issue_comment_url":"https://api.github.com/repos/fedora-infra/python-fedora/issues/comments{/number}","contents_url":"https://api.github.com/repos/fedora-infra/python-fedora/contents/{+path}","compare_url":"https://api.github.com/repos/fedora-infra/python-fedora/compare/{base}...{head}","merges_url":"https://api.github.com/repos/fedora-infra/python-fedora/merges","archive_url":"https://api.github.com/repos/fedora-infra/python-fedora/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/fedora-infra/python-fedora/downloads","issues_url":"https://api.github.com/repos/fedora-infra/python-fedora/issues{/number}","pulls_url":"https://api.github.com/repos/fedora-infra/python-fedora/pulls{/number}","milestones_url":"https://api.github.com/repos/fedora-infra/python-fedora/milestones{/number}","notifications_url":"https://api.github.com/repos/fedora-infra/python-fedora/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/fedora-infra/python-fedora/labels{/name}","releases_url":"https://api.github.com/repos/fedora-infra/python-fedora/releases{/id}","created_at":"2013-01-19T20:48:42Z","updated_at":"2015-09-09T07:47:05Z","pushed_at":"2015-10-08T20:03:53Z","git_url":"git://github.com/fedora-infra/python-fedora.git","ssh_url":"git@github.com:fedora-infra/python-fedora.git","clone_url":"https://github.com/fedora-infra/python-fedora.git","svn_url":"https://github.com/fedora-infra/python-fedora","homepage":"","size":5276,"stargazers_count":17,"watchers_count":17,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":15,"mirror_url":null,"open_issues_count":6,"forks":15,"open_issues":6,"watchers":17,"default_branch":"develop"}},"base":{"label":"fedora-infra:develop","ref":"develop","sha":"ae70a77830bf8d7565398dfa1a5b4f1f8861851a","user":{"login":"fedora-infra","id":3316637,"avatar_url":"https://avatars.githubusercontent.com/u/3316637?v=3","gravatar_id":"","url":"https://api.github.com/users/fedora-infra","html_url":"https://github.com/fedora-infra","followers_url":"https://api.github.com/users/fedora-infra/followers","following_url":"https://api.github.com/users/fedora-infra/following{/other_user}","gists_url":"https://api.github.com/users/fedora-infra/gists{/gist_id}","starred_url":"https://api.github.com/users/fedora-infra/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fedora-infra/subscriptions","organizations_url":"https://api.github.com/users/fedora-infra/orgs","repos_url":"https://api.github.com/users/fedora-infra/repos","events_url":"https://api.github.com/users/fedora-infra/events{/privacy}","received_events_url":"https://api.github.com/users/fedora-infra/received_events","type":"Organization","site_admin":false},"repo":{"id":7708613,"name":"python-fedora","full_name":"fedora-infra/python-fedora","owner":{"login":"fedora-infra","id":3316637,"avatar_url":"https://avatars.githubusercontent.com/u/3316637?v=3","gravatar_id":"","url":"https://api.github.com/users/fedora-infra","html_url":"https://github.com/fedora-infra","followers_url":"https://api.github.com/users/fedora-infra/followers","following_url":"https://api.github.com/users/fedora-infra/following{/other_user}","gists_url":"https://api.github.com/users/fedora-infra/gists{/gist_id}","starred_url":"https://api.github.com/users/fedora-infra/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fedora-infra/subscriptions","organizations_url":"https://api.github.com/users/fedora-infra/orgs","repos_url":"https://api.github.com/users/fedora-infra/repos","events_url":"https://api.github.com/users/fedora-infra/events{/privacy}","received_events_url":"https://api.github.com/users/fedora-infra/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/fedora-infra/python-fedora","description":"A Python library for interacting with, and connecting to, Fedora services.","fork":false,"url":"https://api.github.com/repos/fedora-infra/python-fedora","forks_url":"https://api.github.com/repos/fedora-infra/python-fedora/forks","keys_url":"https://api.github.com/repos/fedora-infra/python-fedora/keys{/key_id}","collaborators_url":"https://api.github.com/repos/fedora-infra/python-fedora/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/fedora-infra/python-fedora/teams","hooks_url":"https://api.github.com/repos/fedora-infra/python-fedora/hooks","issue_events_url":"https://api.github.com/repos/fedora-infra/python-fedora/issues/events{/number}","events_url":"https://api.github.com/repos/fedora-infra/python-fedora/events","assignees_url":"https://api.github.com/repos/fedora-infra/python-fedora/assignees{/user}","branches_url":"https://api.github.com/repos/fedora-infra/python-fedora/branches{/branch}","tags_url":"https://api.github.com/repos/fedora-infra/python-fedora/tags","blobs_url":"https://api.github.com/repos/fedora-infra/python-fedora/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/fedora-infra/python-fedora/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/fedora-infra/python-fedora/git/refs{/sha}","trees_url":"https://api.github.com/repos/fedora-infra/python-fedora/git/trees{/sha}","statuses_url":"https://api.github.com/repos/fedora-infra/python-fedora/statuses/{sha}","languages_url":"https://api.github.com/repos/fedora-infra/python-fedora/languages","stargazers_url":"https://api.github.com/repos/fedora-infra/python-fedora/stargazers","contributors_url":"https://api.github.com/repos/fedora-infra/python-fedora/contributors","subscribers_url":"https://api.github.com/repos/fedora-infra/python-fedora/subscribers","subscription_url":"https://api.github.com/repos/fedora-infra/python-fedora/subscription","commits_url":"https://api.github.com/repos/fedora-infra/python-fedora/commits{/sha}","git_commits_url":"https://api.github.com/repos/fedora-infra/python-fedora/git/commits{/sha}","comments_url":"https://api.github.com/repos/fedora-infra/python-fedora/comments{/number}","issue_comment_url":"https://api.github.com/repos/fedora-infra/python-fedora/issues/comments{/number}","contents_url":"https://api.github.com/repos/fedora-infra/python-fedora/contents/{+path}","compare_url":"https://api.github.com/repos/fedora-infra/python-fedora/compare/{base}...{head}","merges_url":"https://api.github.com/repos/fedora-infra/python-fedora/merges","archive_url":"https://api.github.com/repos/fedora-infra/python-fedora/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/fedora-infra/python-fedora/downloads","issues_url":"https://api.github.com/repos/fedora-infra/python-fedora/issues{/number}","pulls_url":"https://api.github.com/repos/fedora-infra/python-fedora/pulls{/number}","milestones_url":"https://api.github.com/repos/fedora-infra/python-fedora/milestones{/number}","notifications_url":"https://api.github.com/repos/fedora-infra/python-fedora/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/fedora-infra/python-fedora/labels{/name}","releases_url":"https://api.github.com/repos/fedora-infra/python-fedora/releases{/id}","created_at":"2013-01-19T20:48:42Z","updated_at":"2015-09-09T07:47:05Z","pushed_at":"2015-10-08T20:03:53Z","git_url":"git://github.com/fedora-infra/python-fedora.git","ssh_url":"git@github.com:fedora-infra/python-fedora.git","clone_url":"https://github.com/fedora-infra/python-fedora.git","svn_url":"https://github.com/fedora-infra/python-fedora","homepage":"","size":5276,"stargazers_count":17,"watchers_count":17,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":15,"mirror_url":null,"open_issues_count":6,"forks":15,"open_issues":6,"watchers":17,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/fedora-infra/python-fedora/pulls/153"},"html":{"href":"https://github.com/fedora-infra/python-fedora/pull/153"},"issue":{"href":"https://api.github.com/repos/fedora-infra/python-fedora/issues/153"},"comments":{"href":"https://api.github.com/repos/fedora-infra/python-fedora/issues/153/comments"},"review_comments":{"href":"https://api.github.com/repos/fedora-infra/python-fedora/pulls/153/comments"},"review_comment":{"href":"https://api.github.com/repos/fedora-infra/python-fedora/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/fedora-infra/python-fedora/pulls/153/commits"},"statuses":{"href":"https://api.github.com/repos/fedora-infra/python-fedora/statuses/1dbbd816c7272f05ddf264c6ffd9e726b5552e2b"}}}}