1 Star 0 Fork 30

shangyibin/python-requests

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
patch-requests-certs.py-to-use-the-system-CA-bundle.patch 1.33 KB
一键复制 编辑 原始数据 按行查看 历史
吴超超 提交于 2020-08-04 18:27 . add patch
From aad5590d5ea47dc54cfd97da54f2640014f7d39d 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 <jcline@redhat.com>
---
diff -Naur requests-2.24.0/requests/certs.py requests-1/requests/certs.py
--- requests-2.24.0/requests/certs.py 2020-08-04 18:05:14.250000000 +0800
+++ requests-1/requests/certs.py 2020-08-04 18:07:20.652000000 +0800
@@ -10,8 +10,13 @@
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.
+
+This Fedora-patched package returns "/etc/pki/tls/certs/ca-bundle.crt" provided
+by the ca-certificates RPM package.
"""
-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 -Naur requests-2.24.0/setup.py requests-1/setup.py
--- requests-2.24.0/setup.py 2020-08-04 18:05:14.250000000 +0800
+++ requests-1/setup.py 2020-08-04 18:07:46.508000000 +0800
@@ -45,7 +45,6 @@
'chardet>=3.0.2,<4',
'idna>=2.5,<3',
'urllib3>=1.21.1,<1.26,!=1.25.0,!=1.25.1',
- 'certifi>=2017.4.17'
]
test_requirements = [
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/shangyibin/python-requests.git
git@gitee.com:shangyibin/python-requests.git
shangyibin
python-requests
python-requests
master

搜索帮助