python-requests/patch-requests-certs.py-to-use-the-system-CA-bundle.patch
songnannan 81c354da8a init
2019-12-28 09:22:29 +08:00

27 lines
839 B
Diff

diff -uNrp a/requests/certs.py b/requests/certs.py
--- a/requests/certs.py 2019-12-20 15:17:38.304000000 +0800
+++ b/requests/certs.py 2019-12-20 15:25:18.952000000 +0800
@@ -11,7 +11,10 @@ If you are packaging Requests, e.g., for
environment, you can change the definition of where() to return a separately
packaged CA bundle.
"""
-from certifi import where
+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 -uNrp a/setup.py b/setup.py
--- a/setup.py 2019-12-20 15:17:38.304000000 +0800
+++ b/setup.py 2019-12-20 15:14:39.212000000 +0800
@@ -45,7 +45,6 @@ requires = [
'chardet>=3.0.2,<3.1.0',
'idna>=2.5,<2.9',
'urllib3>=1.21.1,<1.25',
- 'certifi>=2017.4.17'
]
test_requirements = [