d75372e
From c3fcc7597106553ad7b495a22535645617e20e18 Mon Sep 17 00:00:00 2001
2f898f2
From: Ralph Bean <rbean@redhat.com>
d75372e
Date: Wed, 25 Sep 2013 09:05:31 -0400
9c75512
Subject: [PATCH 3/3] system urllib3
2f898f2
2f898f2
---
9c75512
 requests/__init__.py |  7 -------
d75372e
 requests/adapters.py | 14 +++++++-------
9c75512
 requests/compat.py   |  5 ++++-
2f898f2
 requests/models.py   |  4 ++--
d75372e
 4 files changed, 13 insertions(+), 17 deletions(-)
2f898f2
9c75512
diff --git a/requests/__init__.py b/requests/__init__.py
d75372e
index 837f0df..a28977d 100644
9c75512
--- a/requests/__init__.py
9c75512
+++ b/requests/__init__.py
9c75512
@@ -48,13 +48,6 @@ __author__ = 'Kenneth Reitz'
9c75512
 __license__ = 'Apache 2.0'
9c75512
 __copyright__ = 'Copyright 2013 Kenneth Reitz'
9c75512
 
9c75512
-# Attempt to enable urllib3's SNI support, if possible
9c75512
-try:
d75372e
-    from .packages.urllib3.contrib import pyopenssl
9c75512
-    pyopenssl.inject_into_urllib3()
9c75512
-except ImportError:
9c75512
-    pass
9c75512
-
9c75512
 from . import utils
9c75512
 from .models import Request, Response, PreparedRequest
9c75512
 from .api import request, get, head, post, patch, put, delete, options
2f898f2
diff --git a/requests/adapters.py b/requests/adapters.py
d75372e
index d557b74..577bced 100644
2f898f2
--- a/requests/adapters.py
2f898f2
+++ b/requests/adapters.py
d75372e
@@ -11,17 +11,17 @@ and maintain connections.
2f898f2
 import socket
2f898f2
 
2f898f2
 from .models import Response
d75372e
-from .packages.urllib3.poolmanager import PoolManager, proxy_from_url
2f898f2
-from .packages.urllib3.response import HTTPResponse
d75372e
-from .packages.urllib3.util import Timeout as TimeoutSauce
d75372e
+from urllib3.poolmanager import PoolManager, proxy_from_url
2f898f2
+from urllib3.response import HTTPResponse
d75372e
+from urllib3.util import Timeout as TimeoutSauce
9c75512
 from .compat import urlparse, basestring, urldefrag, unquote
2f898f2
 from .utils import (DEFAULT_CA_BUNDLE_PATH, get_encoding_from_headers,
d75372e
                     except_on_missing_scheme, get_auth_from_url)
2f898f2
 from .structures import CaseInsensitiveDict
2f898f2
-from .packages.urllib3.exceptions import MaxRetryError
2f898f2
-from .packages.urllib3.exceptions import TimeoutError
2f898f2
-from .packages.urllib3.exceptions import SSLError as _SSLError
2f898f2
-from .packages.urllib3.exceptions import HTTPError as _HTTPError
2f898f2
+from urllib3.exceptions import MaxRetryError
2f898f2
+from urllib3.exceptions import TimeoutError
2f898f2
+from urllib3.exceptions import SSLError as _SSLError
2f898f2
+from urllib3.exceptions import HTTPError as _HTTPError
2f898f2
 from .cookies import extract_cookies_to_jar
2f898f2
 from .exceptions import ConnectionError, Timeout, SSLError
9c75512
 from .auth import _basic_auth_str
2f898f2
diff --git a/requests/compat.py b/requests/compat.py
d75372e
index 62bfef9..b394b17 100644
2f898f2
--- a/requests/compat.py
2f898f2
+++ b/requests/compat.py
9c75512
@@ -89,7 +89,10 @@ if is_py2:
2f898f2
     import cookielib
2f898f2
     from Cookie import Morsel
2f898f2
     from StringIO import StringIO
2f898f2
-    from .packages.urllib3.packages.ordered_dict import OrderedDict
2f898f2
+    try:
2f898f2
+        from collections import OrderedDict
2f898f2
+    except ImportError:
2f898f2
+        from ordereddict import OrderedDict
d75372e
     from httplib import IncompleteRead
2f898f2
 
2f898f2
     builtin_str = str
2f898f2
diff --git a/requests/models.py b/requests/models.py
d75372e
index 8fd9735..7df85c1 100644
2f898f2
--- a/requests/models.py
2f898f2
+++ b/requests/models.py
9c75512
@@ -17,8 +17,8 @@ from .structures import CaseInsensitiveDict
2f898f2
 
2f898f2
 from .auth import HTTPBasicAuth
2f898f2
 from .cookies import cookiejar_from_dict, get_cookie_header
2f898f2
-from .packages.urllib3.filepost import encode_multipart_formdata
9c75512
-from .packages.urllib3.util import parse_url
2f898f2
+from urllib3.filepost import encode_multipart_formdata
9c75512
+from urllib3.util import parse_url
d75372e
 from .exceptions import (
d75372e
     HTTPError, RequestException, MissingSchema, InvalidURL,
d75372e
     ChunkedEncodingError)
2f898f2
-- 
d75372e
1.8.3.1
2f898f2