From bfe36edfe23ef8c1cffca4821256472bffa45ad5 Mon Sep 17 00:00:00 2001 From: Jeremy Cline Date: Dec 13 2018 19:09:27 +0000 Subject: 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. --- diff --git a/.gitignore b/.gitignore index ed2dec9..fc73346 100644 --- a/.gitignore +++ b/.gitignore @@ -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 diff --git a/patch-requests-certs.py-to-use-the-system-CA-bundle.patch b/patch-requests-certs.py-to-use-the-system-CA-bundle.patch index a3db03e..dce238d 100644 --- a/patch-requests-certs.py-to-use-the-system-CA-bundle.patch +++ b/patch-requests-certs.py-to-use-the-system-CA-bundle.patch @@ -1,19 +1,19 @@ -From a8ef690988f92a56226f8b688f1a3638346bca8e Mon Sep 17 00:00:00 2001 -From: Jeremy Cline -Date: Mon, 19 Jun 2017 16:09:02 -0400 +From d5a4f2908fab5ca16eb59db8b18eda7a94a37b04 Mon Sep 17 00:00:00 2001 +From: Jeremy Cline +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 +Signed-off-by: Jeremy Cline --- - requests/certs.py | 11 ++++++++++- - setup.py | 1 - - 2 files changed, 10 insertions(+), 2 deletions(-) + requests/certs.py | 8 +++++++- + setup.py | 1 - + 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,28 +22,25 @@ 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' ++def where(): ++ """Return the absolute path to the system CA bundle.""" ++ return '/etc/pki/tls/certs/ca-bundle.crt' + 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 diff --git a/python-requests.spec b/python-requests.spec index d49fda5..5726f16 100644 --- a/python-requests.spec +++ b/python-requests.spec @@ -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 - 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 - 2.20.0-2 - No pytest-httpbin for Python 2 diff --git a/sources b/sources index f80c529..1afe815 100644 --- a/sources +++ b/sources @@ -1 +1,2 @@ SHA512 (requests-v2.20.0.tar.gz) = 766c69d1778e7286232fcd750842e89cd9bb6637076e80fe95fb67f3ccb14049bf74a533de91ef9451ac6f397ad0a6d148eb444009f501178138cdeffc5ee7c4 +SHA512 (requests-v2.21.0.tar.gz) = 934c329e6631ec6089577c49651b73265f0c3f0829b9151e1463dea905f35820a03ec3b0ee6a2ab2292d213b715f0b2348110392d60f55ea1cbe4b24fca4f890