{"action":"created","issue":{"url":"https://api.github.com/repos/shazow/urllib3/issues/567","labels_url":"https://api.github.com/repos/shazow/urllib3/issues/567/labels{/name}","comments_url":"https://api.github.com/repos/shazow/urllib3/issues/567/comments","events_url":"https://api.github.com/repos/shazow/urllib3/issues/567/events","html_url":"https://github.com/shazow/urllib3/issues/567","id":60725578,"number":567,"title":"Two different copies of urllib3 don't work interchangeably","user":{"login":"Arfrever","id":656294,"avatar_url":"https://avatars.githubusercontent.com/u/656294?v=3","gravatar_id":"","url":"https://api.github.com/users/Arfrever","html_url":"https://github.com/Arfrever","followers_url":"https://api.github.com/users/Arfrever/followers","following_url":"https://api.github.com/users/Arfrever/following{/other_user}","gists_url":"https://api.github.com/users/Arfrever/gists{/gist_id}","starred_url":"https://api.github.com/users/Arfrever/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Arfrever/subscriptions","organizations_url":"https://api.github.com/users/Arfrever/orgs","repos_url":"https://api.github.com/users/Arfrever/repos","events_url":"https://api.github.com/users/Arfrever/events{/privacy}","received_events_url":"https://api.github.com/users/Arfrever/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-03-11T20:37:27Z","updated_at":"2015-03-11T20:44:03Z","closed_at":null,"body":"I use urllib3 1.10.2.\r\n\r\nIn working copy of Requests:\r\n```\r\n$ rm -r requests/packages/urllib3\r\n$ python2.7 test_requests.py -v\r\n...\r\n======================================================================\r\nERROR: test_connection_error_invalid_domain (__main__.RequestsTestCase)\r\nConnecting to an unknown domain should raise a ConnectionError\r\n----------------------------------------------------------------------\r\nTraceback (most recent call last):\r\n  File \"test_requests.py\", line 307, in test_connection_error_invalid_domain\r\n    requests.get(\"http://doesnotexist.google.com\")\r\n  File \"/tmp/requests/requests/api.py\", line 65, in get\r\n    return request('get', url, **kwargs)\r\n  File \"/tmp/requests/requests/api.py\", line 49, in request\r\n    response = session.request(method=method, url=url, **kwargs)\r\n  File \"/tmp/requests/requests/sessions.py\", line 461, in request\r\n    resp = self.send(prep, **send_kwargs)\r\n  File \"/tmp/requests/requests/sessions.py\", line 573, in send\r\n    r = adapter.send(request, **kwargs)\r\n  File \"/tmp/requests/requests/adapters.py\", line 370, in send\r\n    timeout=timeout\r\n  File \"/usr/lib64/python2.7/site-packages/urllib3/connectionpool.py\", line 597, in urlopen\r\n    _stacktrace=sys.exc_info()[2])\r\n  File \"/usr/lib64/python2.7/site-packages/urllib3/util/retry.py\", line 226, in increment\r\n    total -= 1\r\nTypeError: unsupported operand type(s) for -=: 'Retry' and 'int'\r\n\r\n======================================================================\r\nERROR: test_connection_error_invalid_port (__main__.RequestsTestCase)\r\nConnecting to an invalid port should raise a ConnectionError\r\n----------------------------------------------------------------------\r\nTraceback (most recent call last):\r\n  File \"test_requests.py\", line 312, in test_connection_error_invalid_port\r\n    requests.get(\"http://httpbin.org:1\", timeout=1)\r\n  File \"/tmp/requests/requests/api.py\", line 65, in get\r\n    return request('get', url, **kwargs)\r\n  File \"/tmp/requests/requests/api.py\", line 49, in request\r\n    response = session.request(method=method, url=url, **kwargs)\r\n  File \"/tmp/requests/requests/sessions.py\", line 461, in request\r\n    resp = self.send(prep, **send_kwargs)\r\n  File \"/tmp/requests/requests/sessions.py\", line 573, in send\r\n    r = adapter.send(request, **kwargs)\r\n  File \"/tmp/requests/requests/adapters.py\", line 370, in send\r\n    timeout=timeout\r\n  File \"/usr/lib64/python2.7/site-packages/urllib3/connectionpool.py\", line 597, in urlopen\r\n    _stacktrace=sys.exc_info()[2])\r\n  File \"/usr/lib64/python2.7/site-packages/urllib3/util/retry.py\", line 226, in increment\r\n    total -= 1\r\nTypeError: unsupported operand type(s) for -=: 'Retry' and 'int'\r\n\r\n----------------------------------------------------------------------\r\nRan 143 tests in 40.197s\r\n\r\nFAILED (errors=2)\r\n```\r\nProblem strangely does not occur when Requests is using its bundled copy of urllib3.\r\n\r\n<bountysource-plugin>\r\n---\r\nWant to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/9453022-two-different-copies-of-urllib3-don-t-work-interchangeably?utm_campaign=plugin&utm_content=tracker%2F192525&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F192525&utm_medium=issues&utm_source=github).\r\n</bountysource-plugin>"},"comment":{"url":"https://api.github.com/repos/shazow/urllib3/issues/comments/78367114","html_url":"https://github.com/shazow/urllib3/issues/567#issuecomment-78367114","issue_url":"https://api.github.com/repos/shazow/urllib3/issues/567","id":78367114,"user":{"login":"Arfrever","id":656294,"avatar_url":"https://avatars.githubusercontent.com/u/656294?v=3","gravatar_id":"","url":"https://api.github.com/users/Arfrever","html_url":"https://github.com/Arfrever","followers_url":"https://api.github.com/users/Arfrever/followers","following_url":"https://api.github.com/users/Arfrever/following{/other_user}","gists_url":"https://api.github.com/users/Arfrever/gists{/gist_id}","starred_url":"https://api.github.com/users/Arfrever/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Arfrever/subscriptions","organizations_url":"https://api.github.com/users/Arfrever/orgs","repos_url":"https://api.github.com/users/Arfrever/repos","events_url":"https://api.github.com/users/Arfrever/events{/privacy}","received_events_url":"https://api.github.com/users/Arfrever/received_events","type":"User","site_admin":false},"created_at":"2015-03-11T20:44:03Z","updated_at":"2015-03-11T20:44:03Z","body":"Technically `requests/packages/urllib3` has been deleted and `requests/packages/__init__.py` is magically importing `urllib3` from site-packages..."}}