From c4bd6ea1501ee24a7e45d3e888f11d2a52e41469 Mon Sep 17 00:00:00 2001 From: Ian Cordasco Date: Wed, 11 Mar 2015 20:52:12 -0500 Subject: [PATCH] Import urllib3's Retry location from the right place Importing from urllib3's top-level location causes the namespace to be urllib3.util.retry.Retry instead of requests.packages.urllib3.util.retry.Retry. Without this fix, an using requests with an un-vendored version of urllib3 will break when urllib3's retry handling kicks in. Closes shazow/urllib3#567 --- requests/adapters.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requests/adapters.py b/requests/adapters.py index c892853b29..02e0dd1f1d 100644 --- a/requests/adapters.py +++ b/requests/adapters.py @@ -11,10 +11,10 @@ import socket from .models import Response -from .packages.urllib3 import Retry from .packages.urllib3.poolmanager import PoolManager, proxy_from_url from .packages.urllib3.response import HTTPResponse from .packages.urllib3.util import Timeout as TimeoutSauce +from .packages.urllib3.util.retry import Retry from .compat import urlparse, basestring from .utils import (DEFAULT_CA_BUNDLE_PATH, get_encoding_from_headers, prepend_scheme_if_needed, get_auth_from_url, urldefragauth)