[python-requests] Update to python-requests-1.1.0 (rhbz #915476)
Ralph Bean ☃
ralph at fedoraproject.org
Wed Feb 27 14:35:59 UTC 2013
commit 9d1befdf087ab4e145ed369133197561abfe288a
Author: Ralph Bean <rbean at redhat.com>
Date: Wed Feb 27 09:35:23 2013 -0500
Update to python-requests-1.1.0 (rhbz #915476)
.gitignore | 1 +
python-requests-cookie-handling.patch | 35 -------------------
python-requests-system-cert-bundle.patch | 54 ++++++++++++++++++++++-------
python-requests.spec | 34 +++++++++++++------
sources | 2 +-
5 files changed, 66 insertions(+), 60 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index 321be65..3fb1685 100644
--- a/.gitignore
+++ b/.gitignore
@@ -9,3 +9,4 @@
/requests-0.11.1.tar.gz
/requests-0.13.1.tar.gz
/requests-0.14.1.tar.gz
+/requests-1.1.0.tar.gz
diff --git a/python-requests-system-cert-bundle.patch b/python-requests-system-cert-bundle.patch
index 198e4c2..9184c66 100644
--- a/python-requests-system-cert-bundle.patch
+++ b/python-requests-system-cert-bundle.patch
@@ -1,16 +1,44 @@
-Index: requests-0.14.1/requests/certs.py
-===================================================================
---- requests-0.14.1.orig/requests/certs.py
-+++ requests-0.14.1/requests/certs.py
-@@ -21,7 +21,10 @@ def where():
- return certifi.where()
- else:
- f = os.path.split(__file__)[0]
-- return os.path.join(f, 'cacert.pem')
-+ path = os.path.join(f, 'cacert.pem')
-+ if os.path.exists(path):
-+ return path
-+ return None
+From 415619361cc23dd87b1a7a5fd0cfba38e33d24fd Mon Sep 17 00:00:00 2001
+From: Ralph Bean <rbean at redhat.com>
+Date: Wed, 27 Feb 2013 09:16:20 -0500
+Subject: [PATCH] system cert bundle
+
+---
+ requests/certs.py | 17 +++++------------
+ 1 file changed, 5 insertions(+), 12 deletions(-)
+
+diff --git a/requests/certs.py b/requests/certs.py
+index 8148276..6e07f5e 100644
+--- a/requests/certs.py
++++ b/requests/certs.py
+@@ -10,22 +10,15 @@ This module returns the preferred default CA certificate bundle.
+ If you are packaging Requests, e.g., for a Linux distribution or a managed
+ environment, you can change the definition of where() to return a separately
+ packaged CA bundle.
+-"""
+-
+-import os.path
+
+-certifi = None
+-try:
+- import certifi
+-except ImportError:
+- pass
++We return "/etc/pki/tls/certs/ca-bundle.crt" provided by the ca-certificates
++package.
++"""
+
+ def where():
+ """Return the preferred certificate bundle."""
+- if certifi:
+- return certifi.where()
+-
+- return os.path.join(os.path.dirname(__file__), 'cacert.pem')
++ # Don't use the certs bundled with requests, use ca-certificates'.
++ return "/etc/pki/tls/certs/ca-bundle.crt"
if __name__ == '__main__':
print(where())
+--
+1.8.1.2
+
diff --git a/python-requests.spec b/python-requests.spec
index 9dc34dd..caa6298 100644
--- a/python-requests.spec
+++ b/python-requests.spec
@@ -3,21 +3,17 @@
%else
%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print (get_python_lib())")}
%endif
+
Name: python-requests
-Version: 0.14.1
-Release: 4%{?dist}
+Version: 1.1.0
+Release: 1%{?dist}
Summary: HTTP library, written in Python, for human beings
-License: ISC and MIT
+License: ASL 2.0
URL: http://pypi.python.org/pypi/requests
Source0: http://pypi.python.org/packages/source/r/requests/requests-%{version}.tar.gz
-# Separate response cookies from request cookies discussed here:
-# https://github.com/fedora-infra/python-fedora/pull/6
-Patch0: python-requests-cookie-handling.patch
-# Use the system certificates in ca-certificates. This patch causes util.py
-# to search for the system bundle (whereas now the return value of
-# certs.where() causes it to always use the bundled version.
-Patch1: python-requests-system-cert-bundle.patch
+# Explicitly use the system certificates in ca-certificates.
+Patch0: python-requests-system-cert-bundle.patch
BuildArch: noarch
BuildRequires: python2-devel
@@ -45,7 +41,6 @@ designed to make HTTP requests easy for developers.
%setup -q -n requests-%{version}
%patch0 -p1
-%patch1 -p1
### TODO: Need to unbundle libraries in the packages directory.
### https://bugzilla.redhat.com/show_bug.cgi?id=904623
@@ -97,6 +92,16 @@ popd
%{__python} setup.py install --skip-build --root $RPM_BUILD_ROOT
+## The tests succeed if run locally, but fail in koji.
+## They require an active network connection to query httpbin.org
+#%%check
+#%%{__python} test_requests.py
+#%%if 0%%{?_with_python3}
+#pushd %%{py3dir}
+#%%{__python3} test_requests.py
+#popd
+#%%endif
+
%files
%defattr(-,root,root,-)
%doc NOTICE LICENSE README.rst HISTORY.rst
@@ -112,6 +117,13 @@ popd
%changelog
+* Tue Feb 26 2013 Ralph Bean <rbean at redhat.com> - 1.1.0-1
+- Latest upstream.
+- Relicense to ASL 2.0 with upstream.
+- Removed cookie handling patch (fixed in upstream tarball).
+- Updated cert unbundling patch to match upstream.
+- Added check section, but left it commented out for koji.
+
* Fri Feb 8 2013 Toshio Kuratomi <toshio at fedoraproject.org> - 0.14.1-4
- Let brp_python_bytecompile run again, take care of the non-python{2,3} modules
by removing them from the python{,3}-requests package that they did not belong
diff --git a/sources b/sources
index 611d373..f5403f5 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-3de30600072cbc7214ae342d1d08aa46 requests-0.14.1.tar.gz
+a0158815af244c32041a3147ee09abf3 requests-1.1.0.tar.gz
More information about the scm-commits
mailing list