diff --git a/backport-requests-2.31.0-system-certs.patch b/backport-requests-2.32.3-system-certs.patch similarity index 54% rename from backport-requests-2.31.0-system-certs.patch rename to backport-requests-2.32.3-system-certs.patch index 4d5c35a3baff27e5040aaa19e7d5c8f10bbd8a29..679dfb8e84283d07a13474c992e0191195756d01 100644 --- a/backport-requests-2.31.0-system-certs.patch +++ b/backport-requests-2.32.3-system-certs.patch @@ -1,58 +1,58 @@ -From c8ed737d0390497b63c410a8239fea425c62a757 Mon Sep 17 00:00:00 2001 -From: lingjuer -Date: Wed, 26 Jul 2023 10:20:57 +0800 -Subject: [PATCH] backport-requests-2.31.0-system-certs +From e48b28986afc72e145a3e1138b110b4ba684b267 Mon Sep 17 00:00:00 2001 +From: desert-sailor +Date: Fri, 14 Mar 2025 11:10:32 +0800 +Subject: [PATCH] backport requests-2.32.3 system-certs --- - requests/certs.py | 7 ++++++- - setup.cfg | 1 - - setup.py | 2 +- + setup.cfg | 1 - + setup.py | 1 - + src/requests/certs.py | 8 +++++++- 3 files changed, 7 insertions(+), 3 deletions(-) -diff --git a/requests/certs.py b/requests/certs.py -index be422c3..1795e1c 100644 ---- a/requests/certs.py -+++ b/requests/certs.py -@@ -10,8 +10,13 @@ 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()) diff --git a/setup.cfg b/setup.cfg -index ea45aaf..056b065 100644 +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,<1.27 + 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 0123545..a1a50a3 100755 +index 1b0eb37..03d19b0 100755 --- a/setup.py +++ b/setup.py -@@ -62,7 +62,7 @@ requires = [ +@@ -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.39.1 +2.43.0 diff --git a/python-requests.spec b/python-requests.spec index 251c455ed2546d7c8f6026ad7e7da2fe52d757f1..1f06311c04691cd3e42bb4708fc37f8ed1db1b0a 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 +URL: https://github.com/psf/requests +Source: %{url}/archive/v%{version}/requests-%{version}.tar.gz +Patch6001: backport-requests-2.32.3-system-certs.patch BuildArch: noarch %description @@ -68,7 +68,7 @@ perform the simplest of tasks. %prep %autosetup -p1 -n requests-%{version} rm -rf requests/cacert.pem -sed -i '/#!\/usr\/.*python/d' requests/certs.py +sed -i '/#!\/usr\/.*python/d' src/requests/certs.py %build %py3_build @@ -92,6 +92,9 @@ PYTHONPATH=%{buildroot}%{python3_sitelib} %{__python3} -m pytest -v %doc HISTORY.md README.md %changelog +* Fri Mar 14 2025 Dongxing Wang - 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