{"action":"created","issue":{"url":"https://api.github.com/repos/shazow/urllib3/issues/861","repository_url":"https://api.github.com/repos/shazow/urllib3","labels_url":"https://api.github.com/repos/shazow/urllib3/issues/861/labels{/name}","comments_url":"https://api.github.com/repos/shazow/urllib3/issues/861/comments","events_url":"https://api.github.com/repos/shazow/urllib3/issues/861/events","html_url":"https://github.com/shazow/urllib3/pull/861","id":154467925,"number":861,"title":"Hide a confusing \"getresponse() got an unexpected keyword argument 'b…","user":{"login":"bluetech","id":1223550,"avatar_url":"https://avatars.githubusercontent.com/u/1223550?v=3","gravatar_id":"","url":"https://api.github.com/users/bluetech","html_url":"https://github.com/bluetech","followers_url":"https://api.github.com/users/bluetech/followers","following_url":"https://api.github.com/users/bluetech/following{/other_user}","gists_url":"https://api.github.com/users/bluetech/gists{/gist_id}","starred_url":"https://api.github.com/users/bluetech/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bluetech/subscriptions","organizations_url":"https://api.github.com/users/bluetech/orgs","repos_url":"https://api.github.com/users/bluetech/repos","events_url":"https://api.github.com/users/bluetech/events{/privacy}","received_events_url":"https://api.github.com/users/bluetech/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2016-05-12T12:15:58Z","updated_at":"2016-05-12T13:15:30Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/shazow/urllib3/pulls/861","html_url":"https://github.com/shazow/urllib3/pull/861","diff_url":"https://github.com/shazow/urllib3/pull/861.diff","patch_url":"https://github.com/shazow/urllib3/pull/861.patch"},"body":"…uffering'\" error\r\n\r\nRemove the TypeError from the exception chain in Python 3; otherwise it\r\nlooks like a programming error was the cause. A quick google search of\r\nthe above phrase shows I was not the only one.\r\n\r\nHere is how a connection timeout looks like before this patch:\r\n\r\n    urllib3.PoolManager().request('GET', 'google.com:81', retries=False, timeout=1)\r\n\r\n    Traceback (most recent call last):\r\n    File \"/home/ran/src/urllib3/urllib3/connectionpool.py\", line 385, in _make_request\r\n        httplib_response = conn.getresponse(buffering=True)\r\n    TypeError: getresponse() got an unexpected keyword argument 'buffering'\r\n\r\n    During handling of the above exception, another exception occurred:\r\n\r\n    Traceback (most recent call last):\r\n    File \"/home/ran/src/urllib3/urllib3/connectionpool.py\", line 387, in _make_request\r\n        httplib_response = conn.getresponse()\r\n    File \"/usr/lib/python3.5/http/client.py\", line 1174, in getresponse\r\n        response.begin()\r\n    File \"/usr/lib/python3.5/http/client.py\", line 282, in begin\r\n        version, status, reason = self._read_status()\r\n    File \"/usr/lib/python3.5/http/client.py\", line 243, in _read_status\r\n        line = str(self.fp.readline(_MAXLINE + 1), \"iso-8859-1\")\r\n    File \"/usr/lib/python3.5/socket.py\", line 575, in readinto\r\n        return self._sock.recv_into(b)\r\n    socket.timeout: timed out\r\n\r\n    [snip]\r\n\r\nAfter, the first part is gone, and only the real cause is shown.\r\n\r\nIn Python2, exceptions are not chained automatically so there is no\r\ndifference."},"comment":{"url":"https://api.github.com/repos/shazow/urllib3/issues/comments/218753193","html_url":"https://github.com/shazow/urllib3/pull/861#issuecomment-218753193","issue_url":"https://api.github.com/repos/shazow/urllib3/issues/861","id":218753193,"user":{"login":"sigmavirus24","id":240830,"avatar_url":"https://avatars.githubusercontent.com/u/240830?v=3","gravatar_id":"","url":"https://api.github.com/users/sigmavirus24","html_url":"https://github.com/sigmavirus24","followers_url":"https://api.github.com/users/sigmavirus24/followers","following_url":"https://api.github.com/users/sigmavirus24/following{/other_user}","gists_url":"https://api.github.com/users/sigmavirus24/gists{/gist_id}","starred_url":"https://api.github.com/users/sigmavirus24/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sigmavirus24/subscriptions","organizations_url":"https://api.github.com/users/sigmavirus24/orgs","repos_url":"https://api.github.com/users/sigmavirus24/repos","events_url":"https://api.github.com/users/sigmavirus24/events{/privacy}","received_events_url":"https://api.github.com/users/sigmavirus24/received_events","type":"User","site_admin":false},"created_at":"2016-05-12T13:15:30Z","updated_at":"2016-05-12T13:15:30Z","body":"I'm torn on this. On the one hand, this might help @Lukasa and I with the issue that never dies in requests. On the other, we're making urllib3 uglier and slightly more complex as part of it. Also, people writing code on Python 3 should really not be terribly surprised when seeing tracebacks like this. They're fairly common."}}