1 Star 0 Fork 30

renliang16/python-requests

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
backport-patch-requests-certs.py-to-use-the-system-CA-bundle.patch 1.33 KB
一键复制 编辑 原始数据 按行查看 历史
wangkerong 提交于 2021-12-09 15:51 . update to 2.26.0
From cc1b9954ca7dcd90a694f7e2e9990c883bf7b647 Mon Sep 17 00:00:00 2001
From: Lumir Balhar <lbalhar@redhat.com>
Date: Wed, 21 Jul 2021 12:05:53 +0200
Subject: [PATCH] patch-requests-certs.py-to-use-the-system-CA-bundle
Reference:
https://src.fedoraproject.org/rpms/python-requests/blob/rawhide/f/patch-requests-certs.py-to-use-the-system-CA-bundle.patch
---
diff --git a/requests/certs.py b/requests/certs.py
index a14a7ee..a1841ca 100644
--- a/requests/certs.py
+++ b/requests/certs.py
@@ -10,8 +10,12 @@ 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.
-"""
-from certifi import where
+This OpenEuler-patched package returns "/etc/pki/tls/certs/ca-bundle.crt" provided
+by the ca-certificates RPM package.
+"""
+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 ce5e5c8..de86a91 100755
--- a/setup.py
+++ b/setup.py
@@ -46,7 +46,6 @@ requires = [
'idna>=2.5,<3; python_version < "3"',
'idna>=2.5,<4; python_version >= "3"',
'urllib3>=1.21.1,<1.27',
- 'certifi>=2017.4.17'
]
test_requirements = [
--
2.27.0
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/renliang16/python-requests.git
git@gitee.com:renliang16/python-requests.git
renliang16
python-requests
python-requests
master

搜索帮助