9 Star 1 Fork 30

src-openEuler/python-requests

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
backport-requests-2.32.3-system-certs.patch 1.62 KB
一键复制 编辑 原始数据 按行查看 历史
大漠行舟 提交于 2025-03-14 11:27 +08:00 . Update package with version 2.32.3
From e48b28986afc72e145a3e1138b110b4ba684b267 Mon Sep 17 00:00:00 2001
From: desert-sailor <dongxing.wang_a@thundersoft.com>
Date: Fri, 14 Mar 2025 11:10:32 +0800
Subject: [PATCH] backport requests-2.32.3 system-certs
---
setup.cfg | 1 -
setup.py | 1 -
src/requests/certs.py | 8 +++++++-
3 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/setup.cfg b/setup.cfg
index 8d44e0e..fa10a53 100644
--- a/setup.cfg
+++ b/setup.cfg
@@ -4,7 +4,6 @@ provides-extra =
socks
use_chardet_on_py3
requires-dist =
- certifi>=2017.4.17
charset_normalizer>=2,<4
idna>=2.5,<4
urllib3>=1.21.1,<3
diff --git a/setup.py b/setup.py
index 1b0eb37..03d19b0 100755
--- a/setup.py
+++ b/setup.py
@@ -62,7 +62,6 @@ requires = [
"charset_normalizer>=2,<4",
"idna>=2.5,<4",
"urllib3>=1.21.1,<3",
- "certifi>=2017.4.17",
]
test_requirements = [
"pytest-httpbin==2.0.0",
diff --git a/src/requests/certs.py b/src/requests/certs.py
index be422c3..6b4f8b0 100644
--- a/src/requests/certs.py
+++ b/src/requests/certs.py
@@ -10,8 +10,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.
+
+This OpenEuler-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())
--
2.43.0
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/src-openeuler/python-requests.git
git@gitee.com:src-openeuler/python-requests.git
src-openeuler
python-requests
python-requests
master

搜索帮助