[packages/python-requests] - up to 2.4.1

arekm arekm at pld-linux.org
Wed Sep 24 15:20:29 CEST 2014


commit 9e57f9c281857f1086da8a1a34ffdf4ed83c4e32
Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
Date:   Wed Sep 24 15:20:25 2014 +0200

    - up to 2.4.1

 python-requests.spec             | 12 +++----
 system-cert.patch                | 21 ++++++-----
 system-charade-and-urllib3.patch | 78 +++++++++++++++++++++-------------------
 3 files changed, 57 insertions(+), 54 deletions(-)
---
diff --git a/python-requests.spec b/python-requests.spec
index 5345519..315ffe6 100644
--- a/python-requests.spec
+++ b/python-requests.spec
@@ -6,31 +6,31 @@
 Summary:	HTTP library for Python
 Summary(pl.UTF-8):	Biblioteka HTTP dla Pythona
 Name:		python-%{module}
-Version:	2.3.0
+Version:	2.4.1
 Release:	1
 License:	Apache2
 Group:		Development/Languages/Python
 Source0:	https://pypi.python.org/packages/source/r/requests/%{module}-%{version}.tar.gz
-# Source0-md5:	7449ffdc8ec9ac37bbcd286003c80f00
+# Source0-md5:	931461f761c70708c46ea65b7889da58
 URL:		http://python-requests.org
 Patch0:		system-charade-and-urllib3.patch
 Patch1:		system-cert.patch
 %if %{with python2}
 BuildRequires:	python-charade
 BuildRequires:	python-modules >= 1:2.6
-BuildRequires:	python-urllib3
+BuildRequires:	python-urllib3 >= 1.9.1
 %endif
 %if %{with python3}
 BuildRequires:	python3-charade
 BuildRequires:	python3-modules >= 3.2
-BuildRequires:	python3-urllib3
+BuildRequires:	python3-urllib3 >= 1.9.1
 %endif
 BuildRequires:	rpm-pythonprov
 BuildRequires:	rpmbuild(macros) >= 1.219
 Requires:	ca-certificates
 Requires:	python-charade
 Requires:	python-modules >= 1:2.6
-Requires:	python-urllib3
+Requires:	python-urllib3 >= 1.9.1
 BuildArch:	noarch
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
@@ -60,7 +60,7 @@ Group:		Development/Languages/Python
 Requires:	ca-certificates
 Requires:	python3-charade
 Requires:	python3-modules >= 3.2
-Requires:	python3-urllib3
+Requires:	python3-urllib3 >= 1.9.1
 
 %description -n python3-requests
 Requests is a HTTP library, written in Python, for human beings.
diff --git a/system-cert.patch b/system-cert.patch
index f497bfe..6066d30 100644
--- a/system-cert.patch
+++ b/system-cert.patch
@@ -1,14 +1,13 @@
-diff -uNr requests-1.2.3/requests/certs.py requests-1.2.3.new/requests/certs.py
---- requests-1.2.3/requests/certs.py	2013-01-31 14:18:16.000000000 +0100
-+++ requests-1.2.3.new/requests/certs.py	2013-06-26 22:58:37.039694911 +0200
-@@ -17,8 +17,8 @@
- 
- def where():
-     """Return the preferred certificate bundle."""
--    # vendored bundle inside Requests
--    return os.path.join(os.path.dirname(__file__), 'cacert.pem')
-+    # system certificates from ca-certificates package
-+    return "/etc/certs/ca-certificates.crt"
+--- requests-2.4.1/requests/certs.py~	2014-08-19 18:52:58.000000000 +0200
++++ requests-2.4.1/requests/certs.py	2014-09-24 15:15:55.773227329 +0200
+@@ -18,8 +18,8 @@
+ except ImportError:
+     def where():
+         """Return the preferred certificate bundle."""
+-        # vendored bundle inside Requests
+-        return os.path.join(os.path.dirname(__file__), 'cacert.pem')
++        # system certificates from ca-certificates package
++        return "/etc/certs/ca-certificates.crt"
  
  if __name__ == '__main__':
      print(where())
diff --git a/system-charade-and-urllib3.patch b/system-charade-and-urllib3.patch
index dc8a807..39799c8 100644
--- a/system-charade-and-urllib3.patch
+++ b/system-charade-and-urllib3.patch
@@ -1,36 +1,42 @@
-diff -urN requests-2.3.0.org/requests/adapters.py requests-2.3.0/requests/adapters.py
---- requests-2.3.0.org/requests/adapters.py	2014-05-16 19:44:21.000000000 +0200
-+++ requests-2.3.0/requests/adapters.py	2014-06-16 22:42:34.347879580 +0200
-@@ -11,18 +11,18 @@
+diff -urN requests-2.4.1.org/requests/adapters.py requests-2.4.1/requests/adapters.py
+--- requests-2.4.1.org/requests/adapters.py	2014-09-09 18:31:17.000000000 +0200
++++ requests-2.4.1/requests/adapters.py	2014-09-24 15:13:26.999475101 +0200
+@@ -11,21 +11,21 @@
  import socket
  
  from .models import Response
+-from .packages.urllib3 import Retry
 -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 import Retry
 +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 .compat import urlparse, basestring, urldefrag
  from .utils import (DEFAULT_CA_BUNDLE_PATH, get_encoding_from_headers,
                      prepend_scheme_if_needed, get_auth_from_url)
  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 ConnectTimeoutError
 -from .packages.urllib3.exceptions import HTTPError as _HTTPError
+-from .packages.urllib3.exceptions import MaxRetryError
 -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 .packages.urllib3.exceptions import ProtocolError
+-from .packages.urllib3.exceptions import ReadTimeoutError
+-from .packages.urllib3.exceptions import SSLError as _SSLError
++from urllib3.exceptions import ConnectTimeoutError
 +from urllib3.exceptions import HTTPError as _HTTPError
++from urllib3.exceptions import MaxRetryError
 +from urllib3.exceptions import ProxyError as _ProxyError
++from urllib3.exceptions import ProtocolError
++from urllib3.exceptions import ReadTimeoutError
++from urllib3.exceptions import SSLError as _SSLError
  from .cookies import extract_cookies_to_jar
- from .exceptions import ConnectionError, Timeout, SSLError, ProxyError
- from .auth import _basic_auth_str
-diff -urN requests-2.3.0.org/requests/compat.py requests-2.3.0/requests/compat.py
---- requests-2.3.0.org/requests/compat.py	2014-01-24 21:37:17.000000000 +0100
-+++ requests-2.3.0/requests/compat.py	2014-06-16 22:45:55.708024685 +0200
+ from .exceptions import (ConnectionError, ConnectTimeout, ReadTimeout, SSLError,
+                          ProxyError)
+diff -urN requests-2.4.1.org/requests/compat.py requests-2.4.1/requests/compat.py
+--- requests-2.4.1.org/requests/compat.py	2014-08-19 18:52:58.000000000 +0200
++++ requests-2.4.1/requests/compat.py	2014-09-24 15:14:24.687597504 +0200
 @@ -4,7 +4,7 @@
  pythoncompat
  """
@@ -40,18 +46,18 @@ diff -urN requests-2.3.0.org/requests/compat.py requests-2.3.0/requests/compat.p
  
  import sys
  
-@@ -89,7 +89,7 @@
+@@ -91,7 +91,7 @@
      import cookielib
      from Cookie import Morsel
      from StringIO import StringIO
 -    from .packages.urllib3.packages.ordered_dict import OrderedDict
 +    from urllib3.packages.ordered_dict import OrderedDict
-     from httplib import IncompleteRead
  
      builtin_str = str
-diff -urN requests-2.3.0.org/requests/exceptions.py requests-2.3.0/requests/exceptions.py
---- requests-2.3.0.org/requests/exceptions.py	2014-03-24 16:39:20.000000000 +0100
-+++ requests-2.3.0/requests/exceptions.py	2014-06-16 22:42:34.347879580 +0200
+     bytes = str
+diff -urN requests-2.4.1.org/requests/exceptions.py requests-2.4.1/requests/exceptions.py
+--- requests-2.4.1.org/requests/exceptions.py	2014-09-09 18:31:17.000000000 +0200
++++ requests-2.4.1/requests/exceptions.py	2014-09-24 15:13:27.002808518 +0200
 @@ -7,7 +7,7 @@
  This module contains the set of Requests' exceptions.
  
@@ -61,9 +67,9 @@ diff -urN requests-2.3.0.org/requests/exceptions.py requests-2.3.0/requests/exce
  
  
  class RequestException(IOError):
-diff -urN requests-2.3.0.org/requests/__init__.py requests-2.3.0/requests/__init__.py
---- requests-2.3.0.org/requests/__init__.py	2014-05-16 19:55:34.000000000 +0200
-+++ requests-2.3.0/requests/__init__.py	2014-06-16 22:42:34.351213026 +0200
+diff -urN requests-2.4.1.org/requests/__init__.py requests-2.4.1/requests/__init__.py
+--- requests-2.4.1.org/requests/__init__.py	2014-09-09 18:34:25.000000000 +0200
++++ requests-2.4.1/requests/__init__.py	2014-09-24 15:13:27.002808518 +0200
 @@ -50,7 +50,7 @@
  
  # Attempt to enable urllib3's SNI support, if possible
@@ -73,9 +79,9 @@ diff -urN requests-2.3.0.org/requests/__init__.py requests-2.3.0/requests/__init
      pyopenssl.inject_into_urllib3()
  except ImportError:
      pass
-diff -urN requests-2.3.0.org/requests/models.py requests-2.3.0/requests/models.py
---- requests-2.3.0.org/requests/models.py	2014-05-12 21:08:50.000000000 +0200
-+++ requests-2.3.0/requests/models.py	2014-06-16 22:42:34.351213026 +0200
+diff -urN requests-2.4.1.org/requests/models.py requests-2.4.1/requests/models.py
+--- requests-2.4.1.org/requests/models.py	2014-08-19 18:52:58.000000000 +0200
++++ requests-2.4.1/requests/models.py	2014-09-24 15:13:27.002808518 +0200
 @@ -16,10 +16,10 @@
  
  from .auth import HTTPBasicAuth
@@ -83,22 +89,21 @@ diff -urN requests-2.3.0.org/requests/models.py requests-2.3.0/requests/models.p
 -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 .packages.urllib3.exceptions import (
 +from urllib3.fields import RequestField
 +from urllib3.filepost import encode_multipart_formdata
 +from urllib3.util import parse_url
-+from urllib3.exceptions import DecodeError
++from urllib3.exceptions import (
+     DecodeError, ReadTimeoutError, ProtocolError)
  from .exceptions import (
      HTTPError, RequestException, MissingSchema, InvalidURL,
-     ChunkedEncodingError, ContentDecodingError)
-diff -urN requests-2.3.0.org/setup.py requests-2.3.0/setup.py
---- requests-2.3.0.org/setup.py	2014-05-12 21:08:50.000000000 +0200
-+++ requests-2.3.0/setup.py	2014-06-16 22:43:05.005583540 +0200
-@@ -15,14 +15,7 @@
-     sys.exit()
+diff -urN requests-2.4.1.org/setup.py requests-2.4.1/setup.py
+--- requests-2.4.1.org/setup.py	2014-09-09 18:31:17.000000000 +0200
++++ requests-2.4.1/setup.py	2014-09-24 15:14:43.654742562 +0200
+@@ -18,13 +18,6 @@
  
  packages = [
--    'requests',
+     'requests',
 -    'requests.packages',
 -    'requests.packages.chardet',
 -    'requests.packages.urllib3',
@@ -106,7 +111,6 @@ diff -urN requests-2.3.0.org/setup.py requests-2.3.0/setup.py
 -    'requests.packages.urllib3.contrib',
 -    'requests.packages.urllib3.util',
 -    'requests.packages.urllib3.packages.ssl_match_hostname',
-+    'requests'
  ]
  
  requires = []
================================================================

---- gitweb:

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



More information about the pld-cvs-commit mailing list