Initial el5 build
This commit is contained in:
parent
a3d6ffe71e
commit
e6241586d9
6 changed files with 169 additions and 216 deletions
|
|
@ -1,92 +1,81 @@
|
|||
diff -up ./requests/adapters.py.orig ./requests/adapters.py
|
||||
--- ./requests/adapters.py.orig 2014-05-30 00:27:36.151074219 -0700
|
||||
+++ ./requests/adapters.py 2014-05-30 00:31:26.712662414 -0700
|
||||
@@ -11,18 +11,18 @@ and maintain connections.
|
||||
From 5d23c608e72025f72e1f3223cb6c7e3979e93c7f Mon Sep 17 00:00:00 2001
|
||||
From: Ralph Bean <rbean@redhat.com>
|
||||
Date: Thu, 28 Feb 2013 10:57:20 -0500
|
||||
Subject: [PATCH] system-urllib3
|
||||
|
||||
---
|
||||
requests/adapters.py | 12 ++++++------
|
||||
requests/compat.py | 6 +++++-
|
||||
requests/models.py | 4 ++--
|
||||
3 files changed, 13 insertions(+), 9 deletions(-)
|
||||
|
||||
diff --git a/requests/adapters.py b/requests/adapters.py
|
||||
index 5f9d9c7..1f61bd6 100644
|
||||
--- a/requests/adapters.py
|
||||
+++ b/requests/adapters.py
|
||||
@@ -11,17 +11,17 @@ and maintain connections.
|
||||
import socket
|
||||
|
||||
from .models import Response
|
||||
-from .packages.urllib3.poolmanager import PoolManager, proxy_from_url
|
||||
-from .packages.urllib3.response import HTTPResponse
|
||||
-from .packages.urllib3.util import Timeout as TimeoutSauce
|
||||
+from urllib3.poolmanager import PoolManager, proxy_from_url
|
||||
+from urllib3.response import HTTPResponse
|
||||
+from urllib3.util import Timeout as TimeoutSauce
|
||||
from .compat import urlparse, basestring, urldefrag, unquote
|
||||
from .hooks import dispatch_hook
|
||||
from .compat import urlparse, basestring, urldefrag
|
||||
from .utils import (DEFAULT_CA_BUNDLE_PATH, get_encoding_from_headers,
|
||||
prepend_scheme_if_needed, get_auth_from_url)
|
||||
prepend_scheme_if_needed)
|
||||
from .structures import CaseInsensitiveDict
|
||||
-from .packages.urllib3.exceptions import MaxRetryError
|
||||
-from .packages.urllib3.exceptions import TimeoutError
|
||||
-from .packages.urllib3.exceptions import SSLError as _SSLError
|
||||
-from .packages.urllib3.exceptions import HTTPError as _HTTPError
|
||||
-from .packages.urllib3.exceptions import ProxyError as _ProxyError
|
||||
+from urllib3.exceptions import MaxRetryError
|
||||
+from urllib3.exceptions import TimeoutError
|
||||
+from urllib3.exceptions import SSLError as _SSLError
|
||||
+from urllib3.exceptions import HTTPError as _HTTPError
|
||||
+from urllib3.exceptions import ProxyError as _ProxyError
|
||||
from .cookies import extract_cookies_to_jar
|
||||
from .exceptions import ConnectionError, Timeout, SSLError, ProxyError
|
||||
from .auth import _basic_auth_str
|
||||
diff -up ./requests/compat.py.orig ./requests/compat.py
|
||||
--- ./requests/compat.py.orig 2014-05-30 00:46:53.888049149 -0700
|
||||
+++ ./requests/compat.py 2014-05-30 00:54:17.647105931 -0700
|
||||
@@ -89,7 +89,10 @@ if is_py2:
|
||||
from .exceptions import ConnectionError, Timeout, SSLError
|
||||
|
||||
diff --git a/requests/compat.py b/requests/compat.py
|
||||
index 39421ed..d9ab218 100644
|
||||
--- a/requests/compat.py
|
||||
+++ b/requests/compat.py
|
||||
@@ -89,7 +89,11 @@ if is_py2:
|
||||
import cookielib
|
||||
from Cookie import Morsel
|
||||
from StringIO import StringIO
|
||||
- from .packages.urllib3.packages.ordered_dict import OrderedDict
|
||||
+
|
||||
+ try:
|
||||
+ from collections import OrderedDict
|
||||
+ except ImportError:
|
||||
+ from ordereddict import OrderedDict
|
||||
from httplib import IncompleteRead
|
||||
|
||||
builtin_str = str
|
||||
diff -up ./requests/exceptions.py.orig ./requests/exceptions.py
|
||||
--- ./requests/exceptions.py.orig 2014-05-30 00:59:00.825056566 -0700
|
||||
+++ ./requests/exceptions.py 2014-05-30 00:59:13.416143297 -0700
|
||||
@@ -7,7 +7,7 @@ requests.exceptions
|
||||
This module contains the set of Requests' exceptions.
|
||||
|
||||
"""
|
||||
-from .packages.urllib3.exceptions import HTTPError as BaseHTTPError
|
||||
+from urllib3.exceptions import HTTPError as BaseHTTPError
|
||||
|
||||
|
||||
class RequestException(IOError):
|
||||
diff -up ./requests/__init__.py.orig ./requests/__init__.py
|
||||
--- ./requests/__init__.py.orig 2014-05-30 00:27:56.025211120 -0700
|
||||
+++ ./requests/__init__.py 2014-05-30 00:54:37.009239302 -0700
|
||||
@@ -48,13 +48,6 @@ __author__ = 'Kenneth Reitz'
|
||||
__license__ = 'Apache 2.0'
|
||||
__copyright__ = 'Copyright 2014 Kenneth Reitz'
|
||||
|
||||
-# Attempt to enable urllib3's SNI support, if possible
|
||||
-try:
|
||||
- from .packages.urllib3.contrib import pyopenssl
|
||||
- pyopenssl.inject_into_urllib3()
|
||||
-except ImportError:
|
||||
- pass
|
||||
-
|
||||
from . import utils
|
||||
from .models import Request, Response, PreparedRequest
|
||||
from .api import request, get, head, post, patch, put, delete, options
|
||||
diff -up ./requests/models.py.orig ./requests/models.py
|
||||
--- ./requests/models.py.orig 2014-05-30 00:27:18.926955573 -0700
|
||||
+++ ./requests/models.py 2014-05-30 00:31:12.714565990 -0700
|
||||
@@ -16,10 +16,10 @@ from .structures import CaseInsensitiveD
|
||||
bytes = str
|
||||
diff --git a/requests/models.py b/requests/models.py
|
||||
index 5202e6f..218b4f2 100644
|
||||
--- a/requests/models.py
|
||||
+++ b/requests/models.py
|
||||
@@ -17,7 +17,7 @@ from .status_codes import codes
|
||||
|
||||
from .auth import HTTPBasicAuth
|
||||
from .cookies import cookiejar_from_dict, get_cookie_header
|
||||
-from .packages.urllib3.fields import RequestField
|
||||
-from .packages.urllib3.filepost import encode_multipart_formdata
|
||||
-from .packages.urllib3.util import parse_url
|
||||
-from .packages.urllib3.exceptions import DecodeError
|
||||
+from urllib3.fields import RequestField
|
||||
+from urllib3.filepost import encode_multipart_formdata
|
||||
+from urllib3.util import parse_url
|
||||
+from urllib3.exceptions import DecodeError
|
||||
from .exceptions import (
|
||||
HTTPError, RequestException, MissingSchema, InvalidURL,
|
||||
ChunkedEncodingError, ContentDecodingError)
|
||||
from .exceptions import HTTPError, RequestException, MissingSchema, InvalidURL
|
||||
from .utils import (
|
||||
stream_untransfer, guess_filename, requote_uri,
|
||||
@@ -121,7 +121,7 @@ class RequestEncodingMixin(object):
|
||||
fp = StringIO(fp)
|
||||
if isinstance(fp, bytes):
|
||||
fp = BytesIO(fp)
|
||||
-
|
||||
+
|
||||
if ft:
|
||||
new_v = (fn, fp.read(), ft)
|
||||
else:
|
||||
--
|
||||
1.8.1.2
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue