]> git.pld-linux.org Git - packages/python-requests.git/commitdiff
Version: 2.18.2 auto/th/python-requests-2.18.2-1
authorJacek Konieczny <j.konieczny@eggsoft.pl>
Wed, 2 Aug 2017 08:49:41 +0000 (10:49 +0200)
committerJacek Konieczny <j.konieczny@eggsoft.pl>
Wed, 2 Aug 2017 08:49:41 +0000 (10:49 +0200)
No more bundled madness in this release :)

system-cert.patch update: use system certs, but fall back to certifi if
ca-certificates package is not installed.

python-requests-remove-nested-bundling-dep.patch [deleted file]
python-requests.spec
system-cert.patch

diff --git a/python-requests-remove-nested-bundling-dep.patch b/python-requests-remove-nested-bundling-dep.patch
deleted file mode 100644 (file)
index d915a4e..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-From 8c2259d4ab03ef982738aaf863068a1015cadf3d Mon Sep 17 00:00:00 2001
-From: Ralph Bean <rbean@redhat.com>
-Date: Wed, 5 Nov 2014 10:23:44 -0500
-Subject: [PATCH] Remove nested bundling dep.
-
----
- requests/compat.py | 6 +++++-
- 1 file changed, 5 insertions(+), 1 deletion(-)
-
-diff --git a/requests/compat.py b/requests/compat.py
-index be5a1ed..70ea4e8 100644
---- a/requests/compat.py
-+++ b/requests/compat.py
-@@ -91,7 +91,11 @@ if is_py2:
-     import cookielib
-     from Cookie import Morsel
-     from StringIO import StringIO
--    from .packages.urllib3.packages.ordered_dict import OrderedDict
-+
-+    try:
-+        from collections import OrderedDict # py2.7
-+    except:
-+        from ordereddict import OrderedDict # py2.6 and lower (el6, etc.)
-     builtin_str = str
-     bytes = str
--- 
-1.9.3
-
index c8a4156769e2b9ca7545944631baba1cd2ad05b7..ad0da4deed1e90b1a747fb84c5e7e25143b19c87 100644 (file)
@@ -3,29 +3,27 @@
 %bcond_with    tests   # test target (tests not included in dist tarball as of 2.13.0)
 %bcond_without python2 # CPython 2.x module
 %bcond_without python3 # CPython 3.x module
-%bcond_without bundled # bundled libraries
 #
-%define                urllib3ver      1.20
+%define                urllib3ver      1.21.1
 %define        module  requests
 Summary:       HTTP library for Python 2
 Summary(pl.UTF-8):     Biblioteka HTTP dla Pythona 2
 Name:          python-%{module}
-Version:       2.13.0
+Version:       2.18.2
 Release:       1
 License:       Apache v2.0
 Group:         Development/Languages/Python
-Source0:       https://pypi.python.org/packages/16/09/37b69de7c924d318e51ece1c4ceb679bf93be9d05973bb30c35babd596e2/%{module}-%{version}.tar.gz
-# Source0-md5: 921ec6b48f2ddafc8bb6160957baf444
-Patch0:                %{name}-remove-nested-bundling-dep.patch
-Patch1:                system-cert.patch
+Source0:       https://pypi.python.org/packages/07/2e/81fdfdfac91cf3cb2518fb149ac67caf0e081b485eab68e9aee63396f7e8/requests-2.18.2.tar.gz
+# Source0-md5: 49bd9924d3be341871bc922cde6f372e
+Patch0:                system-cert.patch
 URL:           http://python-requests.org/
 %if %{with python2}
 BuildRequires: python-modules >= 1:2.6
-%if %{without bundled}
-BuildRequires: python-chardet >= 2.3.0
-BuildRequires: python-urllib3 >= %{urllib3ver}
-%endif
 %if %{with tests}
+BuildRequires: python-chardet >= 3.0.2
+BuildRequires: python-idna >= 2.5
+BuildRequires: python-urllib3 >= %{urllib3ver}
+BuildRequires: python-certifi >= 2017.4.17
 BuildRequires: python-pytest >= 2.8.0
 BuildRequires: python-pytest-cov
 BuildRequires: python-pytest-httpbin >= 0.0.7
@@ -34,11 +32,11 @@ BuildRequires:      python-pytest-mock
 %endif
 %if %{with python3}
 BuildRequires: python3-modules >= 1:3.2
-%if %{without bundled}
-BuildRequires: python3-chardet >= 2.3.0
-BuildRequires: python3-urllib3 >= %{urllib3ver}
-%endif
 %if %{with tests}
+BuildRequires: python3-chardet >= 3.0.2
+BuildRequires: python3-idna >= 2.5
+BuildRequires: python3-urllib3 >= %{urllib3ver}
+BuildRequires: python3-certifi >= 2017.4.17
 BuildRequires: python3-pytest >= 2.8.0
 BuildRequires: python3-pytest-cov
 BuildRequires: python3-pytest-httpbin >= 0.0.7
@@ -47,13 +45,10 @@ BuildRequires:      python3-pytest-mock
 %endif
 BuildRequires: rpm-pythonprov
 BuildRequires: rpmbuild(macros) >= 1.713
-Requires:      ca-certificates
-Requires:      python-idna >= 2.0.0
-Requires:      python-modules >= 1:2.6
-%if %{without bundled}
-Requires:      python-chardet >= 2.3.0
+Suggests:      ca-certificates
+Requires:      python-chardet >= 3.0.2
+Requires:      python-idna >= 2.5
 Requires:      python-urllib3 >= %{urllib3ver}
-%endif
 # for python2 only to get SNI working. python3 doesn't need this
 Requires:      python-ndg-httpsclient
 Requires:      python-pyasn1
@@ -88,13 +83,10 @@ Ten pakiet zawiera moduł dla Pythona 2.x.
 Summary:       HTTP library for Python 3
 Summary(pl.UTF-8):     Biblioteka HTTP dla Pythona 3
 Group:         Development/Languages/Python
-Requires:      ca-certificates
-Requires:      python3-modules >= 1:3.2
-%if %{without bundled}
-Requires:      python3-chardet >= 2.3.0
-Requires:      python3-idna >= 2.0.0
-Requires:      python3-urllib3 >= %{urllib3ver}
-%endif
+Suggests:      ca-certificates
+Requires:      python-chardet >= 3.0.2
+Requires:      python-idna >= 2.5
+Requires:      python-urllib3 >= %{urllib3ver}
 
 %description -n python3-requests
 Requests is a HTTP library, written in Python, for human beings.
@@ -121,8 +113,7 @@ Ten pakiet zawiera moduł dla Pythona 3.x.
 
 %prep
 %setup -q -n %{module}-%{version}
-%{!?with_bundled:%patch0 -p1}
-%patch1 -p1
+%patch0 -p1
 
 %build
 %if %{with python2}
@@ -147,9 +138,6 @@ rm -rf $RPM_BUILD_ROOT
 %py3_install
 %endif
 
-%{__rm} $RPM_BUILD_ROOT{%{py_sitescriptdir},%{py3_sitescriptdir}}/%{module}/cacert.pem
-%{!?with_bundled:%{__rm} -r $RPM_BUILD_ROOT{%{py_sitescriptdir},%{py3_sitescriptdir}}/%{module}/packages}
-
 %clean
 rm -rf $RPM_BUILD_ROOT
 
index 6066d304ecb491fd49f8037213efadfa13bc9ffb..082e93434b7e9685737afd923ee6bc4b122a197c 100644 (file)
@@ -1,13 +1,19 @@
---- 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
+diff -dur requests-2.18.2.orig/requests/certs.py requests-2.18.2/requests/certs.py
+--- requests-2.18.2.orig/requests/certs.py     2017-05-31 11:19:09.000000000 +0200
++++ requests-2.18.2/requests/certs.py  2017-08-01 14:30:44.000000000 +0200
+@@ -12,7 +12,14 @@
+ environment, you can change the definition of where() to return a separately
+ packaged CA bundle.
+ """
+-from certifi import where
++
++import os
++
++if os.path.exists("/etc/certs/ca-certificates.crt"):
++     def where():
 +        return "/etc/certs/ca-certificates.crt"
++else:
++    from certifi import where
  
  if __name__ == '__main__':
      print(where())
This page took 0.113134 seconds and 4 git commands to generate.