diff --git a/.gitignore b/.gitignore index b67e6fd..6303539 100644 --- a/.gitignore +++ b/.gitignore @@ -11,3 +11,4 @@ /requests-0.14.1.tar.gz /requests-1.1.0.tar.gz /requests-1.2.3.tar.gz +/requests-2.0.0.tar.gz diff --git a/python-requests-system-cert-bundle.patch b/python-requests-system-cert-bundle.patch index c5ddb81..8e467bd 100644 --- a/python-requests-system-cert-bundle.patch +++ b/python-requests-system-cert-bundle.patch @@ -1,4 +1,4 @@ -From 6ca0a139fa69545fc22b611485a39e281a07798b Mon Sep 17 00:00:00 2001 +From ad98b45e959dc7325c294c26d94e68901700c407 Mon Sep 17 00:00:00 2001 From: Ralph Bean Date: Mon, 1 Jul 2013 14:50:34 -0400 Subject: [PATCH 1/3] system cert bundle @@ -33,5 +33,5 @@ index bc00826..9b78e3b 100644 if __name__ == '__main__': print(where()) -- -1.8.1.4 +1.8.3.1 diff --git a/python-requests-system-chardet-not-charade.patch b/python-requests-system-chardet-not-charade.patch index e9abcf2..130b0aa 100644 --- a/python-requests-system-chardet-not-charade.patch +++ b/python-requests-system-chardet-not-charade.patch @@ -1,14 +1,14 @@ -From 07c1df1053a61ec5097fe79c68aba7fda7bac3b5 Mon Sep 17 00:00:00 2001 +From ff921c66c3d0d38b2aa63eba529c9f0cb68c549a Mon Sep 17 00:00:00 2001 From: Ralph Bean Date: Wed, 27 Feb 2013 10:03:41 -0500 -Subject: [PATCH] Use system chardet, not charade. +Subject: [PATCH 2/3] Use system chardet, not charade. --- requests/compat.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requests/compat.py b/requests/compat.py -index 5bd4fcb..39421ed 100644 +index 0d61a57..62bfef9 100644 --- a/requests/compat.py +++ b/requests/compat.py @@ -4,7 +4,7 @@ @@ -21,5 +21,5 @@ index 5bd4fcb..39421ed 100644 import sys -- -1.8.1.2 +1.8.3.1 diff --git a/python-requests-system-urllib3.patch b/python-requests-system-urllib3.patch index 8a911c6..b5d5dd4 100644 --- a/python-requests-system-urllib3.patch +++ b/python-requests-system-urllib3.patch @@ -1,17 +1,17 @@ -From 3ca53c8ba4557fc04c98c2b3b6aced09ddac6f7b Mon Sep 17 00:00:00 2001 +From c3fcc7597106553ad7b495a22535645617e20e18 Mon Sep 17 00:00:00 2001 From: Ralph Bean -Date: Mon, 1 Jul 2013 15:00:59 -0400 +Date: Wed, 25 Sep 2013 09:05:31 -0400 Subject: [PATCH 3/3] system urllib3 --- requests/__init__.py | 7 ------- - requests/adapters.py | 12 ++++++------ + requests/adapters.py | 14 +++++++------- requests/compat.py | 5 ++++- requests/models.py | 4 ++-- - 4 files changed, 12 insertions(+), 16 deletions(-) + 4 files changed, 13 insertions(+), 17 deletions(-) diff --git a/requests/__init__.py b/requests/__init__.py -index 1af8d8e..8bc9843 100644 +index 837f0df..a28977d 100644 --- a/requests/__init__.py +++ b/requests/__init__.py @@ -48,13 +48,6 @@ __author__ = 'Kenneth Reitz' @@ -20,7 +20,7 @@ index 1af8d8e..8bc9843 100644 -# Attempt to enable urllib3's SNI support, if possible -try: -- from requests.packages.urllib3.contrib import pyopenssl +- from .packages.urllib3.contrib import pyopenssl - pyopenssl.inject_into_urllib3() -except ImportError: - pass @@ -29,20 +29,22 @@ index 1af8d8e..8bc9843 100644 from .models import Request, Response, PreparedRequest from .api import request, get, head, post, patch, put, delete, options diff --git a/requests/adapters.py b/requests/adapters.py -index 98b7317..9ec3b1d 100644 +index d557b74..577bced 100644 --- a/requests/adapters.py +++ b/requests/adapters.py -@@ -11,16 +11,16 @@ and maintain connections. +@@ -11,17 +11,17 @@ and maintain connections. import socket from .models import Response --from .packages.urllib3.poolmanager import PoolManager, ProxyManager +-from .packages.urllib3.poolmanager import PoolManager, proxy_from_url -from .packages.urllib3.response import HTTPResponse -+from urllib3.poolmanager import PoolManager, ProxyManager +-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 .utils import (DEFAULT_CA_BUNDLE_PATH, get_encoding_from_headers, - prepend_scheme_if_needed, get_auth_from_url) + except_on_missing_scheme, get_auth_from_url) from .structures import CaseInsensitiveDict -from .packages.urllib3.exceptions import MaxRetryError -from .packages.urllib3.exceptions import TimeoutError @@ -56,7 +58,7 @@ index 98b7317..9ec3b1d 100644 from .exceptions import ConnectionError, Timeout, SSLError from .auth import _basic_auth_str diff --git a/requests/compat.py b/requests/compat.py -index 93f6bb6..8b4a3bd 100644 +index 62bfef9..b394b17 100644 --- a/requests/compat.py +++ b/requests/compat.py @@ -89,7 +89,10 @@ if is_py2: @@ -68,11 +70,11 @@ index 93f6bb6..8b4a3bd 100644 + from collections import OrderedDict + except ImportError: + from ordereddict import OrderedDict + from httplib import IncompleteRead builtin_str = str - bytes = str diff --git a/requests/models.py b/requests/models.py -index 6cf2aaa..8a0ae9a 100644 +index 8fd9735..7df85c1 100644 --- a/requests/models.py +++ b/requests/models.py @@ -17,8 +17,8 @@ from .structures import CaseInsensitiveDict @@ -83,9 +85,9 @@ index 6cf2aaa..8a0ae9a 100644 -from .packages.urllib3.util import parse_url +from urllib3.filepost import encode_multipart_formdata +from urllib3.util import parse_url - from .exceptions import HTTPError, RequestException, MissingSchema, InvalidURL - from .utils import ( - guess_filename, get_auth_from_url, requote_uri, + from .exceptions import ( + HTTPError, RequestException, MissingSchema, InvalidURL, + ChunkedEncodingError) -- -1.8.1.4 +1.8.3.1 diff --git a/python-requests.spec b/python-requests.spec index c8d74c2..5e300f7 100644 --- a/python-requests.spec +++ b/python-requests.spec @@ -5,8 +5,8 @@ %endif Name: python-requests -Version: 1.2.3 -Release: 5%{?dist} +Version: 2.0.0 +Release: 1%{?dist} Summary: HTTP library, written in Python, for human beings License: ASL 2.0 @@ -25,11 +25,11 @@ Patch2: python-requests-system-urllib3.patch BuildArch: noarch BuildRequires: python2-devel BuildRequires: python-chardet -BuildRequires: python-urllib3 +BuildRequires: python-urllib3 >= 1.7.1 Requires: ca-certificates Requires: python-chardet -Requires: python-urllib3 >= 1.7 +Requires: python-urllib3 >= 1.7.1 %if 0%{?rhel} && 0%{?rhel} <= 6 BuildRequires: python-ordereddict @@ -47,9 +47,9 @@ designed to make HTTP requests easy for developers. Summary: HTTP library, written in Python, for human beings BuildRequires: python3-devel BuildRequires: python3-chardet -BuildRequires: python3-urllib3 +BuildRequires: python3-urllib3 >= 1.7.1 Requires: python3-chardet -Requires: python3-urllib3 >= 1.7 +Requires: python3-urllib3 >= 1.7.1 %description -n python3-requests Most existing Python modules for sending HTTP requests are extremely verbose and @@ -124,11 +124,17 @@ popd %if 0%{?_with_python3} %files -n python3-requests +%doc NOTICE LICENSE README.rst HISTORY.rst %{python3_sitelib}/*.egg-info %{python3_sitelib}/requests/ %endif %changelog +* Wed Sep 25 2013 Ralph Bean - 2.0.0-1 +- Latest upstream. +- Add doc macro to the python3 files section. +- Require python-urllib3 greater than or at 1.7.1. + * Mon Aug 26 2013 Rex Dieter 1.2.3-5 - fix versioned dep on python-urllib3 diff --git a/sources b/sources index 0333ce4..f81436e 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -adbd3f18445f7fe5e77f65c502e264fb requests-1.2.3.tar.gz +856fc825c17483e25fd55db115028e3f requests-2.0.0.tar.gz