Fix FTBFS
This commit is contained in:
parent
576af2d63f
commit
a4e6c6d8c0
2 changed files with 26 additions and 0 deletions
22
bf24b7.patch
Normal file
22
bf24b7.patch
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
From bf24b7d8d17da34be720c19e5978b2d3bf94a53b Mon Sep 17 00:00:00 2001
|
||||
From: franekmagiera <framagie@gmail.com>
|
||||
Date: Sun, 12 May 2024 22:08:24 +0200
|
||||
Subject: [PATCH] Use an invalid URI that will not cause httpbin to throw 500
|
||||
|
||||
---
|
||||
tests/test_requests.py | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/tests/test_requests.py b/tests/test_requests.py
|
||||
index d05febeef5..b4e9fe92ae 100644
|
||||
--- a/tests/test_requests.py
|
||||
+++ b/tests/test_requests.py
|
||||
@@ -2721,7 +2721,7 @@ def test_preparing_bad_url(self, url):
|
||||
with pytest.raises(requests.exceptions.InvalidURL):
|
||||
r.prepare()
|
||||
|
||||
- @pytest.mark.parametrize("url, exception", (("http://localhost:-1", InvalidURL),))
|
||||
+ @pytest.mark.parametrize("url, exception", (("http://:1", InvalidURL),))
|
||||
def test_redirecting_to_bad_url(self, httpbin, url, exception):
|
||||
with pytest.raises(exception):
|
||||
requests.get(httpbin("redirect-to"), params={"url": url})
|
||||
|
|
@ -24,6 +24,9 @@ Patch: system-certs.patch
|
|||
# This change is backported also into RHEL 9.4 (via CS)
|
||||
Patch: support_IPv6_CIDR_in_no_proxy.patch
|
||||
|
||||
# Fix FTBFS (test_redirecting_to_bad_url)
|
||||
Patch: https://github.com/psf/requests/commit/bf24b7.patch
|
||||
|
||||
BuildArch: noarch
|
||||
BuildRequires: python%{python3_pkgversion}-devel
|
||||
%if %{with tests}
|
||||
|
|
@ -100,6 +103,7 @@ sed -i "/pytest.warns/s/None//" tests/test_requests.py
|
|||
%changelog
|
||||
* Tue May 14 2024 Lumír Balhar <lbalhar@redhat.com> - 2.31.0-5
|
||||
- Add support for IPv6 CIDR in no_proxy setting
|
||||
- Fix FTBFS
|
||||
|
||||
* Thu Apr 11 2024 Lumír Balhar <lbalhar@redhat.com> - 2.31.0-4
|
||||
- Fix compatibility with pytest 8
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue