[packages/python-requests] - up to 2.5.3

arekm arekm at pld-linux.org
Fri Mar 6 20:22:27 CET 2015


commit d49507cd095d39ae2211428e9cca4c282e9a30c3
Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
Date:   Fri Mar 6 20:22:22 2015 +0100

    - up to 2.5.3

 python-requests.spec             | 13 ++++---
 system-charade-and-urllib3.patch | 82 +++++++++++++++++++++++-----------------
 2 files changed, 54 insertions(+), 41 deletions(-)
---
diff --git a/python-requests.spec b/python-requests.spec
index bc75a3c..612fb48 100644
--- a/python-requests.spec
+++ b/python-requests.spec
@@ -5,16 +5,17 @@
 %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' "{}" ";"
@@ -26,7 +27,7 @@ Patch1:		system-cert.patch
 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
@@ -34,7 +35,7 @@ BuildRequires:	python-urllib3 >= 1.9.1
 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
@@ -44,7 +45,7 @@ Requires:	ca-certificates
 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
@@ -84,7 +85,7 @@ Requires:	ca-certificates
 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 --git a/system-charade-and-urllib3.patch b/system-charade-and-urllib3.patch
index ea93fd9..7237dc1 100644
--- a/system-charade-and-urllib3.patch
+++ b/system-charade-and-urllib3.patch
@@ -1,7 +1,7 @@
-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
@@ -36,9 +36,9 @@ diff -urN requests-2.5.0.org/requests/adapters.py requests-2.5.0/requests/adapte
  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
  """
@@ -48,7 +48,7 @@ diff -urN requests-2.5.0.org/requests/compat.py requests-2.5.0/requests/compat.p
  
  import sys
  
-@@ -91,7 +91,7 @@
+@@ -39,7 +39,7 @@ if is_py2:
      import cookielib
      from Cookie import Morsel
      from StringIO import StringIO
@@ -57,10 +57,10 @@ diff -urN requests-2.5.0.org/requests/compat.py requests-2.5.0/requests/compat.p
  
      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.
  
  """
@@ -69,10 +69,10 @@ diff -urN requests-2.5.0.org/requests/exceptions.py requests-2.5.0/requests/exce
  
  
  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:
@@ -81,10 +81,10 @@ diff -urN requests-2.5.0.org/requests/__init__.py requests-2.5.0/requests/__init
      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
@@ -96,13 +96,25 @@ diff -urN requests-2.5.0.org/requests/models.py requests-2.5.0/requests/models.p
 +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)
@@ -111,10 +123,10 @@ diff -urN requests-2.5.0.org/requests/sessions.py requests-2.5.0/requests/sessio
  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',
@@ -128,15 +140,15 @@ diff -urN requests-2.5.0.org/setup.py requests-2.5.0/setup.py
  ]
  
  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]
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/python-requests.git/commitdiff/d49507cd095d39ae2211428e9cca4c282e9a30c3



More information about the pld-cvs-commit mailing list