{"action":"created","comment":{"url":"https://api.github.com/repos/leapcode/leap_pycommon/pulls/comments/34372351","id":34372351,"diff_hunk":"@@ -76,17 +196,27 @@ def __init__(self, cert_file=None, pool=_pool):\n         :param pool: An optional dedicated connection pool to override the\n                      default shared one.\n         :type pool: HTTPConnectionPool\n+        :param timeout: The amount of time that this Agent will wait for the\n+                        peer to accept a connection and for each request to be\n+                        finished. If a pool is passed, then this argument is\n+                        ignored.\n+        :type timeout: float\n         \"\"\"\n \n         policy = get_compatible_ssl_context_factory(cert_file)\n \n+        if not pool:\n+            pool = createPool(timeout=timeout)\n+        self._pool = pool\n+        self._timeout = timeout","path":"src/leap/common/http.py","position":172,"original_position":172,"commit_id":"22c0313c25f002ebc6770eb1632dea8bb53d4cde","original_commit_id":"22c0313c25f002ebc6770eb1632dea8bb53d4cde","user":{"login":"andrejb","id":79672,"avatar_url":"https://avatars.githubusercontent.com/u/79672?v=3","gravatar_id":"","url":"https://api.github.com/users/andrejb","html_url":"https://github.com/andrejb","followers_url":"https://api.github.com/users/andrejb/followers","following_url":"https://api.github.com/users/andrejb/following{/other_user}","gists_url":"https://api.github.com/users/andrejb/gists{/gist_id}","starred_url":"https://api.github.com/users/andrejb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andrejb/subscriptions","organizations_url":"https://api.github.com/users/andrejb/orgs","repos_url":"https://api.github.com/users/andrejb/repos","events_url":"https://api.github.com/users/andrejb/events{/privacy}","received_events_url":"https://api.github.com/users/andrejb/received_events","type":"User","site_admin":false},"body":"Now that `_createPool()` is private method, we use `self._timeout` there.","created_at":"2015-07-10T16:41:05Z","updated_at":"2015-07-10T16:41:05Z","html_url":"https://github.com/leapcode/leap_pycommon/pull/107#discussion_r34372351","pull_request_url":"https://api.github.com/repos/leapcode/leap_pycommon/pulls/107","_links":{"self":{"href":"https://api.github.com/repos/leapcode/leap_pycommon/pulls/comments/34372351"},"html":{"href":"https://github.com/leapcode/leap_pycommon/pull/107#discussion_r34372351"},"pull_request":{"href":"https://api.github.com/repos/leapcode/leap_pycommon/pulls/107"}}},"pull_request":{"url":"https://api.github.com/repos/leapcode/leap_pycommon/pulls/107","id":39529924,"html_url":"https://github.com/leapcode/leap_pycommon/pull/107","diff_url":"https://github.com/leapcode/leap_pycommon/pull/107.diff","patch_url":"https://github.com/leapcode/leap_pycommon/pull/107.patch","issue_url":"https://api.github.com/repos/leapcode/leap_pycommon/issues/107","number":107,"state":"open","locked":false,"title":"Bug/7234 add http request timeout","user":{"login":"andrejb","id":79672,"avatar_url":"https://avatars.githubusercontent.com/u/79672?v=3","gravatar_id":"","url":"https://api.github.com/users/andrejb","html_url":"https://github.com/andrejb","followers_url":"https://api.github.com/users/andrejb/followers","following_url":"https://api.github.com/users/andrejb/following{/other_user}","gists_url":"https://api.github.com/users/andrejb/gists{/gist_id}","starred_url":"https://api.github.com/users/andrejb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andrejb/subscriptions","organizations_url":"https://api.github.com/users/andrejb/orgs","repos_url":"https://api.github.com/users/andrejb/repos","events_url":"https://api.github.com/users/andrejb/events{/privacy}","received_events_url":"https://api.github.com/users/andrejb/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-07-08T22:18:36Z","updated_at":"2015-07-10T16:41:05Z","closed_at":null,"merged_at":null,"merge_commit_sha":"44e729e4dfdf2df0e42cf332f46be347c34664f3","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/leapcode/leap_pycommon/pulls/107/commits","review_comments_url":"https://api.github.com/repos/leapcode/leap_pycommon/pulls/107/comments","review_comment_url":"https://api.github.com/repos/leapcode/leap_pycommon/pulls/comments{/number}","comments_url":"https://api.github.com/repos/leapcode/leap_pycommon/issues/107/comments","statuses_url":"https://api.github.com/repos/leapcode/leap_pycommon/statuses/22c0313c25f002ebc6770eb1632dea8bb53d4cde","head":{"label":"andrejb:bug/7234_add-http-request-timeout","ref":"bug/7234_add-http-request-timeout","sha":"22c0313c25f002ebc6770eb1632dea8bb53d4cde","user":{"login":"andrejb","id":79672,"avatar_url":"https://avatars.githubusercontent.com/u/79672?v=3","gravatar_id":"","url":"https://api.github.com/users/andrejb","html_url":"https://github.com/andrejb","followers_url":"https://api.github.com/users/andrejb/followers","following_url":"https://api.github.com/users/andrejb/following{/other_user}","gists_url":"https://api.github.com/users/andrejb/gists{/gist_id}","starred_url":"https://api.github.com/users/andrejb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andrejb/subscriptions","organizations_url":"https://api.github.com/users/andrejb/orgs","repos_url":"https://api.github.com/users/andrejb/repos","events_url":"https://api.github.com/users/andrejb/events{/privacy}","received_events_url":"https://api.github.com/users/andrejb/received_events","type":"User","site_admin":false},"repo":{"id":8959712,"name":"leap_pycommon","full_name":"andrejb/leap_pycommon","owner":{"login":"andrejb","id":79672,"avatar_url":"https://avatars.githubusercontent.com/u/79672?v=3","gravatar_id":"","url":"https://api.github.com/users/andrejb","html_url":"https://github.com/andrejb","followers_url":"https://api.github.com/users/andrejb/followers","following_url":"https://api.github.com/users/andrejb/following{/other_user}","gists_url":"https://api.github.com/users/andrejb/gists{/gist_id}","starred_url":"https://api.github.com/users/andrejb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andrejb/subscriptions","organizations_url":"https://api.github.com/users/andrejb/orgs","repos_url":"https://api.github.com/users/andrejb/repos","events_url":"https://api.github.com/users/andrejb/events{/privacy}","received_events_url":"https://api.github.com/users/andrejb/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/andrejb/leap_pycommon","description":"","fork":true,"url":"https://api.github.com/repos/andrejb/leap_pycommon","forks_url":"https://api.github.com/repos/andrejb/leap_pycommon/forks","keys_url":"https://api.github.com/repos/andrejb/leap_pycommon/keys{/key_id}","collaborators_url":"https://api.github.com/repos/andrejb/leap_pycommon/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/andrejb/leap_pycommon/teams","hooks_url":"https://api.github.com/repos/andrejb/leap_pycommon/hooks","issue_events_url":"https://api.github.com/repos/andrejb/leap_pycommon/issues/events{/number}","events_url":"https://api.github.com/repos/andrejb/leap_pycommon/events","assignees_url":"https://api.github.com/repos/andrejb/leap_pycommon/assignees{/user}","branches_url":"https://api.github.com/repos/andrejb/leap_pycommon/branches{/branch}","tags_url":"https://api.github.com/repos/andrejb/leap_pycommon/tags","blobs_url":"https://api.github.com/repos/andrejb/leap_pycommon/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/andrejb/leap_pycommon/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/andrejb/leap_pycommon/git/refs{/sha}","trees_url":"https://api.github.com/repos/andrejb/leap_pycommon/git/trees{/sha}","statuses_url":"https://api.github.com/repos/andrejb/leap_pycommon/statuses/{sha}","languages_url":"https://api.github.com/repos/andrejb/leap_pycommon/languages","stargazers_url":"https://api.github.com/repos/andrejb/leap_pycommon/stargazers","contributors_url":"https://api.github.com/repos/andrejb/leap_pycommon/contributors","subscribers_url":"https://api.github.com/repos/andrejb/leap_pycommon/subscribers","subscription_url":"https://api.github.com/repos/andrejb/leap_pycommon/subscription","commits_url":"https://api.github.com/repos/andrejb/leap_pycommon/commits{/sha}","git_commits_url":"https://api.github.com/repos/andrejb/leap_pycommon/git/commits{/sha}","comments_url":"https://api.github.com/repos/andrejb/leap_pycommon/comments{/number}","issue_comment_url":"https://api.github.com/repos/andrejb/leap_pycommon/issues/comments{/number}","contents_url":"https://api.github.com/repos/andrejb/leap_pycommon/contents/{+path}","compare_url":"https://api.github.com/repos/andrejb/leap_pycommon/compare/{base}...{head}","merges_url":"https://api.github.com/repos/andrejb/leap_pycommon/merges","archive_url":"https://api.github.com/repos/andrejb/leap_pycommon/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/andrejb/leap_pycommon/downloads","issues_url":"https://api.github.com/repos/andrejb/leap_pycommon/issues{/number}","pulls_url":"https://api.github.com/repos/andrejb/leap_pycommon/pulls{/number}","milestones_url":"https://api.github.com/repos/andrejb/leap_pycommon/milestones{/number}","notifications_url":"https://api.github.com/repos/andrejb/leap_pycommon/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/andrejb/leap_pycommon/labels{/name}","releases_url":"https://api.github.com/repos/andrejb/leap_pycommon/releases{/id}","created_at":"2013-03-22T19:54:17Z","updated_at":"2014-05-29T18:01:51Z","pushed_at":"2015-07-10T15:41:27Z","git_url":"git://github.com/andrejb/leap_pycommon.git","ssh_url":"git@github.com:andrejb/leap_pycommon.git","clone_url":"https://github.com/andrejb/leap_pycommon.git","svn_url":"https://github.com/andrejb/leap_pycommon","homepage":null,"size":895,"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":"develop"}},"base":{"label":"leapcode:develop","ref":"develop","sha":"10d7ebdf5226b74c54850d205a807cc650843efe","user":{"login":"leapcode","id":1700464,"avatar_url":"https://avatars.githubusercontent.com/u/1700464?v=3","gravatar_id":"","url":"https://api.github.com/users/leapcode","html_url":"https://github.com/leapcode","followers_url":"https://api.github.com/users/leapcode/followers","following_url":"https://api.github.com/users/leapcode/following{/other_user}","gists_url":"https://api.github.com/users/leapcode/gists{/gist_id}","starred_url":"https://api.github.com/users/leapcode/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/leapcode/subscriptions","organizations_url":"https://api.github.com/users/leapcode/orgs","repos_url":"https://api.github.com/users/leapcode/repos","events_url":"https://api.github.com/users/leapcode/events{/privacy}","received_events_url":"https://api.github.com/users/leapcode/received_events","type":"Organization","site_admin":false},"repo":{"id":8909650,"name":"leap_pycommon","full_name":"leapcode/leap_pycommon","owner":{"login":"leapcode","id":1700464,"avatar_url":"https://avatars.githubusercontent.com/u/1700464?v=3","gravatar_id":"","url":"https://api.github.com/users/leapcode","html_url":"https://github.com/leapcode","followers_url":"https://api.github.com/users/leapcode/followers","following_url":"https://api.github.com/users/leapcode/following{/other_user}","gists_url":"https://api.github.com/users/leapcode/gists{/gist_id}","starred_url":"https://api.github.com/users/leapcode/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/leapcode/subscriptions","organizations_url":"https://api.github.com/users/leapcode/orgs","repos_url":"https://api.github.com/users/leapcode/repos","events_url":"https://api.github.com/users/leapcode/events{/privacy}","received_events_url":"https://api.github.com/users/leapcode/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/leapcode/leap_pycommon","description":"Common utilities for leap python modules.","fork":false,"url":"https://api.github.com/repos/leapcode/leap_pycommon","forks_url":"https://api.github.com/repos/leapcode/leap_pycommon/forks","keys_url":"https://api.github.com/repos/leapcode/leap_pycommon/keys{/key_id}","collaborators_url":"https://api.github.com/repos/leapcode/leap_pycommon/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/leapcode/leap_pycommon/teams","hooks_url":"https://api.github.com/repos/leapcode/leap_pycommon/hooks","issue_events_url":"https://api.github.com/repos/leapcode/leap_pycommon/issues/events{/number}","events_url":"https://api.github.com/repos/leapcode/leap_pycommon/events","assignees_url":"https://api.github.com/repos/leapcode/leap_pycommon/assignees{/user}","branches_url":"https://api.github.com/repos/leapcode/leap_pycommon/branches{/branch}","tags_url":"https://api.github.com/repos/leapcode/leap_pycommon/tags","blobs_url":"https://api.github.com/repos/leapcode/leap_pycommon/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/leapcode/leap_pycommon/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/leapcode/leap_pycommon/git/refs{/sha}","trees_url":"https://api.github.com/repos/leapcode/leap_pycommon/git/trees{/sha}","statuses_url":"https://api.github.com/repos/leapcode/leap_pycommon/statuses/{sha}","languages_url":"https://api.github.com/repos/leapcode/leap_pycommon/languages","stargazers_url":"https://api.github.com/repos/leapcode/leap_pycommon/stargazers","contributors_url":"https://api.github.com/repos/leapcode/leap_pycommon/contributors","subscribers_url":"https://api.github.com/repos/leapcode/leap_pycommon/subscribers","subscription_url":"https://api.github.com/repos/leapcode/leap_pycommon/subscription","commits_url":"https://api.github.com/repos/leapcode/leap_pycommon/commits{/sha}","git_commits_url":"https://api.github.com/repos/leapcode/leap_pycommon/git/commits{/sha}","comments_url":"https://api.github.com/repos/leapcode/leap_pycommon/comments{/number}","issue_comment_url":"https://api.github.com/repos/leapcode/leap_pycommon/issues/comments{/number}","contents_url":"https://api.github.com/repos/leapcode/leap_pycommon/contents/{+path}","compare_url":"https://api.github.com/repos/leapcode/leap_pycommon/compare/{base}...{head}","merges_url":"https://api.github.com/repos/leapcode/leap_pycommon/merges","archive_url":"https://api.github.com/repos/leapcode/leap_pycommon/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/leapcode/leap_pycommon/downloads","issues_url":"https://api.github.com/repos/leapcode/leap_pycommon/issues{/number}","pulls_url":"https://api.github.com/repos/leapcode/leap_pycommon/pulls{/number}","milestones_url":"https://api.github.com/repos/leapcode/leap_pycommon/milestones{/number}","notifications_url":"https://api.github.com/repos/leapcode/leap_pycommon/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/leapcode/leap_pycommon/labels{/name}","releases_url":"https://api.github.com/repos/leapcode/leap_pycommon/releases{/id}","created_at":"2013-03-20T17:01:43Z","updated_at":"2015-05-28T00:33:08Z","pushed_at":"2015-07-10T15:41:28Z","git_url":"git://github.com/leapcode/leap_pycommon.git","ssh_url":"git@github.com:leapcode/leap_pycommon.git","clone_url":"https://github.com/leapcode/leap_pycommon.git","svn_url":"https://github.com/leapcode/leap_pycommon","homepage":"","size":1698,"stargazers_count":8,"watchers_count":8,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":9,"mirror_url":null,"open_issues_count":3,"forks":9,"open_issues":3,"watchers":8,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/leapcode/leap_pycommon/pulls/107"},"html":{"href":"https://github.com/leapcode/leap_pycommon/pull/107"},"issue":{"href":"https://api.github.com/repos/leapcode/leap_pycommon/issues/107"},"comments":{"href":"https://api.github.com/repos/leapcode/leap_pycommon/issues/107/comments"},"review_comments":{"href":"https://api.github.com/repos/leapcode/leap_pycommon/pulls/107/comments"},"review_comment":{"href":"https://api.github.com/repos/leapcode/leap_pycommon/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/leapcode/leap_pycommon/pulls/107/commits"},"statuses":{"href":"https://api.github.com/repos/leapcode/leap_pycommon/statuses/22c0313c25f002ebc6770eb1632dea8bb53d4cde"}}}}