9c75512
From 3ca53c8ba4557fc04c98c2b3b6aced09ddac6f7b Mon Sep 17 00:00:00 2001
2f898f2
From: Ralph Bean <rbean@redhat.com>
9c75512
Date: Mon, 1 Jul 2013 15:00:59 -0400
9c75512
Subject: [PATCH 3/3] system urllib3
2f898f2
2f898f2
---
9c75512
 requests/__init__.py |  7 -------
2f898f2
 requests/adapters.py | 12 ++++++------
9c75512
 requests/compat.py   |  5 ++++-
2f898f2
 requests/models.py   |  4 ++--
9c75512
 4 files changed, 12 insertions(+), 16 deletions(-)
2f898f2
9c75512
diff --git a/requests/__init__.py b/requests/__init__.py
9c75512
index 1af8d8e..8bc9843 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:
9c75512
-    from requests.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
9c75512
index 98b7317..9ec3b1d 100644
2f898f2
--- a/requests/adapters.py
2f898f2
+++ b/requests/adapters.py
9c75512
@@ -11,16 +11,16 @@ and maintain connections.
2f898f2
 import socket
2f898f2
 
2f898f2
 from .models import Response
9c75512
-from .packages.urllib3.poolmanager import PoolManager, ProxyManager
2f898f2
-from .packages.urllib3.response import HTTPResponse
9c75512
+from urllib3.poolmanager import PoolManager, ProxyManager
2f898f2
+from urllib3.response import HTTPResponse
9c75512
 from .compat import urlparse, basestring, urldefrag, unquote
2f898f2
 from .utils import (DEFAULT_CA_BUNDLE_PATH, get_encoding_from_headers,
9c75512
                     prepend_scheme_if_needed, 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
9c75512
index 93f6bb6..8b4a3bd 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
2f898f2
 
2f898f2
     builtin_str = str
2f898f2
     bytes = str
2f898f2
diff --git a/requests/models.py b/requests/models.py
9c75512
index 6cf2aaa..8a0ae9a 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
2f898f2
 from .exceptions import HTTPError, RequestException, MissingSchema, InvalidURL
2f898f2
 from .utils import (
9c75512
     guess_filename, get_auth_from_url, requote_uri,
2f898f2
-- 
9c75512
1.8.1.4
2f898f2