Latest major upstream release - requests-2.0.0

This commit is contained in:
Ralph Bean 2013-09-25 14:22:48 -04:00
parent 14d9138969
commit d75372e530
6 changed files with 40 additions and 31 deletions

1
.gitignore vendored
View File

@ -11,3 +11,4 @@
/requests-0.14.1.tar.gz /requests-0.14.1.tar.gz
/requests-1.1.0.tar.gz /requests-1.1.0.tar.gz
/requests-1.2.3.tar.gz /requests-1.2.3.tar.gz
/requests-2.0.0.tar.gz

View File

@ -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 <rbean@redhat.com> From: Ralph Bean <rbean@redhat.com>
Date: Mon, 1 Jul 2013 14:50:34 -0400 Date: Mon, 1 Jul 2013 14:50:34 -0400
Subject: [PATCH 1/3] system cert bundle Subject: [PATCH 1/3] system cert bundle
@ -33,5 +33,5 @@ index bc00826..9b78e3b 100644
if __name__ == '__main__': if __name__ == '__main__':
print(where()) print(where())
-- --
1.8.1.4 1.8.3.1

View File

@ -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 <rbean@redhat.com> From: Ralph Bean <rbean@redhat.com>
Date: Wed, 27 Feb 2013 10:03:41 -0500 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 +- requests/compat.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-) 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/requests/compat.py b/requests/compat.py diff --git a/requests/compat.py b/requests/compat.py
index 5bd4fcb..39421ed 100644 index 0d61a57..62bfef9 100644
--- a/requests/compat.py --- a/requests/compat.py
+++ b/requests/compat.py +++ b/requests/compat.py
@@ -4,7 +4,7 @@ @@ -4,7 +4,7 @@
@ -21,5 +21,5 @@ index 5bd4fcb..39421ed 100644
import sys import sys
-- --
1.8.1.2 1.8.3.1

View File

@ -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 <rbean@redhat.com> From: Ralph Bean <rbean@redhat.com>
Date: Mon, 1 Jul 2013 15:00:59 -0400 Date: Wed, 25 Sep 2013 09:05:31 -0400
Subject: [PATCH 3/3] system urllib3 Subject: [PATCH 3/3] system urllib3
--- ---
requests/__init__.py | 7 ------- requests/__init__.py | 7 -------
requests/adapters.py | 12 ++++++------ requests/adapters.py | 14 +++++++-------
requests/compat.py | 5 ++++- requests/compat.py | 5 ++++-
requests/models.py | 4 ++-- 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 diff --git a/requests/__init__.py b/requests/__init__.py
index 1af8d8e..8bc9843 100644 index 837f0df..a28977d 100644
--- a/requests/__init__.py --- a/requests/__init__.py
+++ b/requests/__init__.py +++ b/requests/__init__.py
@@ -48,13 +48,6 @@ __author__ = 'Kenneth Reitz' @@ -48,13 +48,6 @@ __author__ = 'Kenneth Reitz'
@ -20,7 +20,7 @@ index 1af8d8e..8bc9843 100644
-# Attempt to enable urllib3's SNI support, if possible -# Attempt to enable urllib3's SNI support, if possible
-try: -try:
- from requests.packages.urllib3.contrib import pyopenssl - from .packages.urllib3.contrib import pyopenssl
- pyopenssl.inject_into_urllib3() - pyopenssl.inject_into_urllib3()
-except ImportError: -except ImportError:
- pass - pass
@ -29,20 +29,22 @@ index 1af8d8e..8bc9843 100644
from .models import Request, Response, PreparedRequest from .models import Request, Response, PreparedRequest
from .api import request, get, head, post, patch, put, delete, options from .api import request, get, head, post, patch, put, delete, options
diff --git a/requests/adapters.py b/requests/adapters.py diff --git a/requests/adapters.py b/requests/adapters.py
index 98b7317..9ec3b1d 100644 index d557b74..577bced 100644
--- a/requests/adapters.py --- a/requests/adapters.py
+++ b/requests/adapters.py +++ b/requests/adapters.py
@@ -11,16 +11,16 @@ and maintain connections. @@ -11,17 +11,17 @@ and maintain connections.
import socket import socket
from .models import Response 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 .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.response import HTTPResponse
+from urllib3.util import Timeout as TimeoutSauce
from .compat import urlparse, basestring, urldefrag, unquote from .compat import urlparse, basestring, urldefrag, unquote
from .utils import (DEFAULT_CA_BUNDLE_PATH, get_encoding_from_headers, 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 .structures import CaseInsensitiveDict
-from .packages.urllib3.exceptions import MaxRetryError -from .packages.urllib3.exceptions import MaxRetryError
-from .packages.urllib3.exceptions import TimeoutError -from .packages.urllib3.exceptions import TimeoutError
@ -56,7 +58,7 @@ index 98b7317..9ec3b1d 100644
from .exceptions import ConnectionError, Timeout, SSLError from .exceptions import ConnectionError, Timeout, SSLError
from .auth import _basic_auth_str from .auth import _basic_auth_str
diff --git a/requests/compat.py b/requests/compat.py diff --git a/requests/compat.py b/requests/compat.py
index 93f6bb6..8b4a3bd 100644 index 62bfef9..b394b17 100644
--- a/requests/compat.py --- a/requests/compat.py
+++ b/requests/compat.py +++ b/requests/compat.py
@@ -89,7 +89,10 @@ if is_py2: @@ -89,7 +89,10 @@ if is_py2:
@ -68,11 +70,11 @@ index 93f6bb6..8b4a3bd 100644
+ from collections import OrderedDict + from collections import OrderedDict
+ except ImportError: + except ImportError:
+ from ordereddict import OrderedDict + from ordereddict import OrderedDict
from httplib import IncompleteRead
builtin_str = str builtin_str = str
bytes = str
diff --git a/requests/models.py b/requests/models.py diff --git a/requests/models.py b/requests/models.py
index 6cf2aaa..8a0ae9a 100644 index 8fd9735..7df85c1 100644
--- a/requests/models.py --- a/requests/models.py
+++ b/requests/models.py +++ b/requests/models.py
@@ -17,8 +17,8 @@ from .structures import CaseInsensitiveDict @@ -17,8 +17,8 @@ from .structures import CaseInsensitiveDict
@ -83,9 +85,9 @@ index 6cf2aaa..8a0ae9a 100644
-from .packages.urllib3.util import parse_url -from .packages.urllib3.util import parse_url
+from urllib3.filepost import encode_multipart_formdata +from urllib3.filepost import encode_multipart_formdata
+from urllib3.util import parse_url +from urllib3.util import parse_url
from .exceptions import HTTPError, RequestException, MissingSchema, InvalidURL from .exceptions import (
from .utils import ( HTTPError, RequestException, MissingSchema, InvalidURL,
guess_filename, get_auth_from_url, requote_uri, ChunkedEncodingError)
-- --
1.8.1.4 1.8.3.1

View File

@ -5,8 +5,8 @@
%endif %endif
Name: python-requests Name: python-requests
Version: 1.2.3 Version: 2.0.0
Release: 5%{?dist} Release: 1%{?dist}
Summary: HTTP library, written in Python, for human beings Summary: HTTP library, written in Python, for human beings
License: ASL 2.0 License: ASL 2.0
@ -25,11 +25,11 @@ Patch2: python-requests-system-urllib3.patch
BuildArch: noarch BuildArch: noarch
BuildRequires: python2-devel BuildRequires: python2-devel
BuildRequires: python-chardet BuildRequires: python-chardet
BuildRequires: python-urllib3 BuildRequires: python-urllib3 >= 1.7.1
Requires: ca-certificates Requires: ca-certificates
Requires: python-chardet Requires: python-chardet
Requires: python-urllib3 >= 1.7 Requires: python-urllib3 >= 1.7.1
%if 0%{?rhel} && 0%{?rhel} <= 6 %if 0%{?rhel} && 0%{?rhel} <= 6
BuildRequires: python-ordereddict BuildRequires: python-ordereddict
@ -47,9 +47,9 @@ designed to make HTTP requests easy for developers.
Summary: HTTP library, written in Python, for human beings Summary: HTTP library, written in Python, for human beings
BuildRequires: python3-devel BuildRequires: python3-devel
BuildRequires: python3-chardet BuildRequires: python3-chardet
BuildRequires: python3-urllib3 BuildRequires: python3-urllib3 >= 1.7.1
Requires: python3-chardet Requires: python3-chardet
Requires: python3-urllib3 >= 1.7 Requires: python3-urllib3 >= 1.7.1
%description -n python3-requests %description -n python3-requests
Most existing Python modules for sending HTTP requests are extremely verbose and Most existing Python modules for sending HTTP requests are extremely verbose and
@ -124,11 +124,17 @@ popd
%if 0%{?_with_python3} %if 0%{?_with_python3}
%files -n python3-requests %files -n python3-requests
%doc NOTICE LICENSE README.rst HISTORY.rst
%{python3_sitelib}/*.egg-info %{python3_sitelib}/*.egg-info
%{python3_sitelib}/requests/ %{python3_sitelib}/requests/
%endif %endif
%changelog %changelog
* Wed Sep 25 2013 Ralph Bean <rbean@redhat.com> - 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 <rdieter@fedoraproject.org> 1.2.3-5 * Mon Aug 26 2013 Rex Dieter <rdieter@fedoraproject.org> 1.2.3-5
- fix versioned dep on python-urllib3 - fix versioned dep on python-urllib3

View File

@ -1 +1 @@
adbd3f18445f7fe5e77f65c502e264fb requests-1.2.3.tar.gz 856fc825c17483e25fd55db115028e3f requests-2.0.0.tar.gz