Latest upstream, 2.4.3 for #1136283

This commit is contained in:
Ralph Bean 2014-11-05 10:30:35 -05:00
parent 1dbd573777
commit 85d9fba1a5
3 changed files with 32 additions and 30 deletions

View File

@ -1,31 +1,29 @@
From e74bf477e53f9089e6d763d676333c9d84ab71e0 Mon Sep 17 00:00:00 2001 From 8c2259d4ab03ef982738aaf863068a1015cadf3d Mon Sep 17 00:00:00 2001
From: Ralph Bean <rbean@redhat.com> From: Ralph Bean <rbean@redhat.com>
Date: Wed, 5 Nov 2014 09:38:42 -0500 Date: Wed, 5 Nov 2014 10:23:44 -0500
Subject: [PATCH] Remove nested budnling dep. Subject: [PATCH] Remove nested bundling dep.
--- ---
requests/compat.py | 6 +++++- requests/compat.py | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-) 1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/requests/compat.py b/requests/compat.py diff --git a/requests/compat.py b/requests/compat.py
index bdf10d6..29cce93 100644 index be5a1ed..70ea4e8 100644
--- a/requests/compat.py --- a/requests/compat.py
+++ b/requests/compat.py +++ b/requests/compat.py
@@ -89,9 +89,13 @@ if is_py2: @@ -91,7 +91,11 @@ if is_py2:
import cookielib import cookielib
from Cookie import Morsel from Cookie import Morsel
from StringIO import StringIO from StringIO import StringIO
- from .packages.urllib3.packages.ordered_dict import OrderedDict - from .packages.urllib3.packages.ordered_dict import OrderedDict
from httplib import IncompleteRead +
+ try: + try:
+ from collections import OrderedDict # py2.7 + from collections import OrderedDict # py2.7
+ except: + except:
+ from ordereddict import OrderedDict # py2.6 and lower (el6, etc.) + from ordereddict import OrderedDict # py2.6 and lower (el6, etc.)
+
builtin_str = str builtin_str = str
bytes = str bytes = str
str = unicode
-- --
1.9.3 1.9.3

View File

@ -1,37 +1,38 @@
From ad98b45e959dc7325c294c26d94e68901700c407 Mon Sep 17 00:00:00 2001 From a49b39fbfe01791880c6e7179f6efdad03e8ce58 Mon Sep 17 00:00:00 2001
From: Ralph Bean <rbean@redhat.com> From: Ralph Bean <rbean@redhat.com>
Date: Mon, 1 Jul 2013 14:50:34 -0400 Date: Wed, 5 Nov 2014 10:15:17 -0500
Subject: [PATCH 1/3] system cert bundle Subject: [PATCH] system cert bundle
--- ---
requests/certs.py | 10 +++++----- requests/certs.py | 9 +++++----
1 file changed, 5 insertions(+), 5 deletions(-) 1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/requests/certs.py b/requests/certs.py diff --git a/requests/certs.py b/requests/certs.py
index bc00826..9b78e3b 100644 index 07e6475..2c7ca96 100644
--- a/requests/certs.py --- a/requests/certs.py
+++ b/requests/certs.py +++ b/requests/certs.py
@@ -10,15 +10,15 @@ This module returns the preferred default CA certificate bundle. @@ -10,16 +10,17 @@ This module returns the preferred default CA certificate bundle.
If you are packaging Requests, e.g., for a Linux distribution or a managed 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 environment, you can change the definition of where() to return a separately
packaged CA bundle. packaged CA bundle.
-""" +
-import os.path
+We return "/etc/pki/tls/certs/ca-bundle.crt" provided by the ca-certificates +We return "/etc/pki/tls/certs/ca-bundle.crt" provided by the ca-certificates
+package. +package.
+""" """
-import os.path
try:
def where(): from certifi import where
- """Return the preferred certificate bundle.""" except ImportError:
- # vendored bundle inside Requests def where():
- return os.path.join(os.path.dirname(__file__), 'cacert.pem') - """Return the preferred certificate bundle."""
+ """ Don't use the certs bundled with requests, use ca-certificates. """ - # vendored bundle inside Requests
+ return "/etc/pki/tls/certs/ca-bundle.crt" - 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__': if __name__ == '__main__':
print(where()) print(where())
-- --
1.8.3.1 1.9.3

View File

@ -5,8 +5,8 @@
%endif %endif
Name: python-requests Name: python-requests
Version: 2.3.0 Version: 2.4.3
Release: 4%{?dist} Release: 1%{?dist}
Summary: HTTP library, written in Python, for human beings Summary: HTTP library, written in Python, for human beings
License: ASL 2.0 License: ASL 2.0
@ -130,6 +130,9 @@ ln -s ../../urllib3 %{buildroot}/%{python_sitelib}/requests/packages/urllib3
%endif %endif
%changelog %changelog
* Wed Nov 05 2014 Ralph Bean <rbean@redhat.com> - 2.4.3-1
- Latest upstream, 2.4.3 for #1136283
* Wed Nov 05 2014 Ralph Bean <rbean@redhat.com> - 2.3.0-4 * Wed Nov 05 2014 Ralph Bean <rbean@redhat.com> - 2.3.0-4
- Re-do unbundling by symlinking system libs into the requests/packages/ dir. - Re-do unbundling by symlinking system libs into the requests/packages/ dir.