File python3-requests-boo912903-default-cacert.patch of Package python3-requests.5869
From ebc235e9cce6e8c2eb213ccc30bf1f7b6ec43d16 Mon Sep 17 00:00:00 2001
From: Federico Mena Quintero <federico@gnome.org>
Date: Tue, 3 May 2016 09:50:59 -0500
Subject: [PATCH] Use the system's CA for TLS verification
https://bugzilla.opensuse.org/show_bug.cgi?id=912903
The version of python3-requests in openSUSE 13.2 does not have an
urllib with support for the CA as a directory full of PEM files; it
wants the CA to be in a single file (support for that appeared
upstream in commit 35170e180e45126b6cb9da5d9f93c41f7b77ef58, but
depends on a newer bundled urllib than what we have here).
So, we simply point the default location to openSUSE's own, instead of
the bundled CA that comes with python3-requests.
---
MANIFEST.in | 2 +-
requests/certs.py | 5 +++--
setup.py | 2 +-
3 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/MANIFEST.in b/MANIFEST.in
index 439de49..7888aee 100644
--- a/MANIFEST.in
+++ b/MANIFEST.in
@@ -1 +1 @@
-include README.rst LICENSE NOTICE HISTORY.rst test_requests.py requirements.txt requests/cacert.pem
+include README.rst LICENSE NOTICE HISTORY.rst test_requests.py requirements.txt
diff --git a/requests/certs.py b/requests/certs.py
index 9dd0d8f..43ab067 100644
--- a/requests/certs.py
+++ b/requests/certs.py
@@ -17,8 +17,9 @@ try:
except ImportError:
def where():
"""Return the preferred certificate bundle."""
- # vendored bundle inside Requests
- return os.path.join(os.path.dirname(__file__), 'cacert.pem')
+ # in openSUSE we rely on ca-certificates instead of
+ # having an another bundle
+ return '/etc/ssl/ca-bundle.pem'
if __name__ == '__main__':
print(where())
diff --git a/setup.py b/setup.py
index 813fc87..4f06219 100755
--- a/setup.py
+++ b/setup.py
@@ -43,7 +43,7 @@ setup(
author_email='me@kennethreitz.com',
url='http://python-requests.org',
packages=packages,
- package_data={'': ['LICENSE', 'NOTICE'], 'requests': ['*.pem']},
+ package_data={'': ['LICENSE', 'NOTICE']},
package_dir={'requests': 'requests'},
include_package_data=True,
install_requires=requires,
--
2.1.4