diff --git a/0001-backport-requests-2.31.0-system-certs.patch b/0001-backport-requests-2.31.0-system-certs.patch new file mode 100644 index 0000000000000000000000000000000000000000..71f599afc8e56092fb12e41dc255dc60ea299066 --- /dev/null +++ b/0001-backport-requests-2.31.0-system-certs.patch @@ -0,0 +1,58 @@ +From fb6c0566a4799362c9548f960b6818bf0648c070 Mon Sep 17 00:00:00 2001 +From: liuzhilin +Date: Mon, 3 Jun 2024 18:46:24 +0800 +Subject: [PATCH] backport-requests-2.31.0-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 + diff --git a/python-requests.spec b/python-requests.spec index 251c455ed2546d7c8f6026ad7e7da2fe52d757f1..1a1423897ea624441f770bbba7e3733ea63a51d6 100644 --- a/python-requests.spec +++ b/python-requests.spec @@ -1,13 +1,13 @@ %bcond_with tests Name: python-requests -Version: 2.31.0 +Version: 2.32.3 Release: 1 Summary: Python HTTP Library License: ASL 2.0 URL: http://python-requests.org/ Source0: https://github.com/requests/requests/archive/v%{version}/requests-v%{version}.tar.gz#/requests-%{version}.tar.gz -Patch6001: backport-requests-2.31.0-system-certs.patch +Patch6001: 0001-backport-requests-2.31.0-system-certs.patch BuildArch: noarch %description @@ -63,12 +63,10 @@ the HTTP capabilities you should need, but the api is thoroughly broken. It requires an enormous amount of work (even method overrides) to perform the simplest of tasks. -%package_help %prep %autosetup -p1 -n requests-%{version} rm -rf requests/cacert.pem -sed -i '/#!\/usr\/.*python/d' requests/certs.py %build %py3_build @@ -87,11 +85,10 @@ PYTHONPATH=%{buildroot}%{python3_sitelib} %{__python3} -m pytest -v %{python3_sitelib}/*.egg-info/* %{python3_sitelib}/requests/ -%files help -%defattr(-,root,root) -%doc HISTORY.md README.md - %changelog +* Mon Jun 03 2024 liuzhilin - 2.32.3-1 +- Update package to version 2.32.3 + * Thu Jul 13 2023 zhangchenglin - 2.31.0-1 - Update package to version 2.31.0 diff --git a/requests-2.31.0.tar.gz b/requests-2.31.0.tar.gz deleted file mode 100644 index b0962abc7053dcda90c1f586d00c0fc5b9eb14ab..0000000000000000000000000000000000000000 Binary files a/requests-2.31.0.tar.gz and /dev/null differ diff --git a/requests-2.32.3.tar.gz b/requests-2.32.3.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..536511fa0b257242215cfaaa1c5bdb9368d99518 Binary files /dev/null and b/requests-2.32.3.tar.gz differ