From 87239802c143b2aeb935d738f6b3e2a1ad856be7 Mon Sep 17 00:00:00 2001 From: Kenneth Reitz Date: Wed, 9 Nov 2011 17:50:36 -0800 Subject: [PATCH] proxy pooling! --- requests/models.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/requests/models.py b/requests/models.py index 1deff7f..c803c12 100644 --- a/requests/models.py +++ b/requests/models.py @@ -20,7 +20,7 @@ from .hooks import dispatch_hook from .structures import CaseInsensitiveDict from .status_codes import codes from .packages.urllib3.exceptions import MaxRetryError -from .packages.urllib3 import connectionpool +from .packages.urllib3 import connectionpool, poolmanager from .exceptions import ( Timeout, URLRequired, TooManyRedirects, HTTPError, ConnectionError) from .utils import ( @@ -368,7 +368,7 @@ class Request(object): proxy = self.proxies.get(_p.scheme) if proxy: - conn = connectionpool.proxy_from_url() + conn = poolmanager.proxy_from_url(url) else: # Check to see if keep_alive is allowed. if self.config.get('keep_alive'): -- 2.34.1