From 9d9296cdb3fd96f23f42c88ffd51584c2ab36319 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Tue, 25 Mar 2025 15:12:58 +0100 Subject: [PATCH 1/5] Use /etc/pki/ca-trust/extracted/pem/tls-ca-bundle.pem - https://fedoraproject.org/wiki/Changes/dropingOfCertPemFile - Fixes: rhbz#2337320 --- python-requests.spec | 2 +- system-certs.patch | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/python-requests.spec b/python-requests.spec index 044ccfb..5164d3c 100644 --- a/python-requests.spec +++ b/python-requests.spec @@ -25,7 +25,7 @@ Patch: system-certs.patch # This change is backported also into RHEL 9.4 (via CS) Patch: support_IPv6_CIDR_in_no_proxy.patch -# Fix crash on import if /etc/pki/tls/certs/ca-bundle.crt is missing +# Fix crash on import if /etc/pki/ca-trust/extracted/pem/tls-ca-bundle.pem is missing # https://bugzilla.redhat.com/show_bug.cgi?id=2297632 # https://github.com/psf/requests/pull/6781 # Note: this can be replaced by https://github.com/psf/requests/pull/6767 diff --git a/system-certs.patch b/system-certs.patch index 96f097e..42b8213 100644 --- a/system-certs.patch +++ b/system-certs.patch @@ -43,14 +43,14 @@ index be422c3..9aee713 100644 environment, you can change the definition of where() to return a separately packaged CA bundle. + -+This Fedora-patched package returns "/etc/pki/tls/certs/ca-bundle.crt" provided ++This Fedora-patched package returns "/etc/pki/ca-trust/extracted/pem/tls-ca-bundle.pem" 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' ++ return '/etc/pki/ca-trust/extracted/pem/tls-ca-bundle.pem' if __name__ == "__main__": print(where()) From 15b4c097f298c881fe92ca831486a96cec535bc6 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 25 Jul 2025 10:09:23 +0000 Subject: [PATCH 2/5] Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild From 13de5714ceaa96d0cacfd0da1307948c91da46f8 Mon Sep 17 00:00:00 2001 From: Python Maint Date: Fri, 15 Aug 2025 14:45:16 +0200 Subject: [PATCH 3/5] Rebuilt for Python 3.14.0rc2 bytecode From 0f0415395c621805e131989c0dcdf3bbb93d947e Mon Sep 17 00:00:00 2001 From: Lumir Balhar Date: Tue, 19 Aug 2025 10:58:29 +0200 Subject: [PATCH 4/5] Update to 2.32.5 (rhbz#2389307) --- .gitignore | 1 + ...ault-SSLContext-if-CA-bundle-isn-t-p.patch | 36 ------------------- python-requests.spec | 9 +---- sources | 2 +- 4 files changed, 3 insertions(+), 45 deletions(-) delete mode 100644 0001-Don-t-create-default-SSLContext-if-CA-bundle-isn-t-p.patch diff --git a/.gitignore b/.gitignore index da16a7b..2a551fe 100644 --- a/.gitignore +++ b/.gitignore @@ -54,3 +54,4 @@ /requests-v2.31.0.tar.gz /requests-v2.32.3.tar.gz /requests-v2.32.4.tar.gz +/requests-v2.32.5.tar.gz diff --git a/0001-Don-t-create-default-SSLContext-if-CA-bundle-isn-t-p.patch b/0001-Don-t-create-default-SSLContext-if-CA-bundle-isn-t-p.patch deleted file mode 100644 index 14ca3a1..0000000 --- a/0001-Don-t-create-default-SSLContext-if-CA-bundle-isn-t-p.patch +++ /dev/null @@ -1,36 +0,0 @@ -From 08e863f94fe93b4b3bd2e8267234be7a23350b1d Mon Sep 17 00:00:00 2001 -From: Adam Williamson -Date: Thu, 1 Aug 2024 12:58:38 -0700 -Subject: [PATCH] Don't create default SSLContext if CA bundle isn't present - -Similar to e18879932287c2bf4bcee4ddf6ccb8a69b6fc656 , this also -skips creation of the default SSLContext on FileNotFoundError, -which is raised if DEFAULT_CA_BUNDLE_PATH does not exist. - -See: https://bugzilla.redhat.com/show_bug.cgi?id=2297632 - -Signed-off-by: Adam Williamson ---- - src/requests/adapters.py | 5 +++-- - 1 file changed, 3 insertions(+), 2 deletions(-) - -diff --git a/src/requests/adapters.py b/src/requests/adapters.py -index 9a58b160..fb151a95 100644 ---- a/src/requests/adapters.py -+++ b/src/requests/adapters.py -@@ -81,9 +81,10 @@ try: - _preloaded_ssl_context.load_verify_locations( - extract_zipped_paths(DEFAULT_CA_BUNDLE_PATH) - ) --except ImportError: -+except (ImportError, FileNotFoundError): - # Bypass default SSLContext creation when Python -- # interpreter isn't built with the ssl module. -+ # interpreter isn't built with the ssl module, or -+ # DEFAULT_CA_BUNDLE_PATH isn't present - _preloaded_ssl_context = None - - --- -2.45.2 - diff --git a/python-requests.spec b/python-requests.spec index 5164d3c..4a7f997 100644 --- a/python-requests.spec +++ b/python-requests.spec @@ -6,7 +6,7 @@ %bcond extradeps %{undefined rhel} Name: python-requests -Version: 2.32.4 +Version: 2.32.5 Release: %autorelease Summary: HTTP library, written in Python, for human beings @@ -25,13 +25,6 @@ Patch: system-certs.patch # This change is backported also into RHEL 9.4 (via CS) Patch: support_IPv6_CIDR_in_no_proxy.patch -# Fix crash on import if /etc/pki/ca-trust/extracted/pem/tls-ca-bundle.pem is missing -# https://bugzilla.redhat.com/show_bug.cgi?id=2297632 -# https://github.com/psf/requests/pull/6781 -# Note: this can be replaced by https://github.com/psf/requests/pull/6767 -# when it is ready, or dropped in a release where that is merged -Patch: 0001-Don-t-create-default-SSLContext-if-CA-bundle-isn-t-p.patch - BuildArch: noarch BuildRequires: python%{python3_pkgversion}-devel %if %{with tests} diff --git a/sources b/sources index 1372986..e2adddc 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (requests-v2.32.4.tar.gz) = 7638061283a5e66c51f26107f5a88d090d35feecbf5a9075af842b67c0abd727af855346e2385130fa79738395a3821107be300e3de60a9a0e84fe69904288cd +SHA512 (requests-v2.32.5.tar.gz) = ca73dcaec9a12ecd7d16d5f30a9213fc520b9b9d659bd6d35e6f05f7b823e1bf6209c7ae48d5e301974794d92dbc8facb937ce99e22180b28dd80f6f2afa13ae From 5482485d62e5871f6a1b3baebb19dc4022d39228 Mon Sep 17 00:00:00 2001 From: Python Maint Date: Fri, 19 Sep 2025 14:19:18 +0200 Subject: [PATCH 5/5] Rebuilt for Python 3.14.0rc3 bytecode