diff --git a/backport-requests-2.31.0-system-certs.patch b/backport-requests-2.32.0-system-certs.patch similarity index 69% rename from backport-requests-2.31.0-system-certs.patch rename to backport-requests-2.32.0-system-certs.patch index 4d5c35a3baff27e5040aaa19e7d5c8f10bbd8a29..c38067aebb35b6c51db563a6cb69a2233af31e16 100644 --- a/backport-requests-2.31.0-system-certs.patch +++ b/backport-requests-2.32.0-system-certs.patch @@ -1,35 +1,16 @@ -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 5619a02743886a8cecef271647b568d83c8f9a53 Mon Sep 17 00:00:00 2001 +From: zhangxingrong +Date: Tue, 21 May 2024 10:24:22 +0800 +Subject: [PATCH] backport requests 2.32.0 system certs --- - requests/certs.py | 7 ++++++- - setup.cfg | 1 - - setup.py | 2 +- + setup.cfg | 1 - + setup.py | 2 +- + src/requests/certs.py | 7 ++++++- 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 679ac3b..5d98ddd 100644 --- a/setup.cfg +++ b/setup.cfg @@ -4,7 +4,6 @@ provides-extra = @@ -39,9 +20,9 @@ index ea45aaf..056b065 100644 - certifi>=2017.4.17 charset_normalizer>=2,<4 idna>=2.5,<4 - urllib3>=1.21.1,<1.27 + urllib3>=1.21.1,<3 diff --git a/setup.py b/setup.py -index 0123545..a1a50a3 100755 +index 1b0eb37..8a3b6a9 100755 --- a/setup.py +++ b/setup.py @@ -62,7 +62,7 @@ requires = [ @@ -49,10 +30,29 @@ index 0123545..a1a50a3 100755 "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..1795e1c 100644 +--- a/src/requests/certs.py ++++ b/src/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()) -- -2.39.1 +2.43.0 diff --git a/python-requests.spec b/python-requests.spec index 251c455ed2546d7c8f6026ad7e7da2fe52d757f1..04952b063216b80206affe6b001f9f67f500907e 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.0 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: backport-requests-2.32.0-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 +* Tue May 21 2024 zhangxingrong - 2.32.0-1 +- Update to version 2.32.0 + * 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.0.tar.gz b/requests-2.32.0.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..05bcf924c7f6e7727bb2b63738572d63ce09985c Binary files /dev/null and b/requests-2.32.0.tar.gz differ