Update to v2.21.0

Also adjust the patch that forces the system CA bundle to be used so
that behavior doesn't change if python-certifi is installed. It's
patched to point at the system CA bundle as well, but there's no reason
we need to assume that or use it.
This commit is contained in:
Jeremy Cline 2018-12-13 10:59:21 -05:00
parent 33bb8ea0e5
commit bfe36edfe2
No known key found for this signature in database
GPG Key ID: 9223308FA9B246DB
4 changed files with 23 additions and 20 deletions

1
.gitignore vendored
View File

@ -40,3 +40,4 @@
/requests-v2.19.0.tar.gz
/requests-v2.19.1.tar.gz
/requests-v2.20.0.tar.gz
/requests-v2.21.0.tar.gz

View File

@ -1,19 +1,19 @@
From a8ef690988f92a56226f8b688f1a3638346bca8e Mon Sep 17 00:00:00 2001
From: Jeremy Cline <jeremy@jcline.org>
Date: Mon, 19 Jun 2017 16:09:02 -0400
From d5a4f2908fab5ca16eb59db8b18eda7a94a37b04 Mon Sep 17 00:00:00 2001
From: Jeremy Cline <jcline@redhat.com>
Date: Thu, 13 Dec 2018 10:55:29 -0500
Subject: [PATCH] Patch requests/certs.py to use the system CA bundle
Signed-off-by: Jeremy Cline <jeremy@jcline.org>
Signed-off-by: Jeremy Cline <jcline@redhat.com>
---
requests/certs.py | 11 ++++++++++-
requests/certs.py | 8 +++++++-
setup.py | 1 -
2 files changed, 10 insertions(+), 2 deletions(-)
2 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/requests/certs.py b/requests/certs.py
index d1a378d7..7b103baf 100644
index d1a378d7..5eb2f1a9 100644
--- a/requests/certs.py
+++ b/requests/certs.py
@@ -11,8 +11,17 @@ only one — the one from the certifi package.
@@ -11,8 +11,14 @@ only one — the one from the certifi package.
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.
@ -22,9 +22,6 @@ index d1a378d7..7b103baf 100644
+by the ca-certificates RPM package.
"""
-from certifi import where
+try:
+ from certifi import where
+except ImportError:
+def where():
+ """Return the absolute path to the system CA bundle."""
+ return '/etc/pki/tls/certs/ca-bundle.crt'
@ -33,17 +30,17 @@ index d1a378d7..7b103baf 100644
if __name__ == '__main__':
print(where())
diff --git a/setup.py b/setup.py
index 4e2ad936..60de5861 100755
index 10ce2c62..1f3b2bde 100755
--- a/setup.py
+++ b/setup.py
@@ -45,7 +45,6 @@ requires = [
'chardet>=3.0.2,<3.1.0',
'idna>=2.5,<2.8',
'idna>=2.5,<2.9',
'urllib3>=1.21.1,<1.25',
- 'certifi>=2017.4.17'
]
test_requirements = [
--
2.19.1
2.19.2

View File

@ -9,8 +9,8 @@
Name: python-requests
Version: 2.20.0
Release: 2%{?dist}
Version: 2.21.0
Release: 1%{?dist}
Summary: HTTP library, written in Python, for human beings
License: ASL 2.0
@ -141,6 +141,10 @@ PYTHONPATH=%{buildroot}%{python3_sitelib} %{__python3} -m pytest -v
%changelog
* Thu Dec 13 2018 Jeremy Cline <jeremy@jcline.org> - 2.21.0-1
- Update to v2.21.0
- Don't rely on certifi being patched properly to use the system CA bundle
* Mon Nov 26 2018 Miro Hrončok <mhroncok@redhat.com> - 2.20.0-2
- No pytest-httpbin for Python 2

View File

@ -1 +1,2 @@
SHA512 (requests-v2.20.0.tar.gz) = 766c69d1778e7286232fcd750842e89cd9bb6637076e80fe95fb67f3ccb14049bf74a533de91ef9451ac6f397ad0a6d148eb444009f501178138cdeffc5ee7c4
SHA512 (requests-v2.21.0.tar.gz) = 934c329e6631ec6089577c49651b73265f0c3f0829b9151e1463dea905f35820a03ec3b0ee6a2ab2292d213b715f0b2348110392d60f55ea1cbe4b24fca4f890