%bcond_without python3 # CPython 3.x module
%bcond_with bundled # bundled libraries
#
+%define urllib3ver 1.10.1
%define module requests
Summary: HTTP library for Python 2
Summary(pl.UTF-8): Biblioteka HTTP dla Pythona 2
Name: python-%{module}
-Version: 2.5.0
+Version: 2.5.3
Release: 1
License: Apache2
Group: Development/Languages/Python
Source0: https://pypi.python.org/packages/source/r/requests/%{module}-%{version}.tar.gz
-# Source0-md5: b8bf3ddca75e7ecf1b6776da1e6e3385
+# Source0-md5: 23bf4fcc89ea8d353eb5353bb4a475b1
URL: http://python-requests.org
# find . -name '*.py' -exec sed -i -e 's#requests\.packages\.urllib3#urllib3#g' "{}" ";"
# find . -name '*.py' -exec sed -i -e 's#\.packages\.urllib3#urllib3#g' "{}" ";"
BuildRequires: python-modules >= 1:2.6
%if %{without bundled}
BuildRequires: python-charade
-BuildRequires: python-urllib3 >= 1.9.1
+BuildRequires: python-urllib3 >= %{urllib3ver}
%endif
%{?with_tests:BuildRequires: python-pytest}
%endif
BuildRequires: python3-modules >= 1:3.2
%if %{without bundled}
BuildRequires: python3-charade
-BuildRequires: python3-urllib3 >= 1.10
+BuildRequires: python3-urllib3 >= %{urllib3ver}
%endif
%{?with_tests:BuildRequires: python3-pytest}
%endif
Requires: python-modules >= 1:2.6
%if %{without bundled}
Requires: python-charade
-Requires: python-urllib3 >= 1.10
+Requires: python-urllib3 >= %{urllib3ver}
%endif
# for python2 only to get SNI working. python3 doesn't need this
Requires: python-ndg-httpsclient
Requires: python3-modules >= 1:3.2
%if %{without bundled}
Requires: python3-charade
-Requires: python3-urllib3 >= 1.10
+Requires: python3-urllib3 >= %{urllib3ver}
%endif
%description -n python3-requests
-diff -urN requests-2.5.0.org/requests/adapters.py requests-2.5.0/requests/adapters.py
---- requests-2.5.0.org/requests/adapters.py 2014-12-01 22:02:39.000000000 +0100
-+++ requests-2.5.0/requests/adapters.py 2014-12-04 11:09:50.937837828 +0100
-@@ -11,22 +11,22 @@
+diff -urNp requests-2.5.3.org/requests/adapters.py requests-2.5.3/requests/adapters.py
+--- requests-2.5.3.org/requests/adapters.py 2014-12-01 22:02:39.000000000 +0100
++++ requests-2.5.3/requests/adapters.py 2015-03-06 20:15:36.361707968 +0100
+@@ -11,22 +11,22 @@ and maintain connections.
import socket
from .models import Response
from .cookies import extract_cookies_to_jar
from .exceptions import (ConnectionError, ConnectTimeout, ReadTimeout, SSLError,
ProxyError, RetryError)
-diff -urN requests-2.5.0.org/requests/compat.py requests-2.5.0/requests/compat.py
---- requests-2.5.0.org/requests/compat.py 2014-08-29 21:37:47.000000000 +0200
-+++ requests-2.5.0/requests/compat.py 2014-12-04 11:09:50.944504630 +0100
+diff -urNp requests-2.5.3.org/requests/compat.py requests-2.5.3/requests/compat.py
+--- requests-2.5.3.org/requests/compat.py 2015-02-24 17:27:00.000000000 +0100
++++ requests-2.5.3/requests/compat.py 2015-03-06 20:15:36.365041382 +0100
@@ -4,7 +4,7 @@
pythoncompat
"""
import sys
-@@ -91,7 +91,7 @@
+@@ -39,7 +39,7 @@ if is_py2:
import cookielib
from Cookie import Morsel
from StringIO import StringIO
builtin_str = str
bytes = str
-diff -urN requests-2.5.0.org/requests/exceptions.py requests-2.5.0/requests/exceptions.py
---- requests-2.5.0.org/requests/exceptions.py 2014-12-01 22:02:39.000000000 +0100
-+++ requests-2.5.0/requests/exceptions.py 2014-12-04 11:09:50.947838039 +0100
-@@ -7,7 +7,7 @@
+diff -urNp requests-2.5.3.org/requests/exceptions.py requests-2.5.3/requests/exceptions.py
+--- requests-2.5.3.org/requests/exceptions.py 2014-12-01 22:02:39.000000000 +0100
++++ requests-2.5.3/requests/exceptions.py 2015-03-06 20:15:36.368374796 +0100
+@@ -7,7 +7,7 @@ requests.exceptions
This module contains the set of Requests' exceptions.
"""
class RequestException(IOError):
-diff -urN requests-2.5.0.org/requests/__init__.py requests-2.5.0/requests/__init__.py
---- requests-2.5.0.org/requests/__init__.py 2014-12-02 00:22:46.000000000 +0100
-+++ requests-2.5.0/requests/__init__.py 2014-12-04 11:09:50.934504432 +0100
-@@ -50,7 +50,7 @@
+diff -urNp requests-2.5.3.org/requests/__init__.py requests-2.5.3/requests/__init__.py
+--- requests-2.5.3.org/requests/__init__.py 2015-02-24 17:33:01.000000000 +0100
++++ requests-2.5.3/requests/__init__.py 2015-03-06 20:15:36.358374555 +0100
+@@ -50,7 +50,7 @@ __copyright__ = 'Copyright 2015 Kenneth
# Attempt to enable urllib3's SNI support, if possible
try:
pyopenssl.inject_into_urllib3()
except ImportError:
pass
-diff -urN requests-2.5.0.org/requests/models.py requests-2.5.0/requests/models.py
---- requests-2.5.0.org/requests/models.py 2014-11-16 18:39:53.000000000 +0100
-+++ requests-2.5.0/requests/models.py 2014-12-04 11:09:50.951171470 +0100
-@@ -16,10 +16,10 @@
+diff -urNp requests-2.5.3.org/requests/models.py requests-2.5.3/requests/models.py
+--- requests-2.5.3.org/requests/models.py 2014-12-23 18:43:04.000000000 +0100
++++ requests-2.5.3/requests/models.py 2015-03-06 20:15:36.375041624 +0100
+@@ -16,10 +16,10 @@ from .structures import CaseInsensitiveD
from .auth import HTTPBasicAuth
from .cookies import cookiejar_from_dict, get_cookie_header
+from urllib3.filepost import encode_multipart_formdata
+from urllib3.util import parse_url
+from urllib3.exceptions import (
- DecodeError, ReadTimeoutError, ProtocolError)
+ DecodeError, ReadTimeoutError, ProtocolError, LocationParseError)
from .exceptions import (
- HTTPError, RequestException, MissingSchema, InvalidURL,
-diff -urN requests-2.5.0.org/requests/sessions.py requests-2.5.0/requests/sessions.py
---- requests-2.5.0.org/requests/sessions.py 2014-12-01 22:02:39.000000000 +0100
-+++ requests-2.5.0/requests/sessions.py 2014-12-04 11:09:51.081174694 +0100
-@@ -21,7 +21,7 @@
+ HTTPError, MissingSchema, InvalidURL, ChunkedEncodingError,
+diff -urNp requests-2.5.3.org/requests/packages/__init__.py requests-2.5.3/requests/packages/__init__.py
+--- requests-2.5.3.org/requests/packages/__init__.py 2015-02-24 17:27:00.000000000 +0100
++++ requests-2.5.3/requests/packages/__init__.py 2015-03-06 20:15:36.375041624 +0100
+@@ -65,7 +65,7 @@ class VendorAlias(object):
+ finally:
+ # Re-add any additions to sys.meta_path that were made while
+ # during the import we just did, otherwise things like
+- # requests.packages.urllib3.poolmanager will fail.
++ # urllib3.poolmanager will fail.
+ for m in sys.meta_path:
+ if m not in real_meta_path:
+ real_meta_path.append(m)
+diff -urNp requests-2.5.3.org/requests/sessions.py requests-2.5.3/requests/sessions.py
+--- requests-2.5.3.org/requests/sessions.py 2014-12-01 22:02:39.000000000 +0100
++++ requests-2.5.3/requests/sessions.py 2015-03-06 20:15:36.488377701 +0100
+@@ -21,7 +21,7 @@ from .hooks import default_hooks, dispat
from .utils import to_key_val_list, default_headers, to_native_string
from .exceptions import (
TooManyRedirects, InvalidSchema, ChunkedEncodingError, ContentDecodingError)
from .structures import CaseInsensitiveDict
from .adapters import HTTPAdapter
-diff -urN requests-2.5.0.org/setup.py requests-2.5.0/setup.py
---- requests-2.5.0.org/setup.py 2014-09-10 17:30:41.000000000 +0200
-+++ requests-2.5.0/setup.py 2014-12-04 11:10:15.661783566 +0100
-@@ -18,13 +18,6 @@
+diff -urNp requests-2.5.3.org/setup.py requests-2.5.3/setup.py
+--- requests-2.5.3.org/setup.py 2014-09-10 17:30:41.000000000 +0200
++++ requests-2.5.3/setup.py 2015-03-06 20:16:15.829329894 +0100
+@@ -18,13 +18,6 @@ if sys.argv[-1] == 'publish':
packages = [
'requests',
]
requires = []
-diff -urN requests-2.5.0.org/test_requests.py requests-2.5.0/test_requests.py
---- requests-2.5.0.org/test_requests.py 2014-12-01 23:26:18.000000000 +0100
-+++ requests-2.5.0/test_requests.py 2014-12-04 11:09:51.094508361 +0100
-@@ -1532,7 +1532,7 @@
+diff -urNp requests-2.5.3.org/test_requests.py requests-2.5.3/test_requests.py
+--- requests-2.5.3.org/test_requests.py 2015-02-24 17:27:00.000000000 +0100
++++ requests-2.5.3/test_requests.py 2015-03-06 20:15:36.498377943 +0100
+@@ -1589,7 +1589,7 @@ def test_prepare_unicode_url():
def test_urllib3_retries():
- from requests.packages.urllib3.util import Retry
+ from urllib3.util import Retry
s = requests.Session()
- s.mount('https://', HTTPAdapter(max_retries=Retry(
+ s.mount('http://', HTTPAdapter(max_retries=Retry(
total=2, status_forcelist=[500]